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
:root { | |
--my-var: 🎃; | |
} | |
.foo { | |
color: var(--my-var); | |
} |
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
.foo { | |
color: var(--my-var, red); /* Red if --my-var is not defined */ | |
} |
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
:root { | |
/* Set initial saturation and lightness values */ | |
--sat: 50%; | |
--light: 50%; | |
/* Set amount of light & saturation to change for darker & lighter color variants */ | |
--shader: 15%; | |
/* Calculate saturation values for lighter & darker color variations */ | |
--satDarker: calc(var(--sat) + var(--shader)); |
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
// https://courses.wesbos.com/account/access/5b6921eb99ce1f5578c26a50/view/174357559 | |
const cuts = [ 'Chuck', 'Brisket', 'Shank', 'Short Rib' ]; | |
for ( const index in cuts ) { | |
console.log( cuts[index] ); | |
} |
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
// https://courses.wesbos.com/account/access/5b6921eb99ce1f5578c26a50/view/174357553 | |
function left_pad( str, length = 20 ) { | |
return `-> ${' '.repeat( length - str.length )}${str}; | |
} | |
console.log( left_pad( 'All' ); | |
console.log( left_pad( 'these' ); | |
console.log( left_pad( 'strings' ); | |
console.log( left_pad( 'should' ); | |
console.log( left_pad( 'be' ); |
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
/* | |
* Root-level Variables | |
* Usage: color: var( --c-primary ); | |
*/ | |
:root { | |
--c-blue-quinary: #174893; | |
--c-white: #ffffff; | |
--font-secondary: 'Source Sans Pro', sans-serif; |
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
:root { | |
/* Colors. */ | |
--color-white: #fff; | |
--color-dark: #111; | |
--color-light: #e9e9e8; | |
--color-brand: #5a6fff; | |
--color-black-rgb: 0, 0, 0; | |
--spacing-unit: 0.5rem; | |
--spacing-unit-2: 1rem; |
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
######################################### | |
# Docker # | |
######################################### | |
alias dc="docker-compose" | |
# Interact with WP-CLI in Docker container | |
alias dockwp="docker-compose exec --user www-data phpfpm wp" | |
# SSH in to Docker container | |
alias dockroot="docker-compose exec --user root phpfpm bash" | |
alias dockbash='docker-compose exec --user www-data phpfpm bash' |