Skip to content

Instantly share code, notes, and snippets.

@oli
oli / dabblet.css
Last active July 13, 2016 10:34
flexbox width test
/**
* flexbox width test
*/
.ruler {
width: 984px;
height: 6px;
background-color: #888;
}
.container {
width: 983px; /* 983 - 2px (inter-box spacing) = 981 / 3 = 327px */
@oli
oli / dabblet.css
Created July 13, 2016 06:50
Vertical centering with scrolling overflow
/**
* Vertical centering with scrolling overflow
*/
.wrapper1,
.wrapper2 {
width:100%;
height:100%;
margin:0;
padding:0;
}
@oli
oli / dabblet.css
Last active June 6, 2016 06:57
Vertical centering with scrolling overflow
/**
* Vertical centering with scrolling overflow
*/
.wrapper1,
.wrapper2 {
width:100%;
height:100%;
margin:0;
padding:0;
}
@oli
oli / dabblet.css
Created June 6, 2016 06:47
Table layout and ellipsis
/**
* Table layout and ellipsis
*/
.table {
border-collapse: collapse;
table-layout: fixed;
width: 100%
}
td {
@oli
oli / dabblet.css
Created November 12, 2015 05:20
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@oli
oli / dabblet.css
Created November 12, 2015 05:19
removing text-shadow using ::selection kills the selection background color
/**
* removing text-shadow using ::selection kills the selection background color
*/
p {text-shadow: -1px -1px 0 #fde, 1px -1px 0 #fde, -1px 1px 0 #fde, 1px 1px 0 #fde;}
::selection {text-shadow: none; background-color: #b1d7fe;}
@oli
oli / dabblet.css
Created October 28, 2015 07:36
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
p {text-shadow: -1px -1px 0 #fde, 1px -1px 0 #fde, -1px 1px 0 #fde, 1px 1px 0 #fde;}
::selection {text-shadow: none;}
@oli
oli / dabblet.css
Created October 28, 2015 07:33
Generated content and line wrapping
/**
* Generated content and line wrapping
*/
html {
box-sizing: border-box;
}
* {
box-sizing: inherit;
@oli
oli / dabblet.css
Created October 22, 2015 07:57
Generated content and line wrapping
/**
* Generated content and line wrapping
*/
.span1::after {
content: "→→→→→→";
}
.span2::after {
content: "\034F→→→→→";
}
@oli
oli / dabblet.css
Last active October 22, 2015 07:48
@font-face and serif for Japanese
/**
* @font-face and serif for Japanese
*/
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
body {font-family: serif;}
.test {font-family: "Source Sans Pro", serif;}