Closed jamesst20 closed 3 years ago
Thanks @jamesst20. I'll look at how I could add support for this. The trouble is, that is a JavaScript method of detecting if a browser has support for flex-gap and this is a CSS only polyfill. I could maybe integrate a class into the polyfill which turns off/on the polyfill if this class is present.
Just an update on this. The next release has an option to specify a class if you're using JS to detect support for flex gap that will avoid the polyfill being used if flex gap
is supported natively.
Just an update on this. The next release has an option to specify a class if you're using JS to detect support for flex gap that will avoid the polyfill being used if flex
gap
is supported natively.
Thanks for the feedback ! :) I will wait for the README update and try it
Hi @jamesst20. Thanks for this suggestion. The latest version now allows you to pass in a class selector like .flex-gap-not-supported
when used with the Modernizr technique to add a class when flex gap is not supported.
In theory, you could also apply the polyfill with PostCSS in the browser rather than the server but I haven't had time to try this yet.
From the documentation Known issues No way to detect browsers which support flex-gap, so polyfill is always used.
Found possible detection
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/css/flexgap.js