vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.01k stars 2.1k forks source link

Put all styles in `@layer` for lowered specificity #4125

Closed felix-bohlin closed 2 months ago

felix-bohlin commented 2 months ago

Problem I'm trying to solve: I want to use Vitepress to document my own component library. The issue I have is that Vitepress' own styling sometimes override my own components. By putting all of Vitepress' own styles inside @layer we lower the specificity of those styles and make sure they are easily overridden.

brc-dd commented 2 months ago

It doesn't meet our current baseline (Chrome/Edge >= 88, Firefox >= 78, Safari >= 14).

felix-bohlin commented 2 months ago

@brc-dd Ah, too bad. Thanks for your reply! :)