-
Notifications
You must be signed in to change notification settings - Fork 262
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
Update Compiler Fork #8
Comments
@thysultan what do you think about |
@rauchg So these will be the same |
yep so
Alternatively, we could make the |
cc @giuseppeg |
sure i can add that, |
@rauchg correct One thing to keep in mind is that styles applied from the outside should win over Nice to have then it would be to get
yields
But probably it is better to tackle this later and maybe also consider the |
@rauchg @giuseppeg pushed a patch for all the host variations
|
@thysultan cool in order for |
@giuseppeg |
@thysultan oh I see, sorry I was thinking in terms of styled-jsx :) |
@rauchg instead of this
can this work
or better yet a plugin that treats everything in the
|
The latter is invalid JSX unfortunately. It'll think of |
We picked the most optimal syntax considering how JSX works today I think :D |
@thysultan what happens here https://github.com/zeit/styled-jsx/blob/master/lib/style-transform.js#L197 if the selector is something like:
|
@thysultan do you think that it would be trivial to switch to your version of the compiler and write a middleware to add scoping the styled-jsx way (with data-jsx to each selector)? If so would you be interested in helping out? |
Sure, the middleware will look something like this
This will change The |
@giuseppeg On the repl site https://stylis.js.org/ You can try the following in the console.
and input something into the editor and it should namespace the styled-jsx way. |
@thysultan the selector below should be i.e. the prefix should be added to every part of the selector (except for globals). Do you think that it is doable with the current version of stylis + middleware? |
@giuseppeg Yes doable, what should |
cool |
Then this should work as expected.
|
@thysultan @rauchg I started to work on this tonight #125 keep in mind that it is very wip |
fixed by #134 |
There's a few things missing pre-v0.6.4 of the stylis compiler that your fork will not handle that could be nice to have.
full prefix support in
@root and @keyframes blocks
.support opting out of name-spacing keyframes and animations.
I've done away with the regex solution i was using, and added supports for
stylis("[data-id=namespace]")
namespaces.The text was updated successfully, but these errors were encountered: