Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Move z-index to table wrapper box #3595

Conversation

InvalidUsernameException
Copy link
Contributor

@InvalidUsernameException InvalidUsernameException commented Feb 16, 2025

When drawing a table, some of the CSS properties must be moved from the table grid box to an anonamyous table wrapper box. One of these properties is position. z-index however is not. This leads to the following behavior if a table has both position and z-index:

  • The wrapper box has the position, but a z-index of auto.
  • The grid box has the z-index, but position: static.

This effectively means that the z-index property is ignored since it has no effect on non-positioned elements. This behavior contradicts what other browsers do and causes layout issues on websites.

To align Ladybird behavior with other browser this commit also moves the z-index property to the wrapper box.

Fixes #3533.

When drawing a table, some of the CSS properties must be moved from the
table grid box to an anonamyous table wrapper box. One of these
properties is `position`. `z-index` however is not. This leads to the
following behavior if a table has both `position` and `z-index`:
* The wrapper box has the `position`, but a `z-index` of `auto`.
* The grid box has the `z-index`, but `position: static`.

This effectively means that the `z-index property is ignored since it
has no effect on non-positioned elements. This behavior contradicts what
other browsers do and causes layout issues on websites.

To align Ladybird behavior with other browser this commit also moves the
`z-index` property to the wrapper box.
@kalenikaliaksandr kalenikaliaksandr enabled auto-merge (rebase) February 16, 2025 18:54
@kalenikaliaksandr kalenikaliaksandr merged commit 29d7463 into LadybirdBrowser:master Feb 16, 2025
7 checks passed
@InvalidUsernameException InvalidUsernameException deleted the tables-with-z-index branch February 16, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

z-index is ignored on table elements
2 participants