CSS Variable Trouble

Hello I’m having a difficult time applying css variables in to my own work on atom ide. I was able to accomplish it on the lesson free code camp provides for the penguin but not now. I also have been using brave browser to view my HTML page and am wondering if compatible. Used very basic example.

:root { --red: #ff6f69; } h1 { var(--red); }

You need to use the variable in a css rule
Like background: var(--red);
You just put the variable there without any rule…

1 Like

Wow okay thank you. :expressionless:

I can see myself making this mistake in the future (if I end up using variables, I often do everything “manually” via atom autocomplete+ speed-typing)