#21680 closed defect (bug) (fixed)
Twitter embeds can break the layout in responsive bundled themes
| Reported by: | kovshenin | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Embedded tweets (via oembed) come with a fixed width of 550 pixels. This can cause the layout to break for Twenty Eleven and Twenty Twelve on narrow screens.
Attachments (4)
Change History (11)
#1
@
14 years ago
- Keywords has-patch added
The attached patches fix things for Twenty Eleven and Twenty Twelve via the max-width property, tested on an Android Nexus S and an iOS 5 simulator. Here's a screenshot:
http://f.cl.ly/items/3u3v3w1F473P1C3u2v0A/twitter-embeds.png
#2
follow-up:
↓ 3
@
14 years ago
- Milestone Awaiting Review → 3.5
- Type enhancement → defect (bug)
Nice report and patch, thanks.
Does the rule really need the !important?
The selector is specific enough it shouldn't be necessary. (Also note there should be a space between the property's value and the important declaration.)
#3
in reply to: ↑ 2
@
14 years ago
Replying to lancewillett:
Thanks Lance! Twitter embed places an inline style of "width:550px!important" to the div, as well as a "max-width:550px!important" with the .twitter-tweet-rendered selector in their embed stylesheet, so to have priority over that, I had to use !important and specify a parent class name, which is kinda hacky, but I couldn't think of anything cleaner.
A fix for Twenty Eleven