Chrome: box-sizing: inherit
css rule is broken
#2387
Labels
browser/chromium
Any issues relating to Chromium (Chrome, Edge (new), Opera, Brave etc.)
state/cannot-reproduce
Bugs which can't be reproduced
type/bug
Any issue which is a bug or PR which fixes a bug
Bug Report
Many layouts are broken in the newest Chrome version (103.0.5060.53 in my case). I tracked it down to a problem with
box-sizing: inherit
in a*, :after, :before
CSS selector. The inheritance goes back up to thehtml
tag, where it is specified asbox-sizing: border-box
. However, it doesn't seem to be properly applied, so many layouts depending onborder-box
to compute relative widths for example are broken and take up way too much space. This bug is not visible in latest version of Firefox (101.0.1).I also reported a bug to Google Chrome, but if FUI could strenghten the layout with updated CSS, it would prevent such problems. As of now, all the web apps I developped with FUI are badly broken.
Steps to reproduce
This is visible in the official FUI documentation in Chrome 103. For example, the Grid section is badly impacted. To see the root cause:
body
tag in the DOM explorer;*, :after, :before
rule;box-sizing
toboder-box
.I do not know if this is the right way to fix the problem, as it might break something else I am not aware of, but it shows the origin of the issue.
Expected result
box-sizing: border-box
should be properly applied to all elements.Actual result
Layouts are distorted because of padding not being considered in the elements' dimensions.
Screenshot
Version
2.8.8 in the documentation, but happens in lower versions too (at least down to 2.6)
Edit
I see that Bootstrap has been adressing this kind of issue in 2017. I don't know why it showed up just now in my FUI projects.
The text was updated successfully, but these errors were encountered: