Re: [csswg-drafts] [CSS-POSITION-4] Define a way to have a dialog anchored to an element (#5304)

I don't think the solution needs to introduce new syntax.

position absolute, top 100% puts you below your relative parent
position absolute top -100% puts you below your relative parent
position absolute left 100% puts you on the right of your relative parent
position absolute left -100% puts on the left of your relative parent

You can then use a combination of these with transform and calc to reach all desired positions without knowing the height/width of the relative parent ahead of time.

We just need to allow the dialog element itself to be positioned with css and then this should be enough to be able to achieve the desired outcome?




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


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

Received on Monday, 23 May 2022 03:53:29 UTC