-
Notifications
You must be signed in to change notification settings - Fork 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
Address Flexbox Class Name Conflict #416
Comments
Numbering is not a good idea, as it’s very nondescript. I think we should rename the current test to "flexboxlegacy" ( |
This is a great point. I think the best approach is to just break the API and add the new flexbox test and rename the existing one to Otherwise we'll force all future devs to use some +cc @KuraFire @ryanseddon |
Exactly. I'm totally okay breaking the API on this matter; the flexbox test was notably a very early-stage inclusion, with very little traction, and anyone already using it will be well on top of these developments. We'll make a big point of the change when we make it, though. @paulirish do you think this can make it for 2.1? |
I think so. its an easy change and big enough of a priority. |
Yeah i'm all for that. You did the same sort of thing with css gradients. |
Great, thanks for the prompt replies and willingness to fix immediately. My only concern would be: what if flexbox (or what have you) changes again? How would you avoid numbering? Would the older version then become "flexbox-legacy-legacy"? Or would the two older versions simply be combined into "flexbox-legacy"? And it could very well change again. Someone posted to www-style just today asking to remove the flex() function. |
If it keeps changing we can just ditch a legacy version. A spec that much in flux should not be used with any expectation for things to work right, well, or continue to work at any given point in the future. Same for CSS3 Gradients. |
Now.. who wants to write the new flexbox test!? :) |
…ut needed. Details: * Existing flexbox test moves to Modernizr.flexbox-legacy Fixes Modernizr#416
As you may be aware, the syntax of flexbox changed, and now the feature called "flexbox" that browsers have implemented, and that Modernizr is detecting, is different from the "flexbox" that will become what people use that name to refer to, once support exists. Leaving the class name the same though would obviously create inconsistent results.
You could either rename the current version—to "flexbox-1", "flexbox-beta", "flexbox-old", etc.—or call the next one "flexbox-2", "flexible-box", etc. Either way has the potential to break sites though: the former would for anyone relying on the existing implementation; and the latter would for anyone who is not aware of the spec change and assumes the class is "flexbox".
A third option would be to phase out the older one; perhaps keeping "flexbox" and adding "flexbox-1", notifying users on the homepage that as of [some date when enough support exists], "flexbox" will then refer to the newer standard, while "flexbox-1" will refer to the older standard, and to update their code.
I don't have a strong opinion any way or the other, but I feel it should be addressed in some way, if plans do not already exist.
The text was updated successfully, but these errors were encountered: