Skip to content

fix(cdk/accordion): replace hardcoded colors with theme tokens#33388

Open
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:fix-cdk-accordion-theme
Open

fix(cdk/accordion): replace hardcoded colors with theme tokens#33388
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:fix-cdk-accordion-theme

Conversation

@BHUVANSH855

Copy link
Copy Markdown
Contributor

Description

Replaces hardcoded colors in the CDK accordion overview example with Material theme tokens.

Changes

  • Replace #ccc with --mat-sys-outline-variant for accordion item borders
  • Replace #999 with --mat-sys-on-surface-variant for description text
  • Replace #eee with --mat-sys-surface-container for hover state styling

Motivation

The example used fixed color values that do not adapt to the active theme. Using Material theme tokens improves consistency across light and dark themes while preserving the existing appearance and behavior.

.example-accordion-item {
display: block;
border: solid 1px #ccc;
border: 1px solid var(--mat-sys-outline-variant);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We intentionally don't use Material concepts in the CDK since the CDK is supposed to be independent of Material.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants