a11y.css icon indicating copy to clipboard operation
a11y.css copied to clipboard

Limit CSS to certain sections of a page

Open peterbenoit opened this issue 3 years ago • 1 comments

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?

peterbenoit avatar Mar 15 '22 17:03 peterbenoit

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).

ffoodd avatar Mar 16 '22 11:03 ffoodd