This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIXIN | |
=when($min: false, $max: false, $ie: false) | |
@if $min and not($max) | |
@media (min-width: $min) | |
@content | |
@if $max and not($min) | |
@media (max-width: $max) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toCollection(elementOrString) { | |
return (elementOrString instanceof Element) ? [elementOrString] : | |
Array.prototype.slice.call((elementOrString instanceof NodeList) ? elementOrString : document.querySelectorAll(elementOrString)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pulled-to-right { | |
float: right; | |
width: 50%; | |
background-image: url(http://www.nasa.gov/images/content/745223main_image04292013_250m_800-600.jpg); | |
background-size: cover; | |
height: 30vw; | |
} | |
p { | |
margin-left: 5%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fixing inline-block + overflow: hidden in Firefox + Opera | |
*/ | |
.overflow { | |
max-width: 100%; | |
overflow: hidden; | |
white-space: nowrap; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
.overflow { | |
max-width: 100%; | |
overflow: hidden; | |
white-space: nowrap; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Clearing floats with overflow: auto | |
*/ | |
.bg { | |
background: red; | |
} | |
.cf { | |
overflow: auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS only tooltip | |
*/ | |
.tooltip:hover { | |
position: relative; | |
} | |
.tooltip:before, | |
.tooltip:after { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Micro Clearfix IE8+ | |
*/ | |
.box { | |
width: 100px; | |
height: 100px; | |
background: gray; | |
padding: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Moving arrow navigation with CSS only | |
*/ | |
ul { | |
position: relative; | |
margin: 3em 0; | |
list-style: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* _nav without clearfix | |
*/ | |
.nav{ | |
list-style:none; | |
margin-left:0; | |
} | |
.nav > li, |