Icon-button - in the outline version the border sinks behind parent background due to stacking context #15299
Labels
🐛 bug
Any issue that describes a bug
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Description
The outline version of the icon button is created using an
::after
pseudo-element, which adds a border around the button. This element is assigned az-index: -1
, but this causes an issue when the button is placed within an element that has a background color.Due to the stacking context, the border is rendered behind the direct parent element's background since the button itself does not have a z-index.
Fix:
If the
z-index: -1
on the::after
element is not necessary remove it or if it's required addz-index: 0
to the button itselfSteps to reproduce
Result
The border goes behind the parent's background
Expected result
the border should be visible
Attachments
No background
Background (observe the last button)
Expected
The text was updated successfully, but these errors were encountered: