Do CSS functions exist?

前端 未结 9 1679
我在风中等你
我在风中等你 2021-01-04 11:08

I\'m not sure what to call this, but basically let\'s say I have a style that I use a lot,

.somepattern{
    font-size:16px;
    font-weight:bold;
    borde         


        
9条回答
  •  遥遥无期
    2021-01-04 11:46

    I've come to realize through the comments of others that this solution overcomplicates the problem at hand. This solution works but there are easier and better alternatives that do not depend on server-side scripting.

    You can actually control your stylesheet if you make it a php file stylesheet.php?fontsize=16 and then inside your stylesheet you can retrieve the variable

      
    
     .somepattern{
       font-size: $fontsize;
       font-weight:bold;
       border:2px solid red;
       }
    

提交回复
热议问题