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

bug(dialog): dialog's content text color is not secondary-text #20973

Closed
c-kunz opened this issue Nov 5, 2020 · 2 comments
Closed

bug(dialog): dialog's content text color is not secondary-text #20973

c-kunz opened this issue Nov 5, 2020 · 2 comments
Labels
area: material/dialog P4 A relatively minor issue that is not relevant to core functions

Comments

@c-kunz
Copy link

c-kunz commented Nov 5, 2020

Description

When looking at the Material Design page of Dialogs (https://material.io/components/dialogs#anatomy) one can see that the Dialog's content text (in the Anatomy example this is labeled as Supporting text) is displayed in a lighter gray than the title.

Reproduction

Repository: https://github.com/c-kunz/mat-dialog-content-secondary-text

Steps to reproduce:

  1. git clone https://github.com/c-kunz/mat-dialog-content-secondary-text repro
  2. cd repro
  3. npm i
  4. ng serve -o

Expected Behavior

I would expect the dialog's content to be in a lighter gray than the title. When looking at the Angular Material Theme Color Configuration I would expect this to be:

theme-or-color-config: foreground: secondary-text.

Actual Behavior

The dialog's content text color is the same as the title's color (rgba(0,0,0, 0.87)).

Workaround attempt

I've tried to find a fitting CSS class as described in here, but with no luck: https://material.angular.io/guide/typography#material-typography-in-your-custom-css

I've tried to do the following:

$theme: ...
.my-theme {
    @include angular-material-theme($theme);

    .mat-dialog-content {
        color: map-get(map-get($theme, foreground), secondary-text);
    }
}

But this causes every text to be displayed in that secondary-text, even in mat-form-fields where I want the darker variant so it can be read better.

Environment

  • Angular: 10.2.2
  • CDK/Material: 10.2.7
@c-kunz c-kunz added the needs triage This issue needs to be triaged by the team label Nov 5, 2020
@mmalerba mmalerba added Fixed in MDC P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team Fixed in MDC labels Nov 9, 2020
@amysorto
Copy link
Contributor

The new MDC based dialog component coming soon in v15 follows the spec and the text content is lighter by default. It is using the color defined here: https://github.com/angular/components/blob/main/src/material/dialog/_dialog-theme.scss#L24.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/dialog P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

4 participants