#Future-proofing CSS Selectors
1 messages · Page 1 of 1 (latest)
Future proofing ur css can be done by using wildcards
e.g. [class*="profileEffects"]
it may need to be narrowed down a bit more, but it won't break after a discord update.
Here are the different things you can do:
/*
Disclaimer: These patterns don't match individual classes, but the entire class string.
To be precise they match an HTML property.
E.g. <div class="smth profileEffects-km5xa2"></div>
You would be matching against the "smth profileEffects-km5xa2" part.
*/
/* Wildcard */
[class*="profileEffects"] {}
/* startsWith */
[class^="profileEffects"] {}
/* endsWith */
[class$="profileEffects"] {}
oh cool, thanks for the css tip