Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsafeRoot missing from documentation #129

Open
tyrcho opened this issue Jan 13, 2018 · 4 comments
Open

unsafeRoot missing from documentation #129

tyrcho opened this issue Jan 13, 2018 · 4 comments

Comments

@tyrcho
Copy link

tyrcho commented Jan 13, 2018

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;
}
@japgolly
Copy link
Owner

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

@tyrcho
Copy link
Author

tyrcho commented Jan 14, 2018

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))
)

@tyrcho
Copy link
Author

tyrcho commented Jan 14, 2018

I let you choose if you close the issue or keep it open to update the doc :)

@japgolly
Copy link
Owner

Good to hear. Let's keep this open

@japgolly japgolly changed the title How to generate style without a class ? unsafeRoot missing from documentation Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants