Skip to content

bug(mat-expansion): expose box-shadow as css variable #31313

Closed
@RobinKamps

Description

@RobinKamps

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Please add a css variable to set the box-shadow for easy access / theming:

.mat-expansion-panel:not([class*=mat-elevation-z]) {
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

drop shadow of panel could be set via a css variable

Actual Behavior

drop shadow of panel can not set via a css variable

Environment

  • Angular: latest / 20x
  • CDK/Material: 20.0.2
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Activity

self-assigned this
on Jun 12, 2025
added
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triageThis issue needs to be triaged by the team
on Jun 12, 2025
added a commit that references this issue on Jun 12, 2025
6f50882
added a commit that references this issue on Jun 13, 2025
d52ede5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/expansion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @crisbeto@RobinKamps

    Issue actions

      bug(mat-expansion): expose box-shadow as css variable · Issue #31313 · angular/components