loading...

re: CSS Custom Properties (vars) with SASS/SCSS, a practical architecture strategy VIEW POST

FULL DISCUSSION
 

Hi, you say about prefix to avoid conflict => "and in the case of CSS Custom Properties, also add a prefix to avoid conflicts", point me please where and how it can happen ?

Thanks for article, very useful,
Alex

 

There are some cases:

  1. If you have a very large codebase, you can use those prefixes as namespaces, to avoid name conflict on your own codebase.

  2. If you load a CSS Lib that uses a variable name with same name as yours, that also would be a problem.

  3. If your Styles will be used along a very large or distributed application, you dont know what kind of code already lives there, so better to use prefixes to keep everybody safe,

 

It's clear now,
Thanks a lot

Code of Conduct Report abuse