This package is connecting BinaryBirds/swift-html and BinaryBirds/swift-css.
Inline styles can be added like this:
Span("").style {
Padding(.initial)
Margin(.inherit)
}
See the tests for more examples.
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.