Skip to content

theming: deprecate and remove legacy theme color generation #23971

Open
@mrmokwa

Description

@mrmokwa

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

Don't know if it's intended behavior or not.
Scss generated by mat.define-dark-theme or mat.define-light-theme have duplicated keys/values/styles.

Notice the duplicated values for:

  • primary
  • accent
  • warn
  • is-dark
  • foreground
  • background

Reproduction

Steps to reproduce:

  1. Create new project ng new
    1.1 Choose SCSS as stylesheet
  2. Add angular material ng add @angular/material
    2.1 For prebuild theme, choose custom option
  3. In styles.scss file, add @debug $name-of-app-theme
    image

Expected Behavior

Should exist only one definition for

  • primary
  • accent
  • warn
  • is-dark
  • foreground
  • background

Actual Behavior

Below I attached the result of @debug . Take a look at primary color, for example and notice the value is repeated for no reason.
The only difference is the parenthesis before.

debug.txt

Environment

  • Angular: 13.0.1
  • CDK/Material: 13.0.0
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions