Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Modernizr
Let’s assume I’m rusty at site building, because I really am.
Is Modernizr necessary these days, or is it a throwback to the olden days?
Offline
Re: Modernizr
I don’t use it now, but then I never have.
Guess if you need cutting edge polyfills for things, then go for it. But with browser vendors releasing new versions every couple of weeks, I doubt any new spec features take long to integrate. MS Edge, perhaps notwithstanding.
Last edited by Bloke (2020-03-14 16:22:53)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Modernizr
Hi Pete
I guess it depends on your target audience. I stopped using it on neme’s latest site version. If you do want backward compatibility you may also need to add css3-mediaqueries.js
which reminds me that I will have to remove it from my site:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Modernizr
Bloke wrote #322188:
But with browser vendors releasing new versions every couple of weeks, I doubt any new spec features take long to integrate. MS Edge, perhaps notwithstanding.
Good point, well made.
colak wrote #322189:
I guess it depends on your target audience. I stopped using it on neme’s latest site version.
That’s my gut feeling at the moment – the site I’m looking at has Modernizr on it, but it’s from 5+ years ago and I don’t see why it needs it.
Thanks, Modernizr – and so long.
Offline
Re: Modernizr
I’d say “depends” too. It’s a trade-off between the browser feature you’re using and the browser’s you need to support.
- Are you using specific (advanced) browser functionality?
- Is that feature supported by all your target browsers?
- What happens when a browser doesn’t support it? Does it break your site, or do some users not get some non-essential functionality?
- Can you detect the browser feature easily enough using another method?
- Do you need to detect multiple features?
Modernizr is still kept up to date, so it’s not obsolete, but many browsers can now detect css features using @supports making its use case more questionable. This feature detection article at mozilla provides plenty of detailed information, including modernizr.
Since 5 years ago, when you may have dropped in the whole modernizr library, they changed the download method so that you explicitly choose the variant you want and get a much smaller download.
I found it useful to detect touch support (e.g. to switch off rollovers and place headings beneath images) but that has been relativised since. You can detect touch event support but not really a touch device.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Modernizr
Brilliant- thanks, jakob!
Offline
Pages: 1