Created
December 2, 2011 00:32
-
-
Save philoye/1420982 to your computer and use it in GitHub Desktop.
problem with sass media queries + variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'fssm' | |
gem 'sass', git: 'git://github.com/nex3/sass.git', branch: 'master' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT | |
remote: git://github.com/nex3/sass.git | |
revision: a6a80a8a594d9a1f904b931ff4facf88bc4908b4 | |
branch: master | |
specs: | |
sass (3.2.0.alpha.0) | |
GEM | |
remote: http://rubygems.org/ | |
specs: | |
fssm (0.2.7) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
fssm | |
sass! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec sass --watch style.sass:style.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: #eeeeee; } | |
.page { | |
width: 920px; | |
background-color: white; } | |
@media screen and (max-width: 320px) { | |
.page { | |
width: 100%; } } | |
@media screen and (max-width: $px) { | |
.page { | |
width: 500px; } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=respond-to($media) | |
@if $media == phone | |
@media screen and (max-width: 320px) | |
@content | |
@if $media == tablet | |
@media screen and (max-width: 768px) | |
@content | |
=respond-max($px) | |
@media screen and (max-width: $px) | |
@content | |
body | |
background-color: #eee | |
.page | |
width: 920px | |
background-color: #fff | |
+respond-to(phone) | |
width: 100% | |
+respond-max(768px) | |
width: 500px | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oops, I didn't read that pull request closely enough. That wasn't merged in at all, but @chriseppstein says an implementation is in the works.