davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
399 stars 32 forks source link

fix poorly rendered nested selectors #404

Closed lubegasimon closed 5 months ago

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **styled-ppx** | ⬜️ Ignored ([Inspect](https://vercel.com/davesnx/styled-ppx/93JxXonddXx423jozD114SCS95Y3)) | [Visit Preview](https://styled-ppx-git-fork-lubegasimon-fix-nesting-of-s-44242e-davesnx.vercel.app) | | Jan 11, 2024 11:13am |
davesnx commented 8 months ago

I expected the following tests to be there:

.one_level { &.without_space { color: blue } };

.one_level { & .with_space { color: blue } };

.one_level { &.$(with_interpolation) { color: blue } };

.one_level { & .$(space_with_interpolation) { color: blue } };
.two_levels { & .first_level { & .second_level { color: blue } } };

...
.without_ampersand { .one_level { color: blue } }; // expects an space here
.$(interpolation_at_the_start) { & .one_level { color: blue } };
#using_ids { & .one_level { color: blue } };
[using_attrs] { & .one_level { color: blue } };
lubegasimon commented 8 months ago

I expected the following tests to be there: ...

Thank you, I am happy to add them