Closed McManning closed 1 year ago
Here's mantine's approach: https://mantine.dev/theming/mantine-provider/#usage
Essentially, the provider can optionally apply global styles (fonts, headings, etc) and optionally provide normalization. If, say, we're integrating with something like Docusaurus that uses Infima to apply global styles, I wouldn't want RUI to override those globals. But I want RUI to specify sane defaults for nested content.
At the very least, I think having options on the provider to normalize before content within the provider makes sense.
Obsolete in beta.1
Trying to integrate RUI 5 components with Docusaurus results in some interesting results due to our aggressive TailwindCSS reset.
How docs originally look (out of the box classic theme):
With the RUI styles imported:
I'm not against making a whole Docusaurus theme with RUI - but it'd be nice if we could also embed and have things play nicely together since this will be a future problem with other products.
I know some libraries (Mantine?) have a setting of some sort that allows you to specify whether or not resets are applied. Or we apply resets specifically to the RUIProvider scope and touch nothing outside of there.
GraphiQL uses the "just apply within the container" approach as well for resets. E.g.: