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
body { | |
color: blue; | |
@media screen and (resolution >= 0dppx) { | |
color:red; | |
} | |
} |
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
# Points to the global docker-compose config | |
local _compose_file="$HOME/workspace/services/docker-compose/docker-compose.yml" | |
# https://docs.docker.com/compose/reference/envvars/ | |
if [[ -n "$COMPOSE_FILE" ]]; then | |
export COMPOSE_FILE="${COMPOSE_FILE}${COMPOSE_PATH_SEPARATOR:-":"}${_compose_file}" | |
else | |
export COMPOSE_FILE=$_compose_file | |
fi |
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
javascript:void(()=>{document.addEventListener("click",({target:e})=>{console.log("Parent node count",parentNodeCount(e),"depth of",depthNodeCount(e),"nodes with ",charCount(e),"chars in",e)});const depthNodeCount=e=>e.getElementsByTagName("*").length,charCount=e=>e.outerHTML.length,parentNodeCount=e=>{let t=e,n=0;for(;t.parentNode;)n++,t=t.parentNode;return n};})(); |
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
class Feature { | |
load(url, callback) { | |
$.ajax({ url }) | |
.done((data) => { | |
callback.apply(this, [null, data]) | |
}) | |
.fail((jqXHR) => { | |
callback.apply(this, [jqXHR.statusText]) | |
}) | |
} |
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
/* rem unit setup based on | |
:root { | |
font-size: 10px; | |
} | |
*/ | |
/// @example | |
/// .foo { box-shadow: material-shadow(dp3); } | |
@function material-shadow($elevation) { | |
$umbra: rgba(black, .14); | |
$penumbra: rgba(black, .12); |
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
en space:   | |
em space:   | |
3-per-em space:   | |
4-per-em space:   | |
6-per-em space:   | |
figure space:   | |
punctuation space:   | |
thin space:   | |
hair space:   |
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
// | |
// Variables | |
// ------------------------------------- | |
$blue: #00a3de; | |
$blue-light: #7fd1ee; | |
$blue-lightest: #e5f6fc; | |
$grey: #b5babd; | |
$side-color-a: $grey; |
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
$easing: cubic-bezier(0.6,0.15,0.4,0.85); | |
$timing: 250ms; | |
$offset: 2em; | |
$line-height-btn-base: 2.3; | |
$line-height-btn-xs: 1.5; | |
.btn-inner { | |
display: block; | |
-webkit-transform: translateY(0); | |
transform: translateY(0); |
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
// breakpoints | |
@mixin breakpoint($point) { | |
// | |
// large | |
// | |
@if $point == large-only { | |
@media (min-width: $screen-lg-min) and (max-width: $screen-lg-min + 1) { @content; } | |
} | |
@else if $point == large-up { |
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
// converting a px based font-size to rem | |
@function calculate-rem($size) { | |
$rem-size: $size / $default-font-size; | |
@return #{ $rem-size }rem; | |
} | |
@mixin font-size($size) { | |
font-size: $size; | |
font-size: calcuate-rem($size); | |
} |
NewerOlder