[Webkit-unassigned] [Bug 169271] [css-flex][css-grid] Stretched button doesn't use the whole space
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 27 13:02:42 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=169271
Oriol Brufau <obrufau at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |obrufau at igalia.com
--- Comment #3 from Oriol Brufau <obrufau at igalia.com> ---
It seems that WebKit adds some margin to each side of a button if the size property in that axis is intrinsic and no margin declaration has been set:
static void addIntrinsicMargins(RenderStyle& style)
{
// Intrinsic margin value.
const int intrinsicMargin = clampToInteger(2 * style.effectiveZoom());
// FIXME: Using width/height alone and not also dealing with min-width/max-width is flawed.
// FIXME: Using "hasQuirk" to decide the margin wasn't set is kind of lame.
if (style.width().isIntrinsicOrAuto()) {
if (style.marginLeft().hasQuirk())
style.setMarginLeft(Length(intrinsicMargin, Fixed));
if (style.marginRight().hasQuirk())
style.setMarginRight(Length(intrinsicMargin, Fixed));
}
if (style.height().isAuto()) {
if (style.marginTop().hasQuirk())
style.setMarginTop(Length(intrinsicMargin, Fixed));
if (style.marginBottom().hasQuirk())
style.setMarginBottom(Length(intrinsicMargin, Fixed));
}
}
I think the easiest solution is adding 'margin: 0' to the test.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200527/f10bf3a2/attachment.htm>
More information about the webkit-unassigned
mailing list