Re: [csswg-drafts] [css-anchor-position-1] Do we need area-list fallback position syntax? (#9270)

One thing I was thinking about: as an author, I would be completely ok with _only_ having the position & outer dimensions change for the fallback mechanism, and for any cases where I'd want to have any changes to the properties like padding or border, use containment and then query the resolved dimensions after the fallback in order to adjust anything I'd want in relation to the final position.

That would make the more simple cases less complicated, and still allow for enough room for anything else.

And, when only caring about the insets for the fallbacks, I imagine things could be easier by making them a part of a cascade?

As a sidenote (not sure how feasible), I wonder if in this case we could retire the `@try`, and make it possible to mix the grid-based `position-area` with the fallbacks for the insets somehow. 

Like, what if

```CSS
.popover {
    position-area: top / all, bottom / all, 0 anchor(same) 0 auto;
}
```

We'd need to have https://github.com/w3c/csswg-drafts/issues/1282 first in order for the shorthands to be possible for logical directions, but otherwise I can see this covering both the grid-like alignment and inset one?

From what I understood about the necessity to have `@try` instead of extending the inset properties, the reason for them was that we'd want to try all the insets at the same time, so we cannot (or it is inconvenient/cumbersome if we'd require to maintain the same order) have the separate insets each with their own list of fallbacks, but if we would only work in a `position-area`/`inset-area` context, then we'd be good?

One issue could be that it might be a bit complicated to work only with shorthands, _but_, given that the common cases would be covered by the simple grid-like layout, we can sacrifice the inset case, especially given no-one would forbid us from using CSS variables for managing the separate values in any way we'd like.

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


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

Received on Friday, 15 September 2023 19:08:35 UTC