Skip to content
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

Add flexbox compat features and status #149

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions feature-group-definitions/flexbox.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
spec: https://drafts.csswg.org/css-flexbox-1/
caniuse: flexbox
usage_stats: https://chromestatus.com/metrics/feature/timeline/popularity/1692
status:
is_baseline: true
since: "2020-10-20"
support:
chrome: "57"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the below are quite a lot later than https://caniuse.com/flexbox. What are the newest part of the feature that cause the whole feature to look new here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key thing affecting the date is Firefox 81's full support for flex-direction. Before that it has partial support. That feature alone determines the baseline date (without it, it would be determined by Edge 80's release date).

For the individual browsers' differences with caniuse, let's look at each in turn. In general, I ignored prefixed-only and partial implementations, but this has a smaller effect than you might guess.

For Chrome, most of the features lined up with caniuse's 29+. The exceptions were:

  • Chrome 57: css.properties.align-content.flex_context.stretch, css.properties.align-self.flex_context.stretch, css.properties.justify-content.flex_context.stretch
  • Chrome 36: css.properties.align-self.flex_context

For Edge, both the stretch and baseline values push it above caniuse's Edge 12 to Edge 79. I also treated ≤79 as Edge 79, though I don't think it would make a difference to the sum of the features.

For Firefox, most of the features were roughly in line with caniuse, though caniuse says that before Firefox 28 is partial, while BCD uses notes with no partial flag. Beyond Firefox 28, the divergences from caniuse are:

  • Firefox 52: stretch values, again
  • Firefox 81: css.properties.flex-direction stops being a partial implementation. This one is messy, with a partial and notes.

For Safari, caniuse shows a green indicator for prefixed implementations starting at Safari 7. Waiting for the unprefixed versions pushes most of the features to Safari 9; I think that's the only thing we can do before sorting out ways to annotate results.

Taking this all together:

  • If Firefox's data for flex-direction is wrong or misleading, then corrections might lead to the overall baseline date back to Edge 80's release, about 8 months earlier.
  • If that were true and EdgeHTML had more complete flexbox support, then it's possible the date could shift backwards even further, to before 2020.
  • I'm not a subject matter expert, but it's possible that stretch is a separate group. If it were moved to another group (and nothing else changed), then flexbox would show an earlier version for Chrome (36), but wouldn't otherwise alter the results.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, so clearly there's a lot of nuance here, a cluster of granular CSS properties and values, many of which come with a complex history of partial support, notes, etc.

I'm happy with the explanation of the versions you've given, and the only issue I can foresee is if any consumer uses the version numbers and displays them to users. There are multiple ways we can address that, but for now I think we should just proceed with the manually determined versions you have here.

edge: "79"
firefox: "81"
safari: "9"
compat_features:
- css.properties.align-content.flex_context
# - css.properties.align-content.flex_context.center
# - css.properties.align-content.flex_context.flex-end
# - css.properties.align-content.flex_context.flex-start
# - css.properties.align-content.flex_context.space-around
# - css.properties.align-content.flex_context.space-between
- css.properties.align-content.flex_context.stretch
- css.properties.align-items.flex_context
- css.properties.align-items.flex_context.baseline
# - css.properties.align-items.flex_context.center
# - css.properties.align-items.flex_context.flex-end
# - css.properties.align-items.flex_context.flex-start
# - css.properties.align-items.flex_context.stretch
- css.properties.align-self.flex_context
# - css.properties.align-self.flex_context.auto
- css.properties.align-self.flex_context.baseline
# - css.properties.align-self.flex_context.center
# - css.properties.align-self.flex_context.flex-end
# - css.properties.align-self.flex_context.flex-start
- css.properties.align-self.flex_context.stretch
- css.properties.display.flex
- css.properties.display.inline-flex
- css.properties.flex
- css.properties.flex-basis
- css.properties.flex-basis.auto
- css.properties.flex-basis.max-content
- css.properties.flex-basis.min-content
- css.properties.flex-direction
# - css.properties.flex-direction.column
# - css.properties.flex-direction.column-reverse
# - css.properties.flex-direction.row
# - css.properties.flex-direction.row-reverse
- css.properties.flex-flow
- css.properties.flex-grow
- css.properties.flex-shrink
- css.properties.flex-wrap
# - css.properties.flex-wrap.nowrap
# - css.properties.flex-wrap.wrap
# - css.properties.flex-wrap.wrap-reverse
- css.properties.justify-content.flex_context
# - css.properties.justify-content.flex_context.center
# - css.properties.justify-content.flex_context.flex-end
# - css.properties.justify-content.flex_context.flex-start
# - css.properties.justify-content.flex_context.space-around
# - css.properties.justify-content.flex_context.space-between
- css.properties.justify-content.flex_context.stretch
- css.properties.order