Skip to content

Instantly share code, notes, and snippets.

@scottkellum
scottkellum / normalized.html
Created December 6, 2011 14:58
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active October 1, 2024 16:26
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email ([email protected]).

Contents

@LeaVerou
LeaVerou / dabblet.css
Created April 17, 2012 05:57
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@aaronpk
aaronpk / README.md
Last active February 16, 2021 18:02

Swap out the two URLs (first is source, second is target) then run with curl:

curl -X POST -d @pingback.xml http://example.com/xmlrpc
@dorajistyle
dorajistyle / font-awesome-ie7.min.css
Created November 14, 2013 05:24
Font Awesome 4.0.3 Internet explorer 7 support. Font Awesome not support IE7 officially. But sometimes we need to support IE7.
.fa-lg{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle;}
.nav [class^="fa-"],.nav [class*=" fa-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;}.nav [class^="fa-"].fa-lg,.nav [class*=" fa-"].fa-lg{vertical-align:-25%;}
.nav-pills [class^="fa-"].fa-lg,.nav-tabs [class^="fa-"].fa-lg,.nav-pills [class*=" fa-"].fa-lg,.nav-tabs [class*=" fa-"].fa-lg{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px;}
.btn [class^="fa-"].pull-left,.btn [class*=" fa-"].pull-left,.btn [class^="fa-"].pull-right,.btn [class*=" fa-"].pull-right{vertical-align:inherit;}
.btn [class^="fa-"].fa-lg,.btn [class*=" fa-"].fa-lg{margin-top:-0.5em;}
a [class^="fa-"],a [class*=" fa-"]{cursor:pointer;}
.fa-glass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf000;');}
.fa-music{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf001;');}
.fa-se
@rupl
rupl / sw-font-load.js
Created December 7, 2015 11:54
Use Service Worker to load fonts async/direct via client-side logic.
// Load fonts async by default
// Load sync from SW cache when available.
//
// Snippet assumes your Service Worker caches fonts as part of installation, so that
// an 'activated' Service Worker means the fonts are cached with 100% confidence.
if (
'serviceWorker' in navigator &&
navigator.serviceWorker.controller !== null &&
navigator.serviceWorker.controller.state === 'activated'
) {