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
// 12 July 2020 | |
// prompted by Cory House tweet | |
// @see https://twitter.com/housecor/status/1282375519481323520 | |
function omit(array, descriptor) { | |
// Return the input if it's not an array, or if the descriptor is not an Object. | |
if (!Array.isArray(array) || descriptor !== Object(descriptor)) { | |
return array; | |
} | |
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
angular.module('utils.filters', []) | |
.filter('removeAccents', removeAccents); | |
function removeAccents() { | |
return function (source) { | |
var accent = [ | |
/[\300-\306]/g, /[\340-\346]/g, // A, a | |
/[\310-\313]/g, /[\350-\353]/g, // E, e | |
/[\314-\317]/g, /[\354-\357]/g, // I, i | |
/[\322-\330]/g, /[\362-\370]/g, // O, o |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% 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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% 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
/** | |
* A Very Brady Adjacent Sibling Selector Demo | |
*/ | |
body{ | |
background: #000; | |
min-height: 100%; | |
font-family:"Helvetica Neue", Helvetica, Arial, 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
/** | |
* Traffic light animation | |
*/ | |
#trafficlight{ | |
background:#333; | |
height:300px; | |
width:150px; | |
border-radius:30px; | |
margin:3em auto; |