Custom Classes in Elements

Hey @dan , Will it be possible to custom name divs, classes, etc. I believe this will make it possible to better target/isolate specific design features at a container level. Especially helpful with making the websites more accessible.

Hey @Flash.

Great question!

Right now we support custom css classes on all Elements. I’ve just spoken with @ben and we think it might be worth offering a way to select what DOM element is used, i.e. <main> or <section> on certain Elements.

Can you give us a few examples of how you’d like to use such a feature? or perhaps how you use it with existing frameworks in Stacks?

Cheers,
Dan

1 Like

This is good news. Well, it’s a little difficult to provide specific examples, but in general, if I can isolate CSS to specific containers, I can fully design them without affecting other containers. If implemented really well, it’s possible to design at the element level without adding a bunch of extra containers. This obviously saves on additional containers and layers, making it faster and less complicated.

EDIT: The saved styles that are already present are awesome! This is just in the hopes of isolating things to a single container and element. Sometimes global styling is not what you want. :upside_down_face:

1 Like

Ooh, I quite like the idea of being able to specify which DOM elements are used with certain elements. Being somebody who use to enjoy writing HTML by hand and worrying about semantics, I could see this being useful; when listing article summaries, creating different sections, denoting the main region of content vs asides, etc.

2 Likes

Yeah, that’s what I was trying to say.