[CSS Anchored Positioning] Automatic positioning
I think it would be interesting to consider a bigger focus on automatic positioning instead of manually specifying with a difficult syntax. Having a detailed syntax to do detailed work is nice for specific cases but in most cases, I want the browser to figure things out for me. PopperJS has an auto feature. I can only presume a lot of CSS authors do not want to worry about all the specifics too.
Thanks for your feedback @Wolfr! This was one of our open questions, so it's good to know that you'd find automatic positioning useful.
Can you tell me a little bit more about what you'd like to see, or what parts of PopperJS are most important to you? For example, I think there's a couple things that could be possible with "auto" repositioning:
- Browser "flips" the position, in horizontal and vertical axes, as needed. Similar to PopperJS's "flip" function.
- Browser "pushes" the position of the anchored element, sort of like PopperJS's overflow prevention. For example, maybe your preference is to align the horizontal middle of the popup to the horizontal middle of the button. The browser could push the popup so that it is left-aligned to the popup instead.
- Browser constrains the width or height of the anchored element.
Would it be important to you to select which of these "auto" operations the browser uses? Would you need to have that be independent for each axis? Or would it be enough to provide a preferred position and let the browser take care of the rest?