Skip to content

Variables for media queries#13502

Closed
printercu wants to merge 1 commit intotwbs:masterfrom
printercu:media-queries
Closed

Variables for media queries#13502
printercu wants to merge 1 commit intotwbs:masterfrom
printercu:media-queries

Conversation

@printercu
Copy link
Copy Markdown

This allows use media queries like this:

@media @sm-only {
}
@media @md-up {
}

It also adds screen for all current media queries. I can remove it, if you think it's not necessary.

@cvrebert
Copy link
Copy Markdown
Collaborator

cvrebert commented May 4, 2014

It also adds screen for all current media queries.

Why?

@printercu
Copy link
Copy Markdown
Author

I've found #13014 is for the same purpose. Seems like this implementation is almost the same, except it'll takes less space in sass.

@printercu
Copy link
Copy Markdown
Author

Indeed i took the idea and some code from foundation, then adopted it for bootstrap :/. It also had screen rule.

@cvrebert cvrebert added the css label May 4, 2014
@printercu
Copy link
Copy Markdown
Author

Maybe it'll be better to remove this rule to be able to use this rules for other medias. And markup will remain responsive for all medias. I'll remove it right now.

@cvrebert
Copy link
Copy Markdown
Collaborator

cvrebert commented May 4, 2014

Also, landscape & portrait aren't used anywhere.

@cvrebert
Copy link
Copy Markdown
Collaborator

cvrebert commented May 4, 2014

I suspect that we'll end up preferring #13014, since it doesn't involve using raw string interpolation.

@printercu
Copy link
Copy Markdown
Author

I updated all media queries in project. What do you think about @float-breakpoint-up, @float-breakpoint-blow? There is one point whre @xs-below can be used https://github.com/twbs/bootstrap/blob/master/less/navbar.less#L95 Should I add this value?

@printercu
Copy link
Copy Markdown
Author

Sorry, missed. So should i close PR in favor of #13014?

@printercu
Copy link
Copy Markdown
Author

I think this method is more readable and follows less surprise principle.

@cvrebert
Copy link
Copy Markdown
Collaborator

cvrebert commented May 4, 2014

@mdo will decide between this PR and the other PR.

@cvrebert
Copy link
Copy Markdown
Collaborator

cvrebert commented May 4, 2014

@screen-xs-min is absurd to begin with; don't bother trying to accommodate the one media query that involves it.

@mdo
Copy link
Copy Markdown
Member

mdo commented May 13, 2014

Punting on this one.

@mdo mdo closed this May 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants