D
D
denis26012018-04-11 00:36:57
css
denis2601, 2018-04-11 00:36:57

Escaping in SASS?

:root {
--color: 240, 240, 240;
}

.base-bg {
  background:  rgba(var(--color), 0.92);
}

There is such a style, the whole thing compiles to sass, but gives an error i.e. sass has a built-in rgba function that even converts the HEX color format to RGB, so in order for such a construction to compile and start working, you need to escape this function. How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forspamonly2, 2018-04-11
@denis2601

update sass.
he knows how to do this for several months as https://github.com/sass/dart-sass/releases/tag/1.0...

var() may now be passed in place of multiple arguments to rgb(), rgba(), hsl() and hsla().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question