-
Notifications
You must be signed in to change notification settings - Fork 306
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
Generated CSS is always suffixed with :not(#\#)
#370
Comments
Looks like this was added to adjust the specificity of the CSS rule when I haven't seen this internally at Meta so I wonder if some of the logic is specific to the open-source version. |
Is that polyfill logic supposed to create really long .x1m3v4wt:not(#\#):not(#\#):not(#\#):not(#\#) {
height: 200px
} and does it actually change in behaviour when compared with just a single one: .x1m3v4wt:not(#\#) {
height: 200px
} |
Each |
@Daniel15 is correct with the explainations. Using You can configure the Webpack plugin with |
See [this issue](facebook/stylex#370) for more info.
* wip * remove declaration override * append stylex styles * fix things * fix bottom margin * remove dev runtime * revert thing * revert * use stylex for keyframe animations * pass logo url via function * update stylex version * Fix generated CSS containing a bunch of `:not(#\#)`s. See [this issue](facebook/stylex#370) for more info. * add eslint plugin to validate stylex styles * use numbers that default to px * use numbers more
Describe the issue
I'm migrating a project to use StyleX, and I'm defining styles as per usual like so:
However, when I inspect the generated CSS, every selector is appended with a trailing
:not(#\#)
.The more components that I migrate to use StyleX, the longer the
:not(#\#)
chain is for some selectors, with some selectors having 3 or 4. e.g.I initially thought it was some form of disambiguation, but surely the randomly generated CSS selectors should be sufficient for that.
Expected behavior
I would assume the expected generated CSS to just be like:
Steps to reproduce
I'm using the following packages:
but I was initially using
v0.3.0
which also had this issue.with the Webpack configuration:
Additional comments
Why does it do this and is it by design? It makes all the CSS selector names really long and also greatly increases the size of the resulting CSS file.
The text was updated successfully, but these errors were encountered: