bevacqua / css

:art: CSS: The Good Parts

Home Page:https://ponyfoo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Z-index clarification

monkbroc opened this issue · comments

You mention twice "Keep z-index levels in variables in a single file". Could you clarify with an example? I don't understand what this rule is trying to say.

Thanks for the detailed guidelines.

Suppose you're using Stylus,

z-questionmark = 10
z-dropdowns = 100
z-dialogs = 10000
.qmark
  z-index z-questionmark

(etc)

The purpose is to know at a glance what's the depth of z-indexes, which we often just set to 100000-like values for no reason other than "this should be high enough

Thanks. The sentence was unclear because of the 2 "in". Maybe: keep all z-index definitions in a single file and make each z-index level a variable.

Feel free to PR clarifying