CSS Variables in Media Queries
We can also change the value of a variable using media queries.
We will just see an example and see how it is done.
The topic of media queries will be covered later.
Now we will see Example -
Example - Here we first declare a new local variable named --color change for the .one class.
We set its value to blue.
Then we use it in the .one class further down.
Then, we create a @media rule that says "When the browser's width is 700px or wider, change the --color change variable value of the .one class to pink color."
Output 1 -
Output2-