Skip to content

Guards on media queries #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ESchuderer opened this issue Jun 25, 2013 · 4 comments
Closed

Guards on media queries #1384

ESchuderer opened this issue Jun 25, 2013 · 4 comments

Comments

@ESchuderer
Copy link

I'd love something like this:

@responsive: true;

@media (max-width: 200px) when (@responsive) {
  width: 80%;
}

Instead of

.responsive () when (@responsive) {
  @media (max-width: 200px) {
    width: 80%;
  }
}
.responsive;
@ldetomi
Copy link

ldetomi commented Jul 16, 2014

+1 I agree with InitArt

@SomMeri
Copy link
Member

SomMeri commented Jul 19, 2014

Guards on selectors are already allowed #748.

@lukeapage
Copy link
Member

the best you can do at the moment is this

& when (@responsive) {
  @media (max-width: 200px) {
    width: 80%;
  }
}

@seven-phases-max seven-phases-max changed the title Guards on selectors / media queries Guards on media queries Jan 16, 2016
@stale
Copy link

stale bot commented Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 14, 2017
@stale stale bot closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants