consider using cascade layers #1048
Replies: 2 comments 8 replies
-
Definitely on our radar, thanks @mayank99! Our current browser support matrix includes Chromium v88–98 which don’t support |
Beta Was this translation helpful? Give feedback.
-
Is there a wat we can place starlights styles manually in a I'm building Fulldev UI (an Astro ui component library https://ui.full.dev/) and I want the styles of the components to have low specificity so that they can be overwritten with Tailwind, Unocss etc. Because of the low specificity (because styles are placed in a @layer fulldev {}, the starlight style reset overwrites the component styles. The not-content class allows us to prevent some styling, but not all. Tailwindcss V4 looks like it's going to use CSS layers too: https://tailwindcss.com/blog/tailwindcss-v4-alpha |
Beta Was this translation helpful? Give feedback.
-
What version of
starlight
are you using?0.12.0
What is your idea?
Currently evaluating starlight for a docsite (already using Astro) which makes heavy use of cascade layers for all of its styles. It would help if Starlight wrapped all of its styles in a cascade layer (either by default or opt-in). Alternatively, provide a manual way to import Starlight styles. Would this be possible?
Why is this feature necessary?
Cascade layers are a sort of "all or nothing" feature. Starlight's unlayered styles will take preference over even the highest priority cascade layer, which causes varying amounts of frustration depending on where the custom styles are meant to go.
With all Starlight styles wrapped in a specific layer, it allows the author to add styles both before and after starlight's styles, without any specificity battles. The basic order would be something like this:
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions