Skip to content

[css-anchor-position-1] Document the reason for excluding base styles from position-try-order #9946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dholbert opened this issue Feb 13, 2024 · 2 comments

Comments

@dholbert
Copy link
Member

Spinning this off of #9196 -- @tabatkins mentioned there are design reasons why we're planning to (by default) exclude the base styles from the position-try-order sorting. It would be nice to document those reasons (and the use cases that we're intending this default behavior to address) somewhere in the spec.

@dholbert
Copy link
Member Author

As I understand it from chatting with Tab just now: the rough reasoning here is a generalization of how e.g. dropdown-menus work, where they typically default to going downwards as the preferred-direction, regardless of available space, and they stick with that direction until they don't fit. Only then do they consider the fallback options (which in the case of dropdown menus would be the single option of going upwards instead of downwards), and that's the point at which we might sort among the fallback options to pick most-width | most-height one.

@tabatkins
Copy link
Member

Yup, that's it. In many (most?) cases, your "starting" styles are the ideal presentation you want, and you'll want to use it regardless of available space, so long as it fits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants