This file contains hidden or 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
/** | |
* Sum of all elements including nested arrays. | |
* | |
* by Dmitry Soshnikov <[email protected]> | |
* MIT Style License | |
*/ | |
[1, 2, [3, 4], 5, [6, [7, 8]]].reduce(function collect(previous, current) { | |
return ( | |
(Array.isArray(previous) ? previous.reduce(collect) : previous) + |
This file contains hidden or 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
// Group class for clearing floats | |
.group { | |
&:before, | |
&:after { | |
content: " "; | |
display: table; | |
} | |
&:after { |
This file contains hidden or 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
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |