Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit CSS to certain sections of a page #438

Open
peterbenoit opened this issue Mar 15, 2022 · 1 comment
Open

Limit CSS to certain sections of a page #438

peterbenoit opened this issue Mar 15, 2022 · 1 comment

Comments

@peterbenoit
Copy link

Hi!

Sorry if this is covered somewhere, but I couldn't find any documentation on how to limit the CSS selectors to specific page content? We'd really only want this working on anything inside of <main>, everything else is part of a template and results appearing there will only be confusing to our content editors.

Is this possible?

@ffoodd
Copy link
Owner

ffoodd commented Mar 16, 2022

For now, the only way I can think of is building the CSS file on your own, from the Sass sources.

You can check a11y-en.scss as a basis, and wrap the whole import block with main {}. I'm not totally sure it'll work as-is, please tell me if you try this. 😄

This is an interesting idea though, so I may come with a better idea (and maybe find a way to support this feature in a11y.css core).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants