Workaround for CSS variables in IE?

后端 未结 10 1795
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:59

    In case someone comes across this, has a similar issue where I had it set like this.

    a {
      background: var(--new-color);
      border-radius: 50%;
    }
    

    I added the background colour before the variable so if that didn't load it fell back on the hex.

    a {
      background: #3279B8;
      background: var(--new-color);
      border-radius: 50%;
    }
    

提交回复
热议问题