Re: [w3ctag/design-reviews] Specification review for CSS Anchor Positioning (Issue #848)

> These seem to revolve around flipping, while offset would still require @position-try. Is that not the case?

Ah, sorry, missed the full implication of the sentence. It depends on what you mean by shifting. You can specify a different `inset-area` inline in `position-try-options`, so if that's all you need to do (and often, it will be) there's still no need to use `@position-try`. As we discussed in this week's CSSWG call, too, if what you want is "slightly shift off your specified alignment to avoid overflowing", that was deferred from this level while we figure out a general solution for position-shifting (and Elika has ideas for how to achieve that, in <https://github.com/w3c/csswg-drafts/issues/10316>)

> Fair, it seems that a shorthand would alleviate this, while authors could still use the longhands for composability?

Right, and that's something we can safely add in the future, without having to block any individual specs defining names today.

> [selectors instead of names]

That's potentially doable, sure, and would indeed subsume a number of cases that today are best done via `anchor-name`+`anchor-scope`. The syntax is open for it, we'd just need a `selector()` function or something. Definitely doable in the future.

> Yes, it typically causes author confusion, but so does having to hunt down multiple properties to figure out why an element is or isn't displaying…

Right, it can cause confusion if some values don't work for no immediately-obvious reason; we definitely do this when we need to, but try to avoid it when we can. On the other hand, if you're wondering why an element isn't visible, and you inspect its styles and see a `position-visibility` property... that seems as obvious as seeing `visibility`, imo. ^_^

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/848#issuecomment-2130146864
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/848/2130146864@github.com>

Received on Friday, 24 May 2024 18:37:26 UTC