Skip to content

Instantly share code, notes, and snippets.

@csssecrets
csssecrets / dabblet.css
Last active February 20, 2023 09:57
Custom checkboxes
/**
* Custom checkboxes
*/
input[type="checkbox"] {
position: absolute;
clip: rect(0,0,0,0);
}
input[type="checkbox"] + label::before {
@csssecrets
csssecrets / dabblet.css
Last active September 28, 2021 21:23
Extending the hit area — with borders
/**
* Extending the hit area — with borders
*/
button {
padding: .3em .5em;
border: 10px solid transparent;
border-radius: 50%;
background: #58a;
background-clip: padding-box;
@csssecrets
csssecrets / dabblet.css
Created February 12, 2015 04:46
Indicating disabled state
/**
* Indicating disabled state
*/
:disabled, [disabled], [aria-disabled="true"] {
cursor: not-allowed;
}
@csssecrets
csssecrets / dabblet.css
Last active May 3, 2024 05:23
Text on a circle
/**
* Text on a circle
*/
body {
font: bold 120% Helvetica, sans-serif;
}
.circular {
width: 30em;
@csssecrets
csssecrets / dabblet.css
Created February 5, 2015 08:07
Extruded text
/**
* Extruded text
*/
body {
background: #58a;
color: white;
text-shadow: 0 1px hsl(0,0%,85%),
0 2px hsl(0,0%,80%),
0 3px hsl(0,0%,75%),
@csssecrets
csssecrets / dabblet.css
Last active September 28, 2021 20:24
Glowing text
/**
* Glowing text
*/
body {
background: #203;
font: bold 500%/1 Rockwell, serif;
}
a {
@csssecrets
csssecrets / dabblet.css
Last active September 28, 2021 20:08
Stroked text
/**
* Stroked text
*/
h1 {
margin: 0;
color: white;
}
h1:first-child { text-shadow: 1px 1px black, -1px -1px black, 1px -1px black, -1px 1px black; }
@csssecrets
csssecrets / dabblet.css
Created February 5, 2015 07:32
Letterpress
/**
* Letterpress
*/
body {
font: 250%/1.6 Baskerville, Palatino, serif;
}
p {
padding: .8em 1em;
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 17:15
Wavy underlines
/**
* Wavy underlines
*/
body {
font: 250%/1.6 Baskerville, Palatino, serif;
}
a {
background: linear-gradient(-45deg, transparent 40%, red 0, red 60%, transparent 0) 0 1em,
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 17:15
Custom underlines
/**
* Custom underlines
*/
body {
font: 250%/1.6 Baskerville, Palatino, serif;
}
a {
background: linear-gradient(gray, gray) no-repeat;