-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix nesting for selectors (and pseudo) in native #483
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
New nightly version has been published to the NPM registry: @davesnx/styled-ppx@0.56.1-f00a3c1.0. |
5eeceee
to
96a96b1
Compare
@@ -107,6 +107,7 @@ let render_declarations (rules : rule list) = | |||
let is_at_rule selector = String.contains selector '@' | |||
let is_a_pseudo_selector selector = String.starts_with ~prefix:":" selector | |||
let starts_with_at selector = String.starts_with ~prefix:"@" selector | |||
let starts_with_double_dot selector = String.starts_with ~prefix:":" selector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dumb question: what is the difference between starts_with_double_dot
and is_a_pseudo_selector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw you remove it here: https://github.com/davesnx/styled-ppx/pull/483/files#diff-fae8d1b5ad79dc3019cf34c19b6577b5e210c318ad4fe23e9816de4ad4c0a4daL140
Should we do the same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing support for Css in monorepo and will eventually remove it from styled-ppx. That's why Css isn't at pair with CssJs (where some bugfix got fixed only in CssJs)
CHANGES: ## 0.57.1 - Remove public_name from alcotest_extra davesnx/styled-ppx#484 (@davesnx) - Fix nesting for selectors (and pseudo) in native davesnx/styled-ppx#483 (@davesnx) ## 0.57.0 - Improvement for locations in both code-gen and error reporting by @davesnx in davesnx/styled-ppx#456 - Support css min and max functions by @lubegasimon in davesnx/styled-ppx#411 - Update docs by @zakybilfagih in davesnx/styled-ppx#457 - update server-reason-react pin to main branch by @zakybilfagih in davesnx/styled-ppx#460 - Native support for styled.{{tag}} by @zakybilfagih in davesnx/styled-ppx#461 - Fix linear-gradient and radial-gradient by @davesnx in davesnx/styled-ppx#464 - Add getting started docs by @zakybilfagih in davesnx/styled-ppx#459 - escape curly on remote markdown content by @zakybilfagih in davesnx/styled-ppx#466 - Add Melange and native instructions by @davesnx in davesnx/styled-ppx#465 - Global styles for native server on emotion by @pedrobslisboa in davesnx/styled-ppx#468 - Style HTML tag by @pedrobslisboa in davesnx/styled-ppx#467 - [emotion native] Fix nested pseudoelements by @davesnx in davesnx/styled-ppx#470 - Transform with variable handle unsafe interpolation by @zakybilfagih in davesnx/styled-ppx#471 - Add depext for @emotion/css >= 11.0.0 by @feihong in davesnx/styled-ppx#473 - Add support for transition by @zakybilfagih in davesnx/styled-ppx#472 - Fix animation codegen by @zakybilfagih in davesnx/styled-ppx#475 - Fix error line number coming from parser by @zakybilfagih in davesnx/styled-ppx#478 - Polish emotion-native by @davesnx in davesnx/styled-ppx#481 - Rename `render_style_tag` to `get_stylesheet` (@davesnx) - Docs: Explain show server rendered stylesheets work natively by @ManasJayanth in davesnx/styled-ppx#480 ## 0.56.0 - Improvement for locations in both code-gen and error reporting (davesnx/styled-ppx#456) by @davesnx - Support css min and max functions (davesnx/styled-ppx#411) by @lubegasimon - Update docs (davesnx/styled-ppx#457) by @zakybilfagih - Native support for styled.{{tag}} (davesnx/styled-ppx#461) by @zakybilfagih - background-clip: text support by @davesnx - Fix linear-gradient and radial-gradient (davesnx/styled-ppx#464) by @davesnx - Rename emotion-hash into murmur2 and remove public testing cli by @davesnx - Use server-reason-react from opam by @davesnx
CHANGES: ## 0.59.0 - [BREAKING] Change entry point module `CSS` (from `CssJs`) on `styled-ppx.melange`, `styled-ppx.native` and `styled-ppx.rescript` (davesnx/styled-ppx#490) (@davesnx) - [FEATURE] Add support and interpolation for `zoom`, `will-change` and `user-select` properties (davesnx/styled-ppx#489) (@davesnx) - [FEATURE] Support content with interpolation davesnx/styled-ppx#494 (@davesnx) - [FEATURE] Support define CSS variables in global and use CSS variables in properties davesnx/styled-ppx#492 (@davesnx) - [FEATURE] Support overflow with 2 values - [FEATURE] Make animation-name abstract (@davesnx) - [FIX] Add 100 unsupported properties, which will render properly (davesnx/styled-ppx#489) (@davesnx) - [FIX] Inline all CSS.Var and CSS.Cascading in properties (davesnx/styled-ppx#495) (@davesnx) - [FIX] Color with support for rgba/hsla and others with calc/min and max (davesnx/styled-ppx#495) (@davesnx) - [FIX] Warning of kebab-case on emotion client side (davesnx/styled-ppx#493) (@davesnx) ## 0.58.1 - [BREAKING] FontFamilyName.t is now a string (@davesnx) - [FIX] Make unsafe calls from "Cascading" be camelCase to avoid emotion's warning davesnx/styled-ppx#488 (@davesnx) - [FIX] Keep classname when ampersand is at the end of the selector (@davesnx) - [FIX] Fix fontFace in both melange and native (@davesnx) ## 0.58.0 - [FEATURE] Initial @container support davesnx/styled-ppx#476 (@zakybilfagih) - [FIX] Make selector nested maintain other selectors davesnx/styled-ppx#486 (@davesnx) - [BREAKING] Remove `Css` module, `styled_label` and friends davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css and styled-ppx.emotion into styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Remove PseudoClass and PseudoClassParam davesnx/styled-ppx#487 (@davesnx) - Remove functor from Css_Js_Core davesnx/styled-ppx#487 (@davesnx) - Remove melange.js and melange.belt from styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - Remove server-reason-react.js and server-reason-react.belt from styled-ppx.native davesnx/styled-ppx#487 (@davesnx) ## 0.57.1 - Remove public_name from alcotest_extra davesnx/styled-ppx#484 (@davesnx) - Fix nesting for selectors (and pseudo) in native davesnx/styled-ppx#483 (@davesnx) ## 0.57.0 - Improvement for locations in both code-gen and error reporting by @davesnx in davesnx/styled-ppx#456 - Support css min and max functions by @lubegasimon in davesnx/styled-ppx#411 - Update docs by @zakybilfagih in davesnx/styled-ppx#457 - update server-reason-react pin to main branch by @zakybilfagih in davesnx/styled-ppx#460 - Native support for styled.{{tag}} by @zakybilfagih in davesnx/styled-ppx#461 - Fix linear-gradient and radial-gradient by @davesnx in davesnx/styled-ppx#464 - Add getting started docs by @zakybilfagih in davesnx/styled-ppx#459 - escape curly on remote markdown content by @zakybilfagih in davesnx/styled-ppx#466 - Add Melange and native instructions by @davesnx in davesnx/styled-ppx#465 - Global styles for native server on emotion by @pedrobslisboa in davesnx/styled-ppx#468 - Style HTML tag by @pedrobslisboa in davesnx/styled-ppx#467 - [emotion native] Fix nested pseudoelements by @davesnx in davesnx/styled-ppx#470 - Transform with variable handle unsafe interpolation by @zakybilfagih in davesnx/styled-ppx#471 - Add depext for @emotion/css >= 11.0.0 by @feihong in davesnx/styled-ppx#473 - Add support for transition by @zakybilfagih in davesnx/styled-ppx#472 - Fix animation codegen by @zakybilfagih in davesnx/styled-ppx#475 - Fix error line number coming from parser by @zakybilfagih in davesnx/styled-ppx#478 - Polish emotion-native by @davesnx in davesnx/styled-ppx#481 - Rename `render_style_tag` to `get_stylesheet` (@davesnx) - Docs: Explain show server rendered stylesheets work natively by @ManasJayanth in davesnx/styled-ppx#480 ## 0.56.0 - Improvement for locations in both code-gen and error reporting (davesnx/styled-ppx#456) by @davesnx - Support css min and max functions (davesnx/styled-ppx#411) by @lubegasimon - Update docs (davesnx/styled-ppx#457) by @zakybilfagih - Native support for styled.{{tag}} (davesnx/styled-ppx#461) by @zakybilfagih - background-clip: text support by @davesnx - Fix linear-gradient and radial-gradient (davesnx/styled-ppx#464) by @davesnx - Rename emotion-hash into murmur2 and remove public testing cli by @davesnx - Use server-reason-react from opam by @davesnx
CHANGES: ## 0.59.0 - [BREAKING] Change entry point module `CSS` (from `CssJs`) on `styled-ppx.melange`, `styled-ppx.native` and `styled-ppx.rescript` (davesnx/styled-ppx#490) (@davesnx) - [FEATURE] Add support and interpolation for `zoom`, `will-change` and `user-select` properties (davesnx/styled-ppx#489) (@davesnx) - [FEATURE] Support content with interpolation davesnx/styled-ppx#494 (@davesnx) - [FEATURE] Support define CSS variables in global and use CSS variables in properties davesnx/styled-ppx#492 (@davesnx) - [FEATURE] Support overflow with 2 values - [FEATURE] Make animation-name abstract (@davesnx) - [FIX] Add 100 unsupported properties, which will render properly (davesnx/styled-ppx#489) (@davesnx) - [FIX] Inline all CSS.Var and CSS.Cascading in properties (davesnx/styled-ppx#495) (@davesnx) - [FIX] Color with support for rgba/hsla and others with calc/min and max (davesnx/styled-ppx#495) (@davesnx) - [FIX] Warning of kebab-case on emotion client side (davesnx/styled-ppx#493) (@davesnx) ## 0.58.1 - [BREAKING] FontFamilyName.t is now a string (@davesnx) - [FIX] Make unsafe calls from "Cascading" be camelCase to avoid emotion's warning davesnx/styled-ppx#488 (@davesnx) - [FIX] Keep classname when ampersand is at the end of the selector (@davesnx) - [FIX] Fix fontFace in both melange and native (@davesnx) ## 0.58.0 - [FEATURE] Initial @container support davesnx/styled-ppx#476 (@zakybilfagih) - [FIX] Make selector nested maintain other selectors davesnx/styled-ppx#486 (@davesnx) - [BREAKING] Remove `Css` module, `styled_label` and friends davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css and styled-ppx.emotion into styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Remove PseudoClass and PseudoClassParam davesnx/styled-ppx#487 (@davesnx) - Remove functor from Css_Js_Core davesnx/styled-ppx#487 (@davesnx) - Remove melange.js and melange.belt from styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - Remove server-reason-react.js and server-reason-react.belt from styled-ppx.native davesnx/styled-ppx#487 (@davesnx) ## 0.57.1 - Remove public_name from alcotest_extra davesnx/styled-ppx#484 (@davesnx) - Fix nesting for selectors (and pseudo) in native davesnx/styled-ppx#483 (@davesnx) ## 0.57.0 - Improvement for locations in both code-gen and error reporting by @davesnx in davesnx/styled-ppx#456 - Support css min and max functions by @lubegasimon in davesnx/styled-ppx#411 - Update docs by @zakybilfagih in davesnx/styled-ppx#457 - update server-reason-react pin to main branch by @zakybilfagih in davesnx/styled-ppx#460 - Native support for styled.{{tag}} by @zakybilfagih in davesnx/styled-ppx#461 - Fix linear-gradient and radial-gradient by @davesnx in davesnx/styled-ppx#464 - Add getting started docs by @zakybilfagih in davesnx/styled-ppx#459 - escape curly on remote markdown content by @zakybilfagih in davesnx/styled-ppx#466 - Add Melange and native instructions by @davesnx in davesnx/styled-ppx#465 - Global styles for native server on emotion by @pedrobslisboa in davesnx/styled-ppx#468 - Style HTML tag by @pedrobslisboa in davesnx/styled-ppx#467 - [emotion native] Fix nested pseudoelements by @davesnx in davesnx/styled-ppx#470 - Transform with variable handle unsafe interpolation by @zakybilfagih in davesnx/styled-ppx#471 - Add depext for @emotion/css >= 11.0.0 by @feihong in davesnx/styled-ppx#473 - Add support for transition by @zakybilfagih in davesnx/styled-ppx#472 - Fix animation codegen by @zakybilfagih in davesnx/styled-ppx#475 - Fix error line number coming from parser by @zakybilfagih in davesnx/styled-ppx#478 - Polish emotion-native by @davesnx in davesnx/styled-ppx#481 - Rename `render_style_tag` to `get_stylesheet` (@davesnx) - Docs: Explain show server rendered stylesheets work natively by @ManasJayanth in davesnx/styled-ppx#480 ## 0.56.0 - Improvement for locations in both code-gen and error reporting (davesnx/styled-ppx#456) by @davesnx - Support css min and max functions (davesnx/styled-ppx#411) by @lubegasimon - Update docs (davesnx/styled-ppx#457) by @zakybilfagih - Native support for styled.{{tag}} (davesnx/styled-ppx#461) by @zakybilfagih - background-clip: text support by @davesnx - Fix linear-gradient and radial-gradient (davesnx/styled-ppx#464) by @davesnx - Rename emotion-hash into murmur2 and remove public testing cli by @davesnx - Use server-reason-react from opam by @davesnx
CHANGES: ## 0.59.0 - [BREAKING] Change entry point module `CSS` (from `CssJs`) on `styled-ppx.melange`, `styled-ppx.native` and `styled-ppx.rescript` (davesnx/styled-ppx#490) (@davesnx) - [FEATURE] Add support and interpolation for `zoom`, `will-change` and `user-select` properties (davesnx/styled-ppx#489) (@davesnx) - [FEATURE] Support content with interpolation davesnx/styled-ppx#494 (@davesnx) - [FEATURE] Support define CSS variables in global and use CSS variables in properties davesnx/styled-ppx#492 (@davesnx) - [FEATURE] Support overflow with 2 values - [FEATURE] Make animation-name abstract (@davesnx) - [FIX] Add 100 unsupported properties, which will render properly (davesnx/styled-ppx#489) (@davesnx) - [FIX] Inline all CSS.Var and CSS.Cascading in properties (davesnx/styled-ppx#495) (@davesnx) - [FIX] Color with support for rgba/hsla and others with calc/min and max (davesnx/styled-ppx#495) (@davesnx) - [FIX] Warning of kebab-case on emotion client side (davesnx/styled-ppx#493) (@davesnx) ## 0.58.1 - [BREAKING] FontFamilyName.t is now a string (@davesnx) - [FIX] Make unsafe calls from "Cascading" be camelCase to avoid emotion's warning davesnx/styled-ppx#488 (@davesnx) - [FIX] Keep classname when ampersand is at the end of the selector (@davesnx) - [FIX] Fix fontFace in both melange and native (@davesnx) ## 0.58.0 - [FEATURE] Initial @container support davesnx/styled-ppx#476 (@zakybilfagih) - [FIX] Make selector nested maintain other selectors davesnx/styled-ppx#486 (@davesnx) - [BREAKING] Remove `Css` module, `styled_label` and friends davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css and styled-ppx.emotion into styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Merge styled-ppx.css-native and styled-ppx.emotion-native into styled-ppx.native davesnx/styled-ppx#487 (@davesnx) - [BREAKING] Remove PseudoClass and PseudoClassParam davesnx/styled-ppx#487 (@davesnx) - Remove functor from Css_Js_Core davesnx/styled-ppx#487 (@davesnx) - Remove melange.js and melange.belt from styled-ppx.melange davesnx/styled-ppx#487 (@davesnx) - Remove server-reason-react.js and server-reason-react.belt from styled-ppx.native davesnx/styled-ppx#487 (@davesnx) ## 0.57.1 - Remove public_name from alcotest_extra davesnx/styled-ppx#484 (@davesnx) - Fix nesting for selectors (and pseudo) in native davesnx/styled-ppx#483 (@davesnx) ## 0.57.0 - Improvement for locations in both code-gen and error reporting by @davesnx in davesnx/styled-ppx#456 - Support css min and max functions by @lubegasimon in davesnx/styled-ppx#411 - Update docs by @zakybilfagih in davesnx/styled-ppx#457 - update server-reason-react pin to main branch by @zakybilfagih in davesnx/styled-ppx#460 - Native support for styled.{{tag}} by @zakybilfagih in davesnx/styled-ppx#461 - Fix linear-gradient and radial-gradient by @davesnx in davesnx/styled-ppx#464 - Add getting started docs by @zakybilfagih in davesnx/styled-ppx#459 - escape curly on remote markdown content by @zakybilfagih in davesnx/styled-ppx#466 - Add Melange and native instructions by @davesnx in davesnx/styled-ppx#465 - Global styles for native server on emotion by @pedrobslisboa in davesnx/styled-ppx#468 - Style HTML tag by @pedrobslisboa in davesnx/styled-ppx#467 - [emotion native] Fix nested pseudoelements by @davesnx in davesnx/styled-ppx#470 - Transform with variable handle unsafe interpolation by @zakybilfagih in davesnx/styled-ppx#471 - Add depext for @emotion/css >= 11.0.0 by @feihong in davesnx/styled-ppx#473 - Add support for transition by @zakybilfagih in davesnx/styled-ppx#472 - Fix animation codegen by @zakybilfagih in davesnx/styled-ppx#475 - Fix error line number coming from parser by @zakybilfagih in davesnx/styled-ppx#478 - Polish emotion-native by @davesnx in davesnx/styled-ppx#481 - Rename `render_style_tag` to `get_stylesheet` (@davesnx) - Docs: Explain show server rendered stylesheets work natively by @ManasJayanth in davesnx/styled-ppx#480 ## 0.56.0 - Improvement for locations in both code-gen and error reporting (davesnx/styled-ppx#456) by @davesnx - Support css min and max functions (davesnx/styled-ppx#411) by @lubegasimon - Update docs (davesnx/styled-ppx#457) by @zakybilfagih - Native support for styled.{{tag}} (davesnx/styled-ppx#461) by @zakybilfagih - background-clip: text support by @davesnx - Fix linear-gradient and radial-gradient (davesnx/styled-ppx#464) by @davesnx - Rename emotion-hash into murmur2 and remove public testing cli by @davesnx - Use server-reason-react from opam by @davesnx
Resolves all issues with nesting media-queries and selectors when using emotion_native defined here: #359