Skip to content

bug(mat-card): mat-card-header wrong text color #29881

@CourserStudio

Description

@CourserStudio

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

I have a mat-card in a dialog with dark theme, the title text color is black.

Image

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

The text color in mat-card-header should be white.

Actual Behavior

The text color in mat-card-header is black.

Environment

  • Angular: 18.1.0
  • CDK/Material: 18.2.8
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): mcsOS

Activity

crisbeto

crisbeto commented on Oct 16, 2024

@crisbeto
Member

It's hard to tell what might be going on based purely on a screenshot. I'm guessing that the theme isn't being applied inside the dialog.

wagnermaciel

wagnermaciel commented on Oct 18, 2024

@wagnermaciel
Contributor

Could you provide a stackblitz example reproducing the issue?

added
cannot reproduceThe team is unable to reproduce this issue with the information provided
needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bug
and removed
needs triageThis issue needs to be triaged by the team
on Oct 18, 2024
gremmil

gremmil commented on Mar 13, 2025

@gremmil

Same problem here with mat-card-title and mat-card-content

jakubweber

jakubweber commented on Jul 23, 2025

@jakubweber

Using mat.theme and color-scheme as documentation mentioned, when dark mode is active title and content has very low contrast color to the background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: material/cardcannot reproduceThe team is unable to reproduce this issue with the information providedneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @crisbeto@jakubweber@wagnermaciel@gremmil@CourserStudio

        Issue actions

          bug(mat-card): mat-card-header wrong text color · Issue #29881 · angular/components