this post was submitted on 10 Mar 2026
16 points (100.0% liked)

Web Development

5522 readers
10 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] dan@upvote.au 8 points 2 days ago

I like the idea of using CSS variables for consistency.

Many years ago, before CSS variables were a thing, I did a very similar thing using a LESS function:

$zindices:
  hero-mobile,
  nav-bar,
  hero,
  nav-contents;

@function zindex($layer) {
  @return index($zindices, $layer);
}

Which would be used like:

z-index: zindex('hero'); 

The z-index value is just that string's position in the list.

[–] tuckerm@feddit.online 6 points 2 days ago (1 children)

Well given how many times I've tried z-index: 999999 and it didn't do what I wanted it to, the value of z-index is apparently multiplied by zero.

(OK fine, I'll read the article...)

[–] techt@lemmy.world 4 points 2 days ago

The value of a z-index is... completely invalidated by a higher stacking context

[–] victorz@lemmy.world 3 points 2 days ago

inb4 --zz-top