Re: [csswg-drafts] [css-anchor-position] Does fallback affect the computed style? (#9229)

I think these are already clear in the current specs.

https://drafts.csswg.org/css-anchor-position-1/#fallback-apply: 

> When an element uses a [position fallback list](https://drafts.csswg.org/css-anchor-position-1/#position-fallback-list), it selects one entry from the list as defined below, and applies those properties to itself as [used values](https://drafts.csswg.org/css-cascade-5/#used-value)."

So they are applied at used value time (during layout), and do not affect the computed values.

> Should the fallback be observable from `getComputedStyle()`? 

Yes, because `getComputedStyle()` returns used values for [some properties](https://drafts.csswg.org/cssom/#resolved-values).

> What about `computedStyleMap`?

No, because `computedStyleMap` holds computed values only.

---

Note: this is just how it currently works, but ideally, we would still like fallback declarations to be applied at computed value time, so that smooth transitioning between fallback positions can be possible. See #8372

-- 
GitHub Notification of comment by xiaochengh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9229#issuecomment-1690299835 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 23 August 2023 16:48:20 UTC