Workaround for CSS variables in IE?

后端 未结 10 1800
Happy的楠姐
Happy的楠姐 2020-12-13 17:02

I\'m currently developing a web application in Outsystems in which I have the need to customize the CSS, in which I\'m using variables. I need to guarantee the app works cro

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 17:50

    I recommend setting your css variables as sass variables, then using sass interpolation to render the color in your elements.

    :root {    
        --text-color: #123456;
    }
    
    $text-color: var(--text-color);
    
    body {
        color: #{$text-color};
    }
    

提交回复
热议问题