web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.43k stars 133 forks source link

[Feature]: Customising html element/docs example #1152

Open zmzlois opened 5 months ago

zmzlois commented 5 months ago

What problem does this feature solve?

Documentation example on grainular targeting element within element (with tailwind layers sometimes it works, sometimes it doesn't, very fickle) at the moment if I target h2 all navbar will look weird

What does the proposed API look like?

stated above, maybe even just some docs example would work.

example:

@layer base {
ol {
li {
@apply !mt-2;
}
h2 {
font-weight: 500;
}
p {}
}
}
Timeless0911 commented 5 months ago

Please modify the global style carefully. It is better to control the scope and granularity of the effect.