Skip to content

24 ways to impress your friends

Vote down?

Richard

I am fairly ambivalent towards the use of constants generally in CSS due to the convenience vs performance dilemma however I do believe that constants should be allowed in the case of the following statement type:

background: url(https://10.10.10.10/img/myimage.png) bottom right no-repeat;

where one references external image files within the CSS file itself – in my opinion it is completely redundant and potentially dangerous to have to re-reference a path location again and again if you are using a particular path to store image files in that are referenced as styles

In fact in this context i feel fairly strongly that one should be able to pass parameters in the CSS file call as it would then allow one to flexibly determine where external files called from within the CSS file will live …but alas i is not to be