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

Wrong(?) media queries in .make-xs-column-* #12913

Closed
nenebale opened this issue Mar 4, 2014 · 9 comments
Closed

Wrong(?) media queries in .make-xs-column-* #12913

nenebale opened this issue Mar 4, 2014 · 9 comments

Comments

@nenebale
Copy link

nenebale commented Mar 4, 2014

Hi :)

The media queries in the three .make-xs-column-* mixins make them ineffective under a viewport width of @screen-xs-min.

Am I using them wrong (see example below) or are this media queries misplaced?

Thank you for your help!

My code:

.logo {
  background: url('logo-text.svg') left top no-repeat;
  background-size: 100% auto;
  height: 200px;

  @include make-xs-column(8);
  @include make-xs-column-offset(2);

  @include make-sm-column(5);
  @include make-sm-column-offset(3.5);

  @include make-md-column(4);
  @include make-md-column-offset(4);

  @include make-lg-column(3);
  @include make-lg-column-offset(4.5);
}

Mixins:

.make-xs-column-offset(@columns) {
  @media (min-width: @screen-xs-min) {
    margin-left: percentage((@columns / @grid-columns));
  }
}
.make-xs-column-push(@columns) {
  @media (min-width: @screen-xs-min) {
    left: percentage((@columns / @grid-columns));
  }
}
.make-xs-column-pull(@columns) {
  @media (min-width: @screen-xs-min) {
    right: percentage((@columns / @grid-columns));
  }
}
@mdo mdo added the css label Mar 4, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented Mar 4, 2014

I agree that this seems strange. The very concept of @screen-xs-min sounds wonky; there isn't supposed to be a minimum width for an XS screen, only a maximum (the boundary between it and SM screens). I suppose the grid column padding de facto imposes a minimum though, but even that's 360px, not 480px like @screen-xs-min.

X-Ref #11228 ?

@mdo
Copy link
Member

mdo commented Mar 4, 2014

Yeah, seems we should probably remove the media queries there, right? The grid.less xs tier is unbound (no media queries at all).

@mdo mdo added this to the v3.2.0 milestone Mar 4, 2014
@mdo mdo closed this as completed in 1c66f30 Mar 4, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented Mar 4, 2014

@mdo Shouldn't we also deprecate @screen-xs-min?

@mdo
Copy link
Member

mdo commented Mar 5, 2014

Added a comment, not sure what else there is do.

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 5, 2014

That should be sufficient. 😄 After your other changes, we don't use that var anywhere anymore.

ithcy pushed a commit to stevelaz/bootstrap that referenced this issue Mar 6, 2014
* upstream/master: (45 commits)
  fix twbs#12936
  Run `grunt update-shrinkwrap`
  [email protected]
  Fixes twbs#12901: Refactors list group active state for use on non-anchors
  nav
  Fixes twbs#12848: Account for and document progress bars at 0-3%
  use full version number in deprecation note
  clarify deprecation /cc @cvrebert
  Fixes twbs#12697: Document readonly inputs
  docs for twbs#12873
  grunt after merging twbs#12917
  Grunt after merging twbs#12863
  grunt
  Fixes twbs#12868: Enables icon feedback on validation states for large/small inputs.
  Fixes twbs#12913: Remove scoped media queries from custom xs grid mixins
  Fixes twbs#12914: Darken immediate children hr elements in jumbotrons
  Fixes twbs#12916: Don't let .lead resize on viewport change
  add svg logos to brand guidelines
  Update csscomb properties. 'colon-spac'e and 'stick-brace' don't take boolean values.
  grunt
  ...

Conflicts:
	dist/css/bootstrap.css.map
	dist/css/bootstrap.min.css
cvrebert added a commit that referenced this issue Apr 1, 2014
By definition, XS screens have no minimum size, only a maximum size.
(Symmetrically, LG screens have no maximum size, hence why there's no @screen-lg-max.)
@carasmo
Copy link

carasmo commented Oct 13, 2014

@media (max-device-width: @screen-xs-min) and (orientation: landscape) this is used in the navbars.less -- what is the replacement for @screen-xs-min? Thanks!

@cvrebert
Copy link
Collaborator

@carasmo There isn't one, because the concept is absurd. There is no maximum for the LG breakpoint, and there is symmetrically no minimum for the XS breakpoint.

@carasmo
Copy link

carasmo commented Oct 13, 2014

Ahh, yes I get why it's absurd, but what do you put here in the navbars.less file for @media (max-device-width: @screen-xs-min) and (orientation: landscape) if it's gone? Just leave as is?

@cvrebert
Copy link
Collaborator

It's a hack for something. Should be gone in v4 when we're able to redo navbars.

stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
By definition, XS screens have no minimum size, only a maximum size.
(Symmetrically, LG screens have no maximum size, hence why there's no @screen-lg-max.)
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