I published this email exchange as a full post at csswizardry.com/…/can-css-be-too-modular.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to encode a font into Base64 use this tool https://www.npmjs.com/package/font-store | |
(function (window, document) { | |
'use strict'; | |
var isModernBrowser = ( | |
'querySelector' in document && | |
'localStorage' in window && | |
'addEventListener' in window | |
), | |
key = 'font', |