DEV Community

Esther mueni
Esther mueni

Posted on

1

CSS Variables

Today, I came across an Hashnode article on CSS variables and realized I have quite forgotten a lot about CSS. This was among the first things I learned when I joined the tech world but I almost could not remember how to use CSS variables. How disappointing is the human memory!!

What I learned:

  • You can create a global variable ( covers all sections of the page) or a scoped variable to a specific region eg. for a section or div.

Here is the link to the codepen I did on the same. https://codepen.io/3sther-m/pen/eYGjqWm

Simple but its something new I learned; I step at a time.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay