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

Fix regression: make media-body consume full available width #15140

Closed
wants to merge 1 commit into from

Conversation

shesek
Copy link

@shesek shesek commented Nov 15, 2014

The addition of #14801 made media-body not consume the full available width, due to the use of display: table-cell. This is problematic when the media body has visible borders or elements floated to its right (see example - v3.2.0 vs v3.3.1).

This PR fixes this by applying width: 100% to media-body and display: table to the main media element, as was done in the flag object article referenced from the original feature request issue, #14799.


My 2c: I don't think that applying table displays to all media elements is a good idea. Using table/table-cell makes elements behave quite differently and may cause things to break in odd ways.

While my suggested change might fix this issue, I'm not sure that it doesn't cause others. I would much rater have vertical alignment and table display as an opt-it, either by specifying an additional class on the media element ("media-valign"?) or by making it a completely different component ("flag"?), rather than changing the behavior of an existing component and possibly breaking existing code.

If you prefer, I can send a pull request that does that instead.

as was the case up to 3.2.x, prior to twbs#14801
@cvrebert cvrebert added the css label Nov 15, 2014
@mdo
Copy link
Member

mdo commented Nov 22, 2014

Have any examples demonstrating the bug and fix?

@shesek
Copy link
Author

shesek commented Nov 25, 2014

@mdo the original PR has links demonstrating the bug - v3.2.0 (before it broke) vs v3.3.1 (after it broke), and here's how 3.3.1 it looks with the fix: http://jsfiddle.net/jj5snj84/4/

edit: changed the examples to use media-left, as per Bootlint.

@mdo
Copy link
Member

mdo commented Nov 30, 2014

Rather than go this route, I restored the styles we nuked from #14801.

@mdo mdo closed this Nov 30, 2014
@mdo mdo added this to the v3.3.2 milestone Nov 30, 2014
@juthilo juthilo mentioned this pull request Nov 30, 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