Assistance Needed with Persistent CSS Classname Change

Hi Glide team

I’ve created custom CSS to apply a drop shadow by targeting specific class names. Initially, this approach works well, but after a few days, the styles stop applying. Upon inspection, I found that the class names keep changing, which requires me to update the CSS repeatedly. This issue has occurred multiple times.

Could you please guide me on how to address this problem correctly? I’ve provided examples of the scenarios I’ve encountered.

Thank you for your assistance!




Best regards,
Vanlal

As you have found out, you’re using unstable class names there and those change all the time. Please inspect the underlying HTML structure again, find stable class names and target them like this: div[class*="stable part here"].

It’s just an example, use div, button, span, p etc. depends on what you want.

1 Like

If I were to avoid using *= due to its matching all substrings, simply writing the class as .class would effectively target all elements that contain it.

1 Like

In addition to the issue of stability in class name selection, it’s important to note that // is used for comments in JavaScript, while in CSS, comments should be written as /* ... */. If a comment is not properly closed with */, it can cause all the subsequent CSS code to become ineffective.

1 Like