Skip to content
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

Request: Add media query breakpoints as variables to variables.less #15850

Closed
fatcrobat opened this issue Feb 20, 2015 · 1 comment
Closed

Request: Add media query breakpoints as variables to variables.less #15850

fatcrobat opened this issue Feb 20, 2015 · 1 comment

Comments

@fatcrobat
Copy link

Is it possible to add the following to variables.less, it makes media query handling much more compfortable.

@xs: ~"(max-width: @{screen-xs-max})";
@sm: ~"(min-width: @{screen-sm-min}) and (max-width: @{screen-sm-max})";
@md: ~"(min-width: @{screen-md-min}) and (max-width: @{screen-md-max})";
@lg: ~"(min-width: @{screen-lg-min})";

@sm-min: ~"(min-width: @{screen-sm-min})";
@md-min: ~"(min-width: @{screen-md-min})";
@lg-min: ~"(min-width: @{screen-lg-min})";

@xs-max: @xs;
@sm-max: ~"(max-width: @{screen-sm-max})";
@md-max: ~"(max-width: @{screen-md-max})";

Usage example:

@media @xs{
.container{
  padding-left: 0;
  padding-right: 0;
}
}

Thanks for having bootstrap. 👍

@cvrebert
Copy link
Collaborator

Approximate duplicate of #13014, a variation of which is already part of Bootstrap v4's code.

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

2 participants