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
Created January 27, 2012 20:09
Learning CSS3
/**
* Learning CSS3
* background-clip
*/
html {
min-height:100%;
background: url('http://leaverou.github.com/CSSS/img/rainbow-wood.jpg') top;
background-size: cover;
}
@LeaVerou
LeaVerou / dabblet.css
Created January 27, 2012 20:39
Learning CSS3
/**
* Learning CSS3
* border-image
*/
html {
min-height:100%;
background: white url(http://leaverou.github.com/chainvas/img/background.jpg);
}
@LeaVerou
LeaVerou / dabblet.css
Created January 28, 2012 00:32
Learning CSS3
/**
* Learning CSS3
* RGBA/HSLA, border-radius, box-shadow, text-shadow
*/
html {
min-height:100%;
background: url('http://leaverou.github.com/CSSS/img/rainbow-wood.jpg') center;
}
@LeaVerou
LeaVerou / dabblet.css
Created January 28, 2012 04:14
Learning CSS3
/**
* Learning CSS3
* Transitions & transforms
*/
html {
min-height:100%;
background: url('http://leaverou.github.com/CSSS/img/rainbow-wood.jpg') top;
background-size: cover;
}
@LeaVerou
LeaVerou / dabblet.css
Created January 28, 2012 20:58
Learning CSS3
/**
* Learning CSS3
* RGBA/HSLA, border-radius, box-shadow, text-shadow
*/
html {
min-height:100%;
background: url('http://leaverou.github.com/CSSS/img/rainbow-wood.jpg') center;
}
@LeaVerou
LeaVerou / dabblet.css
Created January 30, 2012 10:29
text-shadow when letters are overlapping
/**
* text-shadow when letters are overlapping
*/
font: bold 800% 'Palatino Linotype', Palatino, Georgia, serif;
text-align: center;
letter-spacing: -.3em;
text-shadow: 0 .5em hsla(0,0%,50%,.5);
color: rgba(255,0,100,.5);
@LeaVerou
LeaVerou / dabblet.css
Created February 1, 2012 20:49
Regain default button styling by CSS overrides. Possible?
/**
* Regain default button styling by CSS overrides. Possible?
*/
button {
background: red; /* we can't remove this */
background: initial; /* failed */
background: none; /* failed */
/* anything else? */
}
@LeaVerou
LeaVerou / dabblet.css
Created February 5, 2012 14:39
Typing animation with pure CSS.
/**
* Typing animation with pure CSS.
* Works best in browsers supporting the ch unit.
*/
@keyframes typing { from { width: 0; } }
@keyframes blink-caret { 50% { border-color: transparent; } }
h1 {
font: bold 200% Consolas, Monaco, monospace;
@LeaVerou
LeaVerou / dabblet.css
Last active September 20, 2023 08:11
Move in a circle without wrapper elements
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
@LeaVerou
LeaVerou / dabblet.css
Created February 12, 2012 12:11
Testcase
/**
* Testcase
* Should be true on a 13.3" LCD at 1280x800
*/
html { background: red }
@media (min-resolution: 112dpi) and (max-resolution: 113dpi) {
html { background: lime }
}