Closed Bug 1187846 Opened 4 years ago Closed 4 years ago
Badged button's minimum width is wrong
This is a regression probably caused by Bug 1029937. Previously, we had a minimum width set for the badges, where now it seems we doesn't, causing a very narrow and small badges if we set single digit content. See the attachment, compared to: https://mdn.mozillademos.org/files/9803/badge.png
Added a better screenshot for comparison. On the left of the screenshot, we have the UX mockup and how it was used to be. On the right, there is the current badge after the fix of bug 1029937. After a couple of check, it seems to me that `min-width` is totally ignored on the XUL label element that is used for the badge, as well as `max-width`. Not sure if it's depends by the stack or what else. Neil, you've implemented the stack solution, do you have any idea about that? If we didn't find a good solution for that, to mitigate the difference we could just add some extra padding on right and left, like 3px or 4px instead of 2px. Brian, what do you think?
Attachment #8639225 - Attachment is obsolete: true
Bugzilla, please let me finish filling the attachment form before submitting it. Thanks!
Stack layout doesn't seem to honour min/max sizes for unstretched elements.
(I can work around the problem by wrapping the label in a box; the label's minimum width then becomes the box's preferred width.)
It'd be great if we could fix this in the stack layout. Alternatively adding a few extra px padding on the side to prevent the really narrow badge seems reasonable.
Thanks for the quick response guys! I'm assigning this patch to you, Neil.
Assignee: nobody → neil
Comment on attachment 8639925 [details] [diff] [review] Possible patch Could use a test though.
Attachment #8639925 - Flags: review?(enndeakin) → review+
Notice that the Look & Feel is still wrong, compared to the screenshot, but now that the `min-width` is working, it would be fixed by bug 1188001.
You need to log in before you can comment on or make changes to this bug.