Changing CSS variables with JavaScript (CSS custom properties)

preview_player
Показать описание

In this video, we learn how to change a CSS variable using JavaScript.

CSS variables (aka custom properties) are a big win for front-end developers. They provide the power of variables to CSS, which results in less repetition, better readability and more flexibility.

Unlike variables from CSS preprocessors, CSS variables are a part of the DOM, which has many benefits.

🌲 Linktree:
Рекомендации по теме
Комментарии
Автор

Thank you so much

It's something so simple but till now I have not found someone how explained so clearly,

Thank you

tarcisiomateus
Автор

Thank you a lot!! Needed this to change the colors on my 7 segment display project 😄

thiagosilvaloopes
Автор

thank you so mutch it's so helpful

em-arko