Skip to content

Instantly share code, notes, and snippets.

View mykelsoft's full-sized avatar
🎯
Focusing

kalungat mykelsoft

🎯
Focusing
View GitHub Profile
@mykelsoft
mykelsoft / dabblet.css
Created October 25, 2018 12:24 — forked from csssecrets/dabblet.css
Fluid background, fixed content
/**
* Fluid background, fixed content
*/
header, section, footer {
padding: 1em calc(50% - 350px);
}
footer {
background: #333;
@mykelsoft
mykelsoft / dabblet.css
Created October 25, 2018 02:01 — forked from csssecrets/dabblet.css
Styling by sibling count: Color palette example
/**
* Styling by sibling count: Color palette example
*/
/* Hide "color" 4 items or more */
.palette li:first-child:nth-last-child(n+4) .color-options a:after,
.palette li:first-child:nth-last-child(n+4) ~ li .color-options a:after {
content: none;
}
@mykelsoft
mykelsoft / dabblet.css
Created October 25, 2018 01:58 — forked from csssecrets/dabblet.css
Taming table column widths
/**
* Taming table column widths
*/
body { background: #ddd }
section {
width: 500px;
margin: 2em;
background: white;
@mykelsoft
mykelsoft / dabblet.css
Created October 25, 2018 01:55 — forked from csssecrets/dabblet.css
Intrinsic sizing
/**
* Intrinsic sizing
*/
figure {
max-width: 300px;
max-width: min-content;
margin: auto;
}
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 04:00 — forked from csssecrets/dabblet.css
Interactive image comparison - with CSS resize
/**
* Interactive image comparison - with CSS resize
*/
.image-slider {
position:relative;
display: inline-block;
}
.image-slider > div {
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 03:35 — forked from csssecrets/dabblet.css
Scrolling hints
/**
* Scrolling hints
*/
ul {
display: inline-block;
overflow: auto;
width: 7.2em;
height: 7em;
border: 1px solid silver;
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 03:17 — forked from csssecrets/dabblet.css
De-emphasizing by blurring (AND dimming)
/**
* De-emphasizing by blurring (AND dimming)
*/
main {
transition: .6s;
background: white;
}
main.de-emphasized {
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 03:07 — forked from csssecrets/dabblet.css
Native modal dialog (limited support)
/**
* Native modal dialog (limited support)
*/
dialog::backdrop {
background: rgba(0,0,0,.8)
}
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 03:05 — forked from csssecrets/dabblet.css
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);
}
@mykelsoft
mykelsoft / dabblet.css
Created October 23, 2018 02:57 — forked from csssecrets/dabblet.css
Toggle buttons
/**
* Toggle buttons
*/
input[type="checkbox"] {
position: absolute;
clip: rect(0,0,0,0);
}
input[type="checkbox"] + label {