Opened 5 years ago
Closed 4 years ago
#6415 closed defect (bug) (fixed)
Sidebar name in widgets admin screen not styled properly
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | 2.8 |
| Component: | Widgets | Version: | 2.5 |
| Severity: | trivial | Keywords: | has-patch 2nd-opinion |
| Cc: |
Description
If you give a sidebar a weird and very long name, the layout gets messed up because of the drop down's length.
register_sidebar(array(
'id' => 'broken_sidebar_name',
'name' => 'Very Long Sidebar Name That Will Make the Widgets Admin Screen Look Horribly Broken.'
));
Attachments (1)
Change History (8)
comment:4
follow-up:
↓ 5
Denis-de-Bernardy
— 5 years ago
setting the select's width to 80% will likely work.
comment:5
in reply to:
↑ 4
mdawaffe
— 5 years ago
- Keywords has-patch 2nd-opinion added
Replying to Denis-de-Bernardy:
setting the select's width to 80% will likely work.
Unless "Show" is a longer word in some other language.
Here's a patch that sets the max-width of each to 50%. It works in FF2/3, Opera9, Safari3, IE6/7.
Again, I'm not sure this is the best solution.
comment:7
Denis-de-Bernardy
— 4 years ago
- Milestone changed from 2.9 to 2.8
- Resolution set to fixed
- Status changed from assigned to closed
closing as fixed with #9511
Tricky since both the select and the input have completely unknown width.
I'm not sure what the best (non-JS) solution is here; my CSS-fu isn't strong enough.
I think the "right" thing to do would be to tell those two elements (the select and the input) to fill up up to 100% of the available width and no more. If they need more room, the input should get as much as it needs, and the select should be truncated.
I don't have any idea how to do that.
I've experimented a bit with setting both element's max-width to be ~50%. This is a bad approximation to the above algorithm that works well enough in FF. I'll test it in other browsers before sending a patch.
If someone has a better solution, please grab this ticket and patch it.