Last active
December 17, 2015 05:18
-
-
Save tBaxter/5556564 to your computer and use it in GitHub Desktop.
Connecting SASS @content named media queries to JS.
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 { | |
&:after { display: none; } | |
@include breakpoint(s) { &:after { content: 'small'; } }; | |
@include breakpoint(m) { &:after { content: 'medium'; } }; | |
@include breakpoint(l) { &:after { content: 'large'; } }; | |
} | |
var screenSize = window.getComputedStyle(document.body,':after').getPropertyValue('content'); | |
Inspired by http://adactio.com/journal/5429/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment