Skip to content

Commit d6d0f80

Browse files
committed
refactor(material/core): remove unused compatibility code (#28018)
Removes some density-related code that isn't being used anywhere anymore. (cherry picked from commit 4395cdf)
1 parent a6d54a2 commit d6d0f80

File tree

2 files changed

+0
-88
lines changed

2 files changed

+0
-88
lines changed

src/material/core/density/private/_compatibility.scss

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/material/core/theming/_theming.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
@use 'sass:math';
44
@use 'sass:meta';
55
@use 'palette';
6-
@use '../density/private/compatibility';
76

87
// Whether to enable compatibility with legacy methods for accessing theme information.
98
$theme-legacy-inspection-api-compatibility: true !default;
@@ -481,20 +480,7 @@ $_internals: _mat-theming-internals-do-not-access;
481480
$_emitted-density: map.merge($_emitted-density, ($id: $previous-density)) !global;
482481
$_emitted-typography: map.merge($_emitted-typography, ($id: $previous-typography)) !global;
483482

484-
// If duplicate default density styles would be generated for a legacy constructed theme,
485-
// we adjust the density generation so that no density styles are generated by default.
486-
// If no default density styles have been generated yet, we ensure that the styles
487-
// are generated at root. For legacy themes our goal is to generate default density
488-
// styles **once** and at root. This matches the old behavior where density styles were
489-
// part of the base component styles (that did not use view encapsulation).
490-
// TODO: Remove this compatibility logic when the legacy theming API is removed.
491-
compatibility.$private-density-generate-at-root: private-is-legacy-constructed-theme($theme);
492-
compatibility.$private-density-generate-styles: not $duplicate-legacy-density;
493-
494483
@content;
495-
496-
compatibility.$private-density-generate-at-root: false;
497-
compatibility.$private-density-generate-styles: true;
498484
}
499485

500486
// Checks whether the given value resolves to a theme object. Theme objects are always

0 commit comments

Comments
 (0)