Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 682 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 682 Bytes

swift-html-styling

This package is connecting BinaryBirds/swift-html and BinaryBirds/swift-css.

SwiftCss.Property in style

Inline styles can be added like this:

Span("").style {
    Padding(.initial)
    Margin(.inherit)
}

See the tests for more examples.

Tag modifiers

This capability enables to have SwiftUI-style modifiers

Span("")
    .padding(.initial)
    .margin(.inherit)

which would render as

<span style="padding:initial;margin:inherit"></span>

Note: Only .padding is implemented as proof of concept. More to come.