![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Branch: refs/heads/master Home: https://github.com/dreamwidth/dw-free Commit: 2d55c34810a7d63953b63bb65a545736ce672f07 https://github.com/dreamwidth/dw-free/commit/2d55c34810a7d63953b63bb65a545736ce672f07 Author: Nick Fagerlund nick.fagerlund@gmail.com Date: 2021-02-28 (Sun, 28 Feb 2021)
Changed paths: M htdocs/js/foundation/vendor/custom.modernizr.js
Log Message:
Upgrade modernizr to 3.11.4
Fixes #2878 ......maybe. The story there is that modernizr checks for
::before/after
support by measuring the height of something, and some browsers
give slightly sloppy pixel measurements of things if the zoom level is tweaked.
So the newest versions of modernizr account for that in their measurement, but
our "vintage" version didn't.
Anyway, the hope is that this'll deal with that for now, but really let's:
- Not increase our reliance on modernizr at all
- Transition stuff off it as the opportunity arises
In that spirit, this update is a custom build that pares modernizr back to the veritable bones, only including what we (or Foundation) appear to CURRENTLY be using. The custom build config looks something like:
javascript
modernizr.build({
minify: true,
enableJSClass: true,
enableClasses: true,
classPrefix: "",
options: [
'html5shiv',
'addTest',
'setClasses',
],
"feature-detects": [
"css/transforms",
"css/transitions",
"css/flexbox",
"css/fontface",
"css/generatedcontent",
"touchevents",
],
}, output => {
// Hack: alias (bad, deprecated) touchevents feature to its even-older name.
output += "\n; Modernizr.addTest('touch', Modernizr.touchevents);";
// something to write the file
})
Theoretically this update and the associated removal of unused code shouldn't break anything... but keep an eye out.