We’re tracking our efforts in this Google Doc.
Chat to Anselm
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0) | |
// ---- | |
$map: | |
('a', 'b'); | |
// Expected output: ('a', 'b') | |
// Actual output: "a", "b" |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0) | |
// ---- | |
$map: | |
('a', 'b'); | |
.class { | |
content: $map; |
/* | |
* Clearfix for modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* `contenteditable` attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that receive the `clearfix` class. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. | |
*/ |
(function (global) { | |
'use strict'; | |
window.matchMedia = window.matchMedia || function (media) { | |
if (!Modernizr) { | |
throw new Error('Reference Error: Modernizr is undefined'); | |
} | |
return { | |
matches: Modernizr.mq(media) |
// Debounce without jQuery | |
function debounce(fn, delay) { | |
var timer = null; | |
return function () { | |
var context = this, args = arguments; | |
clearTimeout(timer); | |
timer = setTimeout(function () { | |
fn.apply(context, args); | |
}, delay); | |
}; |
var inspect_me = 0, | |
result = ''; | |
switch (inspect_me) { | |
case 0: | |
result = "zero"; | |
break; | |
case 1: | |
result = "one"; | |
break; | |
default: |
/* | |
* The trouble with collections is that they are live queries against the underlying document (the HTML page). This means that every time you access any collection’s length, you’re querying the live DOM, and DOM operations are expensive in general. | |
* | |
* It's only good if you don't update the length by f.e. adding DOM nodes | |
* | |
* That’s why a better pattern for for loops is to cache the length of the array (or collection) you’re iterating over, as shown in the following example: | |
*/ | |
for (var i=0, max = myarray.length; i < max; i++) { | |
// do sth. |
/* Wildcard selector searches through any part of the string */ | |
html[data-useragent*='Chrome/13.0'] .nav{ | |
background:url(img/radial_grad.png) center bottom no-repeat; | |
} |
<!-- | |
A quick demo of the three current candidates of Responsive Images syntax on a real world example for one image. | |
This on purpose does not include any of the proposed viewport syntaxes because this IMO adds confucion and | |
is stylistic only (therefore should go in CSS IMO). | |
--> | |
<!-- This is the src-{N} way: http://tabatkins.github.io/specs/respimg/Overview.html --> |