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

Icon-button - in the outline version the border sinks behind parent background due to stacking context #15299

Open
desig9stein opened this issue Jan 24, 2025 · 0 comments · May be fixed by #15310, #15312 or #15311
Assignees
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.

Comments

@desig9stein
Copy link
Contributor

desig9stein commented Jan 24, 2025

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 a z-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 add z-index: 0 to the button itself

  • igniteui-angular version:
  • browser: all

Steps to reproduce

  1. Use the outlined version of the icon button inside any element/component that has a background color.

Result

The border goes behind the parent's background

Expected result

the border should be visible

Attachments

No background
Image

Background (observe the last button)
Image

Expected
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
3 participants