Closed davesnx closed 3 months ago
There has been an exploration https://github.com/davesnx/styled-ppx/pull/404 about having a Resolver phase which is the way to go in order to handle the transformation on media-queries and selectors. Similar work has been done at native runtime: packages/emotion/native/Css.ml
Similar work has been done at native runtime: packages/emotion/native/Css.ml
~Does it fix the issue (out of curiosity)?~
My Bad, didn't notice this was an issue. Thought it was a PR comment.
It fixes the same issue but when you aren't using the ppx and running on native
Nested selectors should be treated with an empty space at the beginning if they don't start with an
&
.Currently it transform toÂ
CssJs.selector(".aaa", [CssJs.selector(".bbb", [CssJs.color(CssJs.red)])])
so it generates an object to emotion like:{ ".aaa": {".bbb" : { "color": "red" }} }
The second selector should have a whitespace at the start
More test cases: