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

Address Flexbox Class Name Conflict #416

Closed
HughxDev opened this issue Nov 24, 2011 · 8 comments
Closed

Address Flexbox Class Name Conflict #416

HughxDev opened this issue Nov 24, 2011 · 8 comments

Comments

@HughxDev
Copy link

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.

@KuraFire
Copy link
Member

Numbering is not a good idea, as it’s very nondescript.

I think we should rename the current test to "flexboxlegacy" (Modernizr.flexboxlegacy and .no-flexboxlegacy) and have the existing property reflex the going-forward version.

@paulirish
Copy link
Member

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 Modernizr.flexbox-legacy

Otherwise we'll force all future devs to use some .flexbox-suffix forever when this new impl gains adoption.

+cc @KuraFire @ryanseddon

@KuraFire
Copy link
Member

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?

@paulirish
Copy link
Member

I think so. its an easy change and big enough of a priority.

@ryanseddon
Copy link
Member

Yeah i'm all for that. You did the same sort of thing with css gradients.

@HughxDev
Copy link
Author

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.

@KuraFire
Copy link
Member

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.

@paulirish
Copy link
Member

Now.. who wants to write the new flexbox test!? :)

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
…ut needed. Details:

* Existing flexbox test moves to Modernizr.flexbox-legacy

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

No branches or pull requests

4 participants