Skip to content

Instantly share code, notes, and snippets.

@csssecrets
csssecrets / dabblet.css
Last active November 27, 2025 06:18
Irregular drop-shadows
/**
* Irregular drop-shadows
*/
div {
position: relative;
display: inline-flex;
flex-direction: column;
justify-content: center;
vertical-align: bottom;
@csssecrets
csssecrets / dabblet.css
Created January 29, 2015 16:28
One-sided shadow
/**
* One-sided shadow
*/
div {
width: 1.6in;
height: 1in;
background: #fb3;
box-shadow: 5px 0 5px -5px black,
-5px 0 5px -5px black;
@csssecrets
csssecrets / dabblet.css
Created January 29, 2015 16:22
One-sided shadow
/**
* One-sided shadow
*/
div {
width: 1.6in;
height: 1in;
background: #fb3;
box-shadow: 3px 3px 6px -3px black;
}
@csssecrets
csssecrets / dabblet.css
Last active October 26, 2021 13:47
One-sided shadow
/**
* One-sided shadow
*/
div {
width: 1.6in;
height: 1in;
background: #fb3;
box-shadow: 0 5px 4px -4px black;
}
@csssecrets
csssecrets / dabblet.css
Last active December 29, 2021 02:11
Pie charts — with SVG
/**
* Pie charts — with SVG
*/
.pie {
width: 100px;
height: 100px;
display: inline-block;
margin: 10px;
transform: rotate(-90deg);
@csssecrets
csssecrets / dabblet.css
Created January 28, 2015 18:15 — forked from LeaVerou/dabblet.css
Static interpolation via paused animations
/**
* Static interpolation via paused animations
* This technique becomes more useful if you need to interpolate more than 1 properties, and/or if you need multiple values in the spectrum
* Currently works in every modern browser except Safari
*/
@keyframes foo {
from { background: red }
to { background: yellowgreen }
}
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 13:07
Static pie charts
/**
* Static pie charts
*/
.pie {
display: inline-block;
position: relative;
width: 100px;
line-height: 100px;
border-radius: 50%;
@csssecrets
csssecrets / dabblet.css
Created January 27, 2015 17:32
Animated pie chart
/**
* Animated pie chart
*/
.pie {
width: 100px; height: 100px;
border-radius: 50%;
background: yellowgreen;
background-image: linear-gradient(to right, transparent 50%, currentColor 0);
color: #655;
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 12:24 — forked from LeaVerou/dabblet.css
Trapezoid tabs
/**
* Trapezoid tabs
*/
body {
padding: 40px;
font: 130%/2 Frutiger LT Std, sans-serif;
}
nav {
@csssecrets
csssecrets / dabblet.css
Created January 26, 2015 12:09
Diamond images — via clip-path
/**
* Diamond images — via clip-path
*/
img {
max-width: 250px;
margin: 20px;
-webkit-clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
transition: 1s;