Skip to content

Positioned elements should be painted in front of others #30428

@Loirooriol

Description

@Loirooriol
<!DOCTYPE html>
<style>
.wrapper { display: inline-block; width: 100px; height: 100px; border: 5px solid }
</style>
<div class="wrapper">
  <div style="height: 50px; position: relative; left: 50px; background: cyan"></div>
</div>
<div class="wrapper"></div>
2020 (bad) 2013 (good)

See https://drafts.csswg.org/css-position-4/#paint-a-stacking-context, the back-to-front order is

  1. Positioned with negative z-index
  2. Non-positioned
  3. Positioned with z-index: auto or z-index: 0
  4. Positioned with positive z-index: 0

Metadata

Metadata

Assignees

Labels

A-layout/2020https://github.com/servo/servo/wiki/Layout-2020

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions