Re: [csswg-drafts] [css-anchor-1] Allow anchoring to a particular grid area of the target element (#8898)

Another, very use-case idea — placing decorative elements onto the grid gaps or over whole columns/rows when the elements inside of them have different sizes.

CodePen: https://codepen.io/kizu/pen/abRezzL

Video:

https://github.com/w3c/csswg-drafts/assets/177485/9a142791-a019-45b2-9ae2-5a6114e0ee02

In the example I had to add an `anchor-name` for every element, and then use `max` or `min` to select the proper side of each “row” or “column”.

When the sizes of elements inside could be different, it can be very hard to select the proper ones. And what if the grid is not static and wraps?

Having an ability to use grid areas as targets for our anchors could be really nice in this case, as we would be able to first choose a row, column or an area, and then choose its side — allowing placing things both inside the cells, and outside, on the gaps.

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


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

Received on Thursday, 1 June 2023 20:20:14 UTC