Skip to content

atacan/swift-html-styling

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published