DEV Community


Discussion on: An Incredibly Easy Way to Manage Layers in SCSS

lewy_blue profile image
Lewy Blue | Discover three.js

Is there any advantage to using extend rather than a variable?

$layer-nav: 10;
$layer-dimmer: 11;
$layer-modal: 12;

  // some properties
  z-index: $layer-nav;
seibmacdaniel profile image
Mac Daniel Author • Edited

Works the same way, probably better if you're really sticking to unique z-index value per component. I just like making things more readable, I guess, hence the "layer" prefix which replaces the "z-index" term in the components' properties