Closed mgol closed 6 months ago
Could we place it outside the dom-ready handler to avoid FOUC/CSS reflow?
Agreed. This should as early as possible and blocking, which is how modernizr does it.
I guess it doesn't hurt as documentElement
is always available.
@Krinkle @timmywil PR updated
Ok, I was thinking an inline script before jQuery loaded, but this works since we're not loading jQuery async.
I'm not a fan of inline scripts as they don't play nice with CSP if we ever introduce one and I didn't really want to introduce another file just for this.
ah, right, and we do plan on adding CSP
This used to be done by Modernizr until its removal in 08f27c14ffc14c158b25e190cfa00125fb79c0d3. Some sites apply different styling for JS-disabled environments; one such example is the jQuery UI Download Builder which expands all Themeroller knobs sections in the no-JS mode.