Support resolution of `anchor()` and `anchor-size()` in getComputedStyle
Categories
(Core :: Layout: Positioned, enhancement, P3)
Tracking
()
People
(Reporter: jwatt, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
633 bytes,
text/html
|
Details |
This won't magically just work. We'll need to pass a bunch of information to resolve the functions against, possibly caching that information so that it's available.
Updated•1 year ago
|
Updated•10 months ago
|
Comment 1•10 months ago
|
||
This is fun for e.g. max-size: calc(1% + anchor-size(width, 1px)) - we need to resolve the anchor-size portion without resolving the percentage, because its computed value stays in the percentage form. i.e. The example should serialize to max-size: calc(1% + 1px)
| Reporter | ||
Comment 2•10 months ago
|
||
A good next step here would be to go through the tests to determine how thorough Chrome's support is:
For example, currently there are no tests involving calc() or percentage values. What does Chrome do for such values? How complete do we need to be for a first release?
Comment 3•10 months ago
|
||
True - Testcase attached. Chrome outputs the same computed value calc(1% + 1px) for these.
| Reporter | ||
Updated•10 months ago
|
| Reporter | ||
Updated•10 months ago
|
| Reporter | ||
Updated•10 months ago
|
Updated•10 months ago
|
Comment 4•4 months ago
|
||
FWIW, this seems to work now with pref on, and since Bug 1973507 we don't do another anchor lookup.
I still don't think there are WPT tests covering the attached test case, though.
Comment 5•4 months ago
|
||
Given the attached test case now works, and they do an identical resolution to actual anchor positioning, I feel it's safe to close this out as already done.
| Reporter | ||
Comment 6•3 months ago
|
||
Agreed.
Updated•3 months ago
|
Description
•