Skip to content

Instantly share code, notes, and snippets.

View LeaVerou's full-sized avatar

Lea Verou LeaVerou

View GitHub Profile
@LeaVerou
LeaVerou / dabblet.css
Last active August 26, 2015 11:45
Hues
/**
* Hues
*/
background: #f06;
background: linear-gradient(transparent, gray), linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red);
min-height: 100%;
@LeaVerou
LeaVerou / dabblet.css
Created August 27, 2015 14:02
Structural selector tester
/**
* Structural selector tester
*/
body { counter-reset: i }
article {
display: inline-block;
width: 4em;
padding: 1.5em 0;
@LeaVerou
LeaVerou / dabblet.css
Created February 23, 2014 01:28
Blending modes in Chrome / WebKit!
/**
* Blending modes in Chrome / WebKit!
* Requires chrome://flags/#enable-experimental-web-platform-features in Chrome
*/
body {
text-align: center;
background: black;
}
@LeaVerou
LeaVerou / dabblet.css
Created February 23, 2014 02:10
Unprefixed animations do nothing in Blink
/**
* Unprefixed animations do nothing in Blink
*/
@keyframes foo {
to { background: lime; }
}
body { background: red; animation: foo 1s infinite; }
@LeaVerou
LeaVerou / dabblet.css
Created February 25, 2014 02:39
GB plane for R=0
/**
* GB plane for R=0
*/
div {
width: 300px; height: 300px;
}
body > div {
background: linear-gradient(90deg, black, lime);
@LeaVerou
LeaVerou / dabblet.css
Created March 15, 2014 19:32
Flexbox playground
/**
* Flexbox playground
*/
body {
margin: 0;
display: flex;
flex-flow: row;
flex-wrap: wrap;
align-content: stretch;
/**
* 3D cube
*/
body {
perspective: 600px;
perspective-origin: 300px -90px;
}
.cube, .cube:before, .cube:after,
@LeaVerou
LeaVerou / dabblet.css
Created March 17, 2014 05:56
Starting point
/* Starting point */
@keyframes rot {
to { transform:rotate(360deg); }
}
.smile {
position: absolute;
top: 50px; left: 50%;
margin: -50px;
@LeaVerou
LeaVerou / dabblet.css
Created March 17, 2014 07:33
Untitled
font: 150% Baskerville, Palatino Linotype, serif;
background: beige;
@LeaVerou
LeaVerou / dabblet.css
Created April 3, 2014 23:29
RGB plane for R=255
/**
* RGB plane for R=255
*/