Skip to content

Instantly share code, notes, and snippets.

@scottjehl
scottjehl / noncritcss.md
Last active August 12, 2023 16:57
Comparing two ways to load non-critical CSS

I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.

TL;DR: Here's the solution I ended up with: https://github.com/filamentgroup/loadCSS/


For async JavaScript file requests, we have the async attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: https://gist.github.com/igrigorik/2935269#file-notes-md ).

Seems there are a couple ways to load and apply a CSS file in a non-blocking manner:

@latentflip
latentflip / accessiblity.md
Created November 22, 2013 11:32
300ms, Fast Click & Accessibility

Thoughts

Caveats: I suck at accessibility, so I am probably wrong on a lot of things.

The debate

Chrome 32 on Android removes the 300ms delay on touch events for responsive sites. This disables double-tap zoom, leaving pinch to zoom the only way to zoom content. This is an accessibility concern, as for some users double tap zoom may have been the only way they were able to zoom web pages.

Why did they do it?

@simonw
simonw / setting-up-sublime-text-2.txt
Created July 11, 2012 12:35
Setting up Sublime Text 2
First, install it from http://www.sublimetext.com/2
Next, install the package control extension from here:
http://wbond.net/sublime_packages/package_control
Installation instructions here: http://wbond.net/sublime_packages/package_control/installation
Restart Sublime, then hit Shift+Apple+P and search for "Package Control: Install Package"
@nesk
nesk / LICENSE.txt
Created June 17, 2011 13:31 — forked from 140bytes/LICENSE.txt
Detect CSS 3 transitions support
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Johann PARDANAUD : http://plune.fr
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE