Skip to content

bug(theme): promlem with css var calculation #28621

Closed
@feichin-noreja

Description

@feichin-noreja

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

If i define a css var with the value of a css var like in the code snippet below some material css variables are not defined correctly.
E.g. --mdc-linear-progress-track-color is set to var(--primary-500) but should be converted to a rgba color with 0,25 opacity.

That causes the theme to have some bad behaviour.

`:root{
--primary-500: #FF0000
}

$primary:(
500: var(--primary-500)
)
`

Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-d9ccxk

Expected Behavior

The css var should be handled like a hex value

Actual Behavior

The css var is copied

Environment

  • Angular: 17.2
  • CDK/Material: 17.2
  • Browser(s): Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions