Skip to content

Instantly share code, notes, and snippets.

@argyleink
Created December 26, 2018 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save argyleink/9f9d8ce0e7d09f1788787b25b176d1fa to your computer and use it in GitHub Desktop.
Save argyleink/9f9d8ce0e7d09f1788787b25b176d1fa to your computer and use it in GitHub Desktop.
css and js doing similar tasks
foo {
color: hsl(100,80%,75%);
background-color: hsl(100,20%,25%);
}
foo.map(styles => ({
...styles,
color: 'hsl(100,80%,75%)',
background-color: 'hsl(100,20%,25%)',
}))
foo {
color: hsl(100,80%,75%);
background-color: hsl(100,20%,25%);
&.primary {
color: hotpink;
}
}
foo
.filter(node =>
node.classList.contains('primary'))
.map(styles => ({
...styles,
color: 'hotpink'
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment