Skip to content

Instantly share code, notes, and snippets.

@esr360
Last active December 3, 2019 12:52
Show Gist options
  • Select an option

  • Save esr360/35956b645188d40a4e2f694fac978685 to your computer and use it in GitHub Desktop.

Select an option

Save esr360/35956b645188d40a4e2f694fac978685 to your computer and use it in GitHub Desktop.
// Sass (Vanilla)
.myElement {
  color: blue;
  display: none;
  
  .someParent.active & {
    display: block;
  }
}
// JavaScript (Lucid)
const myElement = ({ context }) => ({
  color: 'blue',
  display: context.someParent.active ? 'block' : 'none'
})
// Sass (Cell Atom)
@include module('myElement') {
  color: blue;
  @include display(('someParent', 'active'), block, none);
}
// Sass (Cell Molecule)
@include module('myElement') {
  color: blue;
  @include show('someParent', 'active');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment