Cssclass define only for a certain area on the page?


is it possible to define a cssclass: “xyz” that i created in a css file, not only in the frontmatter for the whole page?

I want to define or output a cssclass only for a certain area on the page.

i have a cssclass for checkboxes that are output via dataviewjs, i have hidden this.

in another place on the same page i have checkboxes, these should be shown…
is it possible somehow?

You can only set a cssclass for the whole page, but in your CSS you can combine that class with other things to target more narrowly. For example (made-up with probably wrong elements), if your DataView checkboxes are checkbox elements which have the dataview class assigned to them, and you assign the cssclass “test” to the page, you could put in your snippet:

.test checkbox.dataview {/*styles*/}
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.