-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[RFC] When to start adopting new CSS features, browser support #34510
Comments
As discussed in the meeting, we can generalize this RFC to consider browser support in general. Also, we can decide if/when to remove the browser-specific hacks and workarounds in code. Here's the list of such workarounds I've found so far (I'll keep it updated as I stumble upon anything else):
|
I would only have two comments on the proposal:
https://2021.stateofcss.com/en-US/features/layout/#flexbox_gap
I think there is the question of whether should we freeze the browser versions support for a given major version or have something dynamic? An example https://ant.design/docs/react/introduce#Environment-Support Historically, I have always seen library to freeze the browser version support, e.g. with Node.js dependencies, or https://nextjs.org/docs/basic-features/supported-browsers-features but maybe it's not longer relevant in this new era of browsers that updates continuously. |
What's the problem? 🤔
CSS is one of the core logic that powers Material UI and Joy UI and it is evolving over time. New CSS features, e.g. flexbox gap, can reduce the complexity of the code and solve existing issues. However, we've never talked about when to start using them.
This RFC aims to create a discussion to bring clarity to the community.
What are the requirements? ❓
Proposed solution ⌛️
Final solution: TBD
I think the adoption can be split into 2 phases (if possible) by using caniuse as an indicator:
90%
, create an opt-in version (could be a new prop, or a new component):<Stack useFlexGap>
will switch the implementation frommargin
togap
which can be enabled from the theme default props to affect all instances of theStack
.<Unstable_CssGrid >
that implements CSS Grid feature as an alternative to the existingGrid
.94%
(~1-2yrs from 90%), make the API stable based on the feature.Stack
, thegap
can be the default implementation because it covers every use case of themargin
CssGrid
, make it a stable version but remainsGrid
component because they might be used in different scenarios.Resources and benchmarks 🔗
No response
The text was updated successfully, but these errors were encountered: