Skip to content

Box alignment features are hidden by current organization #2905

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

Open
mirisuzanne opened this issue Apr 25, 2025 · 4 comments
Open

Box alignment features are hidden by current organization #2905

mirisuzanne opened this issue Apr 25, 2025 · 4 comments
Labels
feature definition Creating or defining new features or groups of features.

Comments

@mirisuzanne
Copy link
Contributor

Currently all the box-alignment features are hidden under their respective contexts.
The css.properties.align-self.position_absolute_context key is in the absolute positioning feature, and same with flexbox/grid/etc. Only "align-content in block layouts" has it's own data visible.

The most immediate problem with this is that we can't see the multi-browser support that exists for alignment in absolute positioning. At the very least, position_absolute_context alignment keys deserves to be a feature.

At a high level, I think we lose out by not treating "box alignment" as a top level feature of CSS. I know it's historically been taught as 'part of' different layout systems - but authors have consistently found that confusing. The reality is we're close to having it everywhere, with a unified syntax we can teach and use across layouts.

@ddbeck ddbeck added the feature definition Creating or defining new features or groups of features. label Apr 28, 2025
@ddbeck
Copy link
Collaborator

ddbeck commented Apr 28, 2025

Thanks for opening this issue, @mirisuzanne. I'm very curious about ways in which the definition of features does not (or should not or does!) align with developer expectations.

The most immediate problem with this is that we can't see the multi-browser support that exists for alignment in absolute positioning. At the very least, position_absolute_context alignment keys deserves to be a feature.

Can you talk about what the absolute-positioning feature is missing or over-fitting on? Or is this a suggestion about the underlying browser compat data itself, that it should somehow record the existence of different layout modes distinctly from whether or not certain properties engage with that mode?

@mirisuzanne
Copy link
Contributor Author

There are several keys that have to do with alignment properties in an absolute positioning context. They are all labeled with position_absolute_context keys. The underlying data/keys look good to me, but all of those are grouped with the absolute-positioning feature: https://github.com/search?q=repo%3Aweb-platform-dx%2Fweb-features%20position_absolute_context&type=code

But absolute positioning generally is listed as baseline high, and these keys are fairly new. They should probably get their own grouping to expose their 'limited' support. That's already being done for align-content in a block context: https://github.com/search?q=repo%3Aweb-platform-dx%2Fweb-features+block_context&type=code

Breaking those *-self.position_absolute_context keys into a new feature would be a big help.

@mirisuzanne
Copy link
Contributor Author

re: aligned expectations, I think there's two things to consider that are sometimes at odds:

  • "how have authors historically thought of this" is sometimes useful
  • but so is "how could authors more clearly think of this moving forward"

Because new features in CSS can often re-frame old features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

No branches or pull requests

3 participants
@ddbeck @mirisuzanne and others