Skip to content

Instantly share code, notes, and snippets.

@egid
Last active December 18, 2015 23:39
Show Gist options
  • Save egid/5863245 to your computer and use it in GitHub Desktop.
Save egid/5863245 to your computer and use it in GitHub Desktop.
variation of https://github.com/less/less.js/issues/965#issuecomment-17483536 designed to duplicate the content of a media query for IE8
/*
Usage: the caller must have .content declared in its scope!
*/
.mobile() {
@media all and (min-width: 480px) {
.content;
}
.ie-lt-ie9 &{
.content;
}
}
// demo: try at http://less2css.org/
.foo {
.content() { //this will be injected into .mobile mixin
width: 500px;
font-size: 100%;
} .mobile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment