Move common, trailing pseudo elements when generating selectors
Fixes #280
There are some bugs in Tailwind's own selector rewriting for variants but also some bugs in our own selector rewriting. Use postcss-selector-parser to more properly handle selector rewriting of trailing pseudo elements.
This fixes the selector rewriting to check all simple selector sequences in each of the keys in theme.typography.*.css and extracts ::before, ::after, ::marker, and any other pseudo element only when they're the same across each of the selectors — including order. The reason for this is that it's possible in the future stacked pseudo elements could become a thing (there's a note in the CSS spec somewhere — but I forget where) meaning ::marker::before could mean something different from ::before::marker (even though both don't make sense or do anything right now).
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| tailwindcss-typography | ✅ Ready (Inspect) | Visit Preview | Aug 17, 2022 at 5:40PM (UTC) |