Question regarding class IDs - Dawn theme 15.0.1

Solved

Question regarding class IDs - Dawn theme 15.0.1

adkowaty
Excursionist
37 0 2

 

Hello,

I have a question about class IDs. Are they changing automatically? I noticed that my website has lost some of its CSS, and it seems that some classes have updated on their own.

For example, today I noticed a class like this changed: Option-quickadd-template--22236008317256__main-0

 

Is it not a good practice to use this kind of class to target elements?

Thanks in advance for your reply.

 

Best regards,
Adrian

Accepted Solution (1)

Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @adkowaty.,

 

Since dynamic class IDs can change, I recommend adding a common class to the elements you want to target. This will ensure consistent styling. Once added, you can create your styles based on that new class rather than relying on dynamically generated ones.

 

Let me know if you need further assistance!

 

Regards,

Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

View solution in original post

Reply 1 (1)

Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @adkowaty.,

 

Since dynamic class IDs can change, I recommend adding a common class to the elements you want to target. This will ensure consistent styling. Once added, you can create your styles based on that new class rather than relying on dynamically generated ones.

 

Let me know if you need further assistance!

 

Regards,

Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com