Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active August 29, 2015 14:20
flexbox menu 2
/**
* flexbox menu 2
* http://forum.selfhtml.org/self/2015/apr/27/menue-horizontal-ausrichten/1638793#m1638793
*/
html
{
padding: 0;
background: hsl(240, 60%, 4%);
font: bold 1em/1.2 Helvetica, sans-serif;
color: hsl(30, 40%, 80%);
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Created April 23, 2015 12:58
vertically centered
/**
* vertically centered
*/
figure
{
display: flex;
flex-direction: column;
justify-content: center;
width: 12em;
/**
* optgroup
*/
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active August 29, 2015 14:19
Flexbox: 7 pictures
/**
* Flexbox: 7 pictures
*/
figure
{
display: flex;
align-items: center;
margin: 0;
}
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active August 29, 2015 14:19
star rating (clip-path)
/**
* star rating (clip-path)
*/
figure
{
margin: 0;
width: 100%;
height: 0%;
padding-top: 20%;
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active August 29, 2015 14:18
description list
/**
* description list
*/
dl { font: 1.5em/1.25 Georgia; width: 20em; margin: 1.25em auto }
dt, dd { display: inline; margin: 0 }
dt { font-style: italic }
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active December 13, 2022 09:27
hexagon clip-path
/**
* hexagon clip-path
*/
div
{
width: 400px;
height: 346px; /* ½√3 × width */
position: relative;
overflow: hidden;
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Created March 30, 2015 21:22
fake hexagon mask
/**
* fake hexagon mask
*/
div
{
width: 200px;
position: relative;
}
@gunnarbittersmann
gunnarbittersmann / dabblet.css
Last active August 29, 2015 14:17
collapse empty table rows
/**
* collapse empty table rows
*/
table
{
border-collapse: collapse;
}
td
/**
* Flexbox too
*/
html
{
background: white;
display: flex;
flex-direction: column;
justify-content: center;