Skip to content

Instantly share code, notes, and snippets.

@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 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 12, 2015 04:46
Indicating disabled state
/**
* Indicating disabled state
*/
:disabled, [disabled], [aria-disabled="true"] {
cursor: not-allowed;
}
@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
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
Created February 13, 2015 22:18
Toggle buttons
/**
* Toggle buttons
*/
input[type="checkbox"] {
position: absolute;
clip: rect(0,0,0,0);
}
input[type="checkbox"] + label {
@csssecrets
csssecrets / dabblet.css
Created February 13, 2015 22:33
Rudimetary overlay with box-shadow
/**
* Rudimetary overlay with box-shadow
*/
.lightbox {
position: fixed;
top: 50%; left: 50%;
margin: -200px;
box-shadow: 0 0 0 50vmax rgba(0,0,0,.8);
}
@csssecrets
csssecrets / dabblet.css
Created February 13, 2015 22:52
Native modal dialog (limited support)
/**
* Native modal dialog (limited support)
*/
dialog::backdrop {
background: rgba(0,0,0,.8)
}
@csssecrets
csssecrets / dabblet.css
Last active September 29, 2021 19:26
De-emphasizing by blurring (AND dimming)
/**
* De-emphasizing by blurring (AND dimming)
*/
main {
transition: .6s;
background: white;
}
main.de-emphasized {
@csssecrets
csssecrets / dabblet.css
Last active June 3, 2018 09:48
Interactive image comparison — range input version
/**
* Interactive image comparison — range input version
*/
.image-slider {
position:relative;
display: inline-block;
}
.image-slider > div {