Wednesday, January 14, 2015

CSS colors

http://sixrevisions.com/css/css-colors/  is an awesome post to explain the basics of CSS colors.

There are six ways to declare CSS colors:
  • Hexadecimal notation
  • RGB
  • RGBA
  • HSL (Hue, Saturation and Lightness)
  • HSLA
  • Color keywords
transparent Color Keyword
The transparent color keyword is simply a way to say that the color has 0% opacity.

currentColor Color Keyword
The currentColor color keyword is a convenience keyword that just means the color being declared is equal to the CSS color property value.

As we write SASS for CSS, I think it is best practice to use variable and hex color definition.

No comments:

Post a Comment