Your example is a bit overkill for a basic task. You can simply do the following: jsfiddle.net/4k9aj0zc/1/ .. you don't really need to make it complex with the empty var trick.
That is a nice approach, but it's almost similar to directly setting the property like background-color: ... in the media query.
background-color: ...
This is a basic demo but I added the complexity for understanding. I don't want people wondering "where did this undefined variable come from" etc.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your example is a bit overkill for a basic task. You can simply do the following: jsfiddle.net/4k9aj0zc/1/ .. you don't really need to make it complex with the empty var trick.
That is a nice approach, but it's almost similar to directly setting the property like
background-color: ...
in the media query.This is a basic demo but I added the complexity for understanding. I don't want people wondering "where did this undefined variable come from" etc.