AleshaOleg AleshaOleg - 4 months ago 20
CSS Question

Add custom background-color in Atomic CSS

I'm using Atomic CSS, and I'd like to set for element a

background-color
, with a help of
Bgc(value)
.

I tried, set it with
Bgc(#FF0)
or
Bgc(rgb(255, 255, 0))
, but Atomic compiler, didn't write to my stylesheet file, from this rules.

Answer

You need to use lowercase for color values:

To prevent redundancy, we made the choice to favor lowercase over uppercase, even though the latter is valid.

This is because classes such as C(#fff) and C(#FFF) would not duplicate the declaration but would add an unnecessary selector to the style sheet.