Entry Post

The Three Levels of CSS Variables

Post Content

This is a framework for using CSS Variables in web projects.

  1. Absolutes
  2. Generics
  3. Specifics

Absolutes

html.css-variables
{
     --color--super-red: hsl(0, 91%, 50%);
}

Generics

html.css-variables
{
    --negative-pri-color: var(--color--super-red);
}

Specifics

.delete-action
{
    background-color: var(--negative-pri-color);
    color: white;
}
Comments

There are no comments.

Compose Comment