From 34ae790dcd8ce4e4df500f7e01d446ef0b5f5a78 Mon Sep 17 00:00:00 2001 From: MeAkib Date: Fri, 23 Oct 2026 09:20:33 +0600 Subject: [PATCH] refactor(material/core): remove unused private theming variables Removes private Sass variables in the theming files that aren't referenced anywhere. The compiled CSS of the prebuilt themes and the theming tests is unchanged. --- .../theming/_color-api-backwards-compatibility.scss | 5 ----- src/material/core/theming/_theming.scss | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/src/material/core/theming/_color-api-backwards-compatibility.scss b/src/material/core/theming/_color-api-backwards-compatibility.scss index 1e1b75af91f2..fd8337fea88d 100644 --- a/src/material/core/theming/_color-api-backwards-compatibility.scss +++ b/src/material/core/theming/_color-api-backwards-compatibility.scss @@ -18,11 +18,6 @@ @use '../option/option-theme'; @use '../selection/pseudo-checkbox/pseudo-checkbox-theme'; -// We want to emit only the overrides, because the backwards compatibility styles are usually -// emitted after all the tokens have been included once already. This allows us to save ~50kb -// from the bundle. -$_overrides-only: true; - @mixin _color-variant-styles($theme, $color-variant) { $secondary-when-primary: $color-variant; diff --git a/src/material/core/theming/_theming.scss b/src/material/core/theming/_theming.scss index 0b9ffa7eb2a7..a8dea2459ed9 100644 --- a/src/material/core/theming/_theming.scss +++ b/src/material/core/theming/_theming.scss @@ -11,9 +11,6 @@ $theme-ignore-duplication-warnings: false; // Whether to enable compatibility with legacy methods for accessing theme information. $theme-legacy-inspection-api-compatibility: true !default; -// Whether density should be generated by default. -$_generate-default-density: true !default; - // Warning that will be printed if the legacy theming API is used. $private-legacy-theme-warning: 'Angular Material themes should be created from a map containing ' + 'the keys "color", "typography", and "density". The color value should be a map containing the ' + @@ -24,13 +21,6 @@ $private-legacy-theme-warning: 'Angular Material themes should be created from a // This copy is to preserve backwards compatibility. $_disable-color-backwards-compatibility: false; -// These variable are not intended to be overridden externally. They use `!default` to -// avoid being reset every time this file is imported. -$_emitted-color: () !default; -$_emitted-typography: () !default; -$_emitted-density: () !default; -$_emitted-base: () !default; - // // Private APIs //