web-infra-dev / rspress

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

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

Open zmzlois opened 3 weeks ago

zmzlois commented 3 weeks 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 3 weeks ago

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