Skip to content

Instantly share code, notes, and snippets.



Created Jun 11, 2015
What would you like to do?
Linking JS and CSS for media queries
// @media all and (min-width: 45em) {
// body:after {
// content: 'Splus';
// display: none;
// }
// }
var size = window.getComputedStyle(document.body,':after').getPropertyValue('content');
if (size.indexOf("Splus") !=-1) {
// Do stuff.

This comment has been minimized.

Copy link
Owner Author

@benfrain benfrain commented Jun 11, 2015

Amended from:
Use this all the time to link CSS/JS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment