iari
05/14/2020, 2:17 PM/commonMain/kotlinx/css/CSSBuilder.kt
contains these:
// <https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule>
fun media(query: String, block: RuleSet) = "@media $query"(block)
fun supports(query: String, block: RuleSet) = "@supports $query"(block)
fun fontFace(query: String, block: RuleSet) = "@font-face $query"(block)
but are they usable? for me, seem a bit weird.
• all of them in css are typically provided multiple times within the same context - but it seems that StringBuilder.buildRules
only creates a single CSSBuilder
for them - so if you want to define two @fontFace
bodys, that doesn't work, because all ends up in the same body and values are just overwritten.
I guess with media
and supports
that would work, because there's the 'query' parameter, which makes it a different selector.
But what should i put in the query-parameter for fontFace?
@turansky is that a bug - or how are they used?