scalacss
scalacss copied to clipboard
unsafeRoot missing from documentation
I'm trying to generate inline stylesheet (to use with scalaJS) to replace my current css file with this content, is this possible with scalaCSS ? I spent some time to search for such examples but could not find any ...
@media all and (min-width: 800px) {
* {
font-size: 4vmin;
}
}
* {
box-sizing: border-box;
}
body {
margin: 1vmin;
}
What you need is unsafeRoot
but it seems it's missing from the documentation.
Here's an example from the tests: in, out.
As for the media queries see: http://japgolly.github.io/scalacss/book/features/cond.html
Thanks for the answer ! It would be helpfull to see it in the documentation :)
Here is what I used following the links :
style(
unsafeRoot("*")(
boxSizing.borderBox,
media.all.minWidth(800.px)(fontSize(4.vmin))),
unsafeRoot("body")(margin(1.vmin))
)
I let you choose if you close the issue or keep it open to update the doc :)
Good to hear. Let's keep this open