WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
256178
Container query length units use border box instead of a content box
https://bugs.webkit.org/show_bug.cgi?id=256178
Summary
Container query length units use border box instead of a content box
Roman Komarov
Reported
2023-05-01 13:52:14 PDT
Created
attachment 466160
[details]
HTML with the bug reproduced, saved from CodePen Per specs, container query length units should be evaluated relative to the query container's **content box**, while currently they're evaluated relative to the border box. Link to reproduce:
https://codepen.io/kizu/pen/ExdwZaB
— the square in it should be of a lime color, as with the content box of the container have 0x0 dimensions, but in Safari the units get evaluated related to the border box, so we can see the red square (the HTML from this example is also attached to this report as a file) This example works correctly in Chrome and Firefox. Spec quote from
https://www.w3.org/TR/css-contain-3/#container-query-length
> For each element, container query length units are evaluated as container size queries on the relevant axis (or axes) described by the unit.
Spec quotes from
https://www.w3.org/TR/css-contain-3/#container-size-query
> The width container feature queries the width of the query container’s content box. > The height container feature queries the height of the query container’s content box. > The inline-size container feature queries the size of the query container’s content box in the query container’s inline axis. > The block-size container feature queries the size of the query container’s content box in the query container’s block axis.
Attachments
HTML with the bug reproduced, saved from CodePen
(816 bytes, text/html)
2023-05-01 13:52 PDT
,
Roman Komarov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Tim Nguyen (:ntim)
Comment 1
2023-05-01 13:59:51 PDT
Consider contributing this testcase to web platform tests as a reftest in case you haven't:
https://github.com/web-platform-tests/wpt
Radar WebKit Bug Importer
Comment 2
2023-05-01 14:00:21 PDT
<
rdar://problem/108754549
>
Antti Koivisto
Comment 3
2023-05-02 09:07:43 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/13364
Antti Koivisto
Comment 4
2023-05-02 09:15:09 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/39807
EWS
Comment 5
2023-05-02 10:22:07 PDT
Committed
263595@main
(e31e2eb9806e): <
https://commits.webkit.org/263595@main
> Reviewed commits have been landed. Closing PR #13364 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug