-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
layout: Set padding to zero on tables in collapsed-borders mode #34908
Conversation
🔨 Triggering try run (#12678078217) for Linux WPT |
Test results for linux-wpt-layout-2020 from try job (#12678078217): Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (9)
|
✨ Try run (#12678078217) succeeded. |
if self.get_box().display.inside() == stylo::DisplayInside::Table && | ||
self.get_inherited_table().border_collapse == BorderCollapse::Collapse | ||
{ | ||
// https://drafts.csswg.org/css-tables/#collapsed-style-overrides | ||
// > The padding of the table-root is ignored (as if it was set to 0px). | ||
return LogicalSides::zero(); | ||
} | ||
let padding = self.get_padding().clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit more magical than I would like. But I guess this needs to be accessed by every parent context. So I can't really think of a better way.
https://drafts.csswg.org/css2/#collapsing-borders > in this model, a table does not have padding https://drafts.csswg.org/css-tables/#collapsed-style-overrides > The padding of the table-root is ignored (as if it was set to 0px). Signed-off-by: Oriol Brufau <obrufau@igalia.com>
fdcc33f
to
7f8b607
Compare
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#49994) with upstreamable changes. |
https://drafts.csswg.org/css2/#collapsing-borders
https://drafts.csswg.org/css-tables/#collapsed-style-overrides
./mach build -d
does not report any errors./mach test-tidy
does not report any errors