From e3917ea173fdadfe20dba332d69c3d84ea6a8d32 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 15 Mar 2023 14:09:43 +0100 Subject: [PATCH] fix(material/chips): chip label appearing above sticky columns (#26794) Fixes that the `z-index`, which is set on the chip labels, appears on top of sticky columns inside a table. Fixes #26793. --- src/material/chips/chip.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/material/chips/chip.scss b/src/material/chips/chip.scss index c475a21c1db3..2b7135266df2 100644 --- a/src/material/chips/chip.scss +++ b/src/material/chips/chip.scss @@ -226,6 +226,11 @@ // Required for the strong focus indicator to fill the chip. .mat-mdc-chip { position: relative; + + // `.mat-mdc-chip-action-label` below sets a `z-index: 1` to put the label above the focus + // overlay, but that can also cause it to appear above other elements like sticky columns + // (see #26793). Set an explicit `z-index` to prevent the label from leaking out. + z-index: 0; } .mat-mdc-chip-action-label {