$primary-color: #fc9a0e;
$secondary-color: #f76714;
$accent-color: #fc9a0e;


  • 4
    --primary-color: #fc9a0e;
    --secondary-color: #f76714;
    --accent-color: #fc9a0e;

    Beyond using sass when css can handle it.... why did I write that color twice 🤦‍♂️
  • 1
    @C0D4 Unfortunately IE doesn't support CSS Variables :(
  • 0
    @Marl3x and more importantly, css variables are ugly af
  • 2
    @Marl3x yeah? And tube TV's don't support 144hz.
  • 0
  • 2
    @Marl3x point being we don't worry about the capabilities of obsolete tech!
  • 1
    @AlgoRythm ah, I would love to do that but a lot of people still use IE. And I for example want to reuse my styles for different projects, so I have to look out for these things.
  • 2
    @Marl3x how many users actually use you're websites with IE11 - go past 30 days.
    Now, out of that number, how many of those users do you make money off - excluding advertising.

    Css = ugly?
    Yet the sass version is the same thing 🤷‍♂️
  • 0
    @Marl3x almost nobody uses IE. Last time I checked their usage was less than 5% and dropping sharply. It is a security risk, officially unsupported, and even hidden in Windows 10. Even Windows 7, the last operating system to actually use IE, is officially losing support.

    We're seeing major companies ditch support for IE, like GitHub.

    IE is finally truly dying.
  • 0
    @C0D4 My workplace still lives in the 90s, we haven't even fully converted to a C/S infrastructure, but I still want to reuse the things I do for work for my own projects so...
  • 1
    @inaba if you find css variables ugly, you can always store them in a sass variable.

    So you get something like:

    :root {
    --primary-color: #ffffff;

    $primary-color: var(--primary-color);

    Than you can use sass variables in your code, while having the benefits of css variables.

    IE is still a problem, but there are some polyfills around to "fix" it if you want to support it.
Add Comment