Skip to content

added .pull-left/right-{screen size} layout utilities#11983

Closed
andrewscofield wants to merge 2 commits into
twbs:masterfrom
andrewscofield:master
Closed

added .pull-left/right-{screen size} layout utilities#11983
andrewscofield wants to merge 2 commits into
twbs:masterfrom
andrewscofield:master

Conversation

@andrewscofield
Copy link
Copy Markdown
Contributor

These are useful in situations where you have a layout like at the top of the Narrow Jumbotron Template:

http://getbootstrap.com/examples/jumbotron-narrow/

If the navigation on the top right had the below .pull-right-sm it would be a normal block level item up to the sm breakpoint, preventing the 'Project Name' from awkwardly folding up and wrapping.

Comment thread less/responsive-utilities.less Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @screen-XX vars are deprecated. Use @screen-XX-min instead.

@cvrebert
Copy link
Copy Markdown
Collaborator

Implementation of #11259.

@andrewscofield
Copy link
Copy Markdown
Contributor Author

fixed those changes you mentioned @cvrebert

@cvrebert
Copy link
Copy Markdown
Collaborator

Still missing spaces before some curly braces.

@cvrebert
Copy link
Copy Markdown
Collaborator

Assuming mdo were to approve of this feature, it would also need documentation.

@mdo
Copy link
Copy Markdown
Member

mdo commented Dec 23, 2013

Not so sure I want to add this. We're getting a little ahead of ourselves with this kind of stuff.

@zlatanvasovic
Copy link
Copy Markdown

Ok ok, this isn't bad feature, but what is its real usage? How do you want to use it?

I don't see a point to float element to right on small screens, but not float it on large screens.

@andrewscofield
Copy link
Copy Markdown
Contributor Author

@mdo I'd consider it the mobile first version of pull-left/right. Allow somebody to setup floats on items above a breakpoint without having to set an override for mobile. The alternative is to add this media query code to every class that needs to be left as block level up to a certain breakpoint.

@zdroid Its actually just the opposite. Its for floating on larger screens but not mobile.

@thomasgohard
Copy link
Copy Markdown

A requirement for this functionality has been identified in issue wet-boew/wet-boew#4191.

As indicated by @apotropaic, the use case is to only float an element from a particular breakpoint on. Currently it's all or nothing, but it doesn't always make sense to float a particular element on small screens, only on larger ones.

@leejordan
Copy link
Copy Markdown

I have this exact requirement right now where I need elements (in this case a button) to float to the right of their column at larger sizes, but when columns are stacked below the "sm" breakpoint, the float no longer makes sense and they should be aligned to the left instead. I can obviously handle this myself but just wanted to chime in with another real world use case.

@cvrebert
Copy link
Copy Markdown
Collaborator

I think that .pull-reset-* (or similar, that would undo a float) classes would also be needed for completeness.

@zlatanvasovic
Copy link
Copy Markdown

Haha! I had an idea for .pull-reset, just a class which has float: none;
style. :D

2014/1/23 Chris Rebert notifications@github.com

I think that .pull-reset-* (or similar, that would undo a float) classes
would also be needed for completeness.


Reply to this email directly or view it on GitHubhttps://github.com//pull/11983#issuecomment-33109589
.

Zlatan Vasović - ZDroid

@mdo
Copy link
Copy Markdown
Member

mdo commented Jan 24, 2014

We'll pass on this for now. Sounds nice, but just like with the other grid tiers and responsive utilities, I'm super meh on adding all these utility classes that may or may not get used.

@mdo mdo closed this Jan 24, 2014
@cvrebert
Copy link
Copy Markdown
Collaborator

😞

@mdo
Copy link
Copy Markdown
Member

mdo commented Jan 24, 2014

@cvrebert Was this really something we wanted us to add? If so, make a case for it <3.

@zlatanvasovic
Copy link
Copy Markdown

@mdo I think he just wanted .pull-* be responsive. Currently it isn't. Breakpoint (like for navbar) should be good.

I just don't know is the adding breakpoint good with semver. It fixes a responsivity bug, which is important to Bootstrap (it's mobile-first), so it's worth breaking the semver rules.

@zlatanvasovic
Copy link
Copy Markdown

@apotropaic Does this affect examples? Looks like jumbotron example isn't reponsive.

@andrewscofield
Copy link
Copy Markdown
Contributor Author

@zdroid I'm not sure I know what you mean. This wouldn't affect -pull-* at all. It adds .pull-left-* classes which would be used at the discretion of each developer if they decided they specifically wanted something to be float:none (browser default), until a certain break point.

@zlatanvasovic
Copy link
Copy Markdown

@apotropaic I know, but it can be done simpler.

.pull-right {
  @media ... {
    float: right;
  }
}

@andrewscofield
Copy link
Copy Markdown
Contributor Author

Yes, but this assumes pull-right/left shouldn't ever work on mobile, which is not true.

@zlatanvasovic
Copy link
Copy Markdown

Depends. I don't use it personally but there should be someone who wants
pull-right to be visible on mobile.

2014/1/24 apotropaic notifications@github.com

Yes, but this assumes pull-right/left shouldn't ever work on mobile, which
is not true.


Reply to this email directly or view it on GitHubhttps://github.com//pull/11983#issuecomment-33201549
.

Zlatan Vasović - ZDroid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants