No video

Changing CSS variables with JavaScript (CSS custom properties)

  Рет қаралды 7,638

Scrimba

Scrimba

Күн бұрын

🎓 View our courses: scrimba.com/li...
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.
💻 Check out the CSS variables course on Scrimba’s interactive learning platform: scrimba.com/le...
🌲 Linktree:
scrimba.com/li...

Пікірлер: 8
@tarcisiomateus1506
@tarcisiomateus1506 2 жыл бұрын
Thank you so much It's something so simple but till now I have not found someone how explained so clearly, Thank you
@thiagosilvaloopes
@thiagosilvaloopes 2 жыл бұрын
Thank you a lot!! Needed this to change the colors on my 7 segment display project 😄
@manuelvaal1257
@manuelvaal1257 Ай бұрын
I got what i wanted,thanks to u sir.
@em-arko
@em-arko Жыл бұрын
thank you so mutch it's so helpful
@AnimationWithZach
@AnimationWithZach 6 ай бұрын
*TYSM!!!*
@TheLionHitAgain
@TheLionHitAgain Жыл бұрын
thanks but why you still using var?
@benjaminmoseslieb9856
@benjaminmoseslieb9856 Жыл бұрын
love this, thanks1
@mehdirefiyev4235
@mehdirefiyev4235 Жыл бұрын
thank man 👍
Using CSS custom properties like this is a waste
16:12
Kevin Powell
Рет қаралды 168 М.
This Dumbbell Is Impossible To Lift!
01:00
Stokes Twins
Рет қаралды 37 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 651 М.
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
The problems with viewport units
13:23
Kevin Powell
Рет қаралды 360 М.
Learn Infinite Scroll in JavaScript
14:11
The Code Creative
Рет қаралды 28 М.
10 CSS Pro Tips - Code this, NOT that!
9:39
Fireship
Рет қаралды 2,2 МЛН
Are You Making These CSS Height Mistakes?
8:54
Web Dev Simplified
Рет қаралды 128 М.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Рет қаралды 470 М.
How to Change CSS Styles with JavaScript - Tutorial
9:58
Learn CSS Variables In 7 Minutes
7:20
Slaying The Dragon
Рет қаралды 39 М.
A Deeper Look at JavaScript's Style Property
12:17
dcode
Рет қаралды 4,1 М.
This Dumbbell Is Impossible To Lift!
01:00
Stokes Twins
Рет қаралды 37 МЛН