You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was pretty surprised to discover that to use this otherwise well-thought-out library, I needed to patch modernizer, or else it would not work in Firefox. In looking into it further, it appears to be completely unnecessary and could be remedied with a js file less than a few hundred bytes. While I'm sure the following portion describing an implementation is probably obvious to you, I mostly wanted to convince you that this is a good idea. While I can understand your desire to keep the requirements for flexgrid as small as possible, I believe that you have inadvertently gone the opposite direction by requiring a customized version of Modernizer:
This can potentially break other libraries that rely on the core modernizer tests working the standard way.
Any time in the future that a developer wishes to upgrade modernizer, they will need to have a portion of their workflow dedicated to patching it for flexgrid.
You already require 1 (or 2) javascript files in order for flexgrid to work, so it's not as if it's some sort of fundamental shift in the design philosophy of the library.
How
First of all, starting from a stock non-customized modernizer 2.8.3 release, the following changes appear to be unnecessary, as it's already implemented this way:
hgroup,nav → hgroup,main,nav
hgroup mark → hgroup main mark
Next, by changing flexboxlegacy → webkitbox and boxDirection → WebkitBoxFlex you've just completely removed one test and replaced it with a totally different one. I can't see how the old test interferes at all. The required javascript would be:
Finally, as for the flexWrap → flexDirection change, there is currently no supported way in modernizer to replace a core test, but the following javascript line would add a new test you could use instead:
It would already be possible to make flexgrid work without changing the css file and adding a small javascript file, if it were not for the fact that flexgrid relies on the different behaviour of the exiting test 'flexbox'. If you made your patched Modernizr add the new 'flexboxflexgrid' test and changed the css to test for it, it would allow for users to make use of flexbox without having to use a patched version of either modernizer or flexbox.
At that point, you could give users the option of either:
Using your very minimal, patched version of Modernizer
Using a standard version of Modernizer that has 'addTest' enabled, plus a minimal extra javascript file.
The text was updated successfully, but these errors were encountered:
Why
I was pretty surprised to discover that to use this otherwise well-thought-out library, I needed to patch modernizer, or else it would not work in Firefox. In looking into it further, it appears to be completely unnecessary and could be remedied with a js file less than a few hundred bytes. While I'm sure the following portion describing an implementation is probably obvious to you, I mostly wanted to convince you that this is a good idea. While I can understand your desire to keep the requirements for flexgrid as small as possible, I believe that you have inadvertently gone the opposite direction by requiring a customized version of Modernizer:
How
First of all, starting from a stock non-customized modernizer 2.8.3 release, the following changes appear to be unnecessary, as it's already implemented this way:
Next, by changing flexboxlegacy → webkitbox and boxDirection → WebkitBoxFlex you've just completely removed one test and replaced it with a totally different one. I can't see how the old test interferes at all. The required javascript would be:
Finally, as for the flexWrap → flexDirection change, there is currently no supported way in modernizer to replace a core test, but the following javascript line would add a new test you could use instead:
Make it Optional
It would already be possible to make flexgrid work without changing the css file and adding a small javascript file, if it were not for the fact that flexgrid relies on the different behaviour of the exiting test 'flexbox'. If you made your patched Modernizr add the new 'flexboxflexgrid' test and changed the css to test for it, it would allow for users to make use of flexbox without having to use a patched version of either modernizer or flexbox.
At that point, you could give users the option of either:
The text was updated successfully, but these errors were encountered: