CSS generated classes

Hey devs,

I see many CSS classes, apparently unique, used in many places in the page source code, for example :

.css-lgx7ok
.css-bjsf4c
.css-xi606m
// etc ...

Are they generated once and for all, or are they likely to be modified / disappear when published?

Because that’s sometimes quite handy :slight_smile:


Ha and I never got a response to this post, somewhat related:

@artur FYI.
Seperated note from Published/Not published case => these classes (css-xxxxx type) are supposed to be modified over the time, no?

@yannick Relying on underlying classes (classes without .css-xxxx, which always exist, like MuiStackRoot, MuiButtonBase-root etc…) + using pseudo-classes is a better call. Not sure you will be able to maintain everything overtime.

Merci @matthieu_chateau !

I’d love to, but sometimes overwriting in css has no effect.
And accessing the Xth container seems a bit risky.

BTW, Is there a doc or a page where I can learn more about the MuiStackRoot, MuiButtonBase-root structure?


One solution that could be so practical is to be able to manually add a class to all elements (see how Elementor does it, below).

For-CSS-classes-article-the-advanced-tab