CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
SASS Media Query With Variable Declaration
AntonNiklasson
Permalink to comment
#
July 2012
I don't get why $color: blue runs. I figured the box should be red as long as the browser window is more than 100px wide.
Anyone?
http://codepen.io/AntonNiklasson/pen/sass_media_query_with_variable_declaration/
AntonNiklasson
Permalink to comment
#
July 2012
I found this:
http://stackoverflow.com/questions/9122195/using-sass-variables-with-css3-media-queries
So media queries are client-side, and since SASS is server-side this won't behave the way I wanted it. Too bad.
Add a Comment
Anyone?
http://codepen.io/AntonNiklasson/pen/sass_media_query_with_variable_declaration/
So media queries are client-side, and since SASS is server-side this won't behave the way I wanted it. Too bad.