Skip to content

Commit

Permalink
refactor: remove deprecated symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
json-derulo committed Oct 17, 2023
1 parent e2321f5 commit 62d0c0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
5 changes: 0 additions & 5 deletions projects/material-css-vars/src/lib/_public-util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@

// mixins
// ------
@mixin mat-css-color-and-contrast($hue) {
@warn "mat-css-color-and-contrast() is deprecated. Please use mat-css-color-and-contrast-primary() instead.";
@include mat-css-color-and-contrast-primary($hue);
}

@mixin mat-css-color-and-contrast-primary($hue) {
background: mat-css-color-primary($hue);
color: mat-css-contrast-color($hue);
Expand Down
25 changes: 1 addition & 24 deletions projects/material-css-vars/src/lib/material-css-vars.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class MaterialCssVarsService {
primary = "#03a9f4";
accent = "#e91e63";
warn = "#f44336";
isDarkTheme = false; // ToDo: make this attribute optional in next major version
isDarkTheme?: boolean;
contrastColorThresholdPrimary: HueValue = "400";
contrastColorThresholdAccent: HueValue = "400";
contrastColorThresholdWarn: HueValue = "400";
Expand Down Expand Up @@ -191,29 +191,6 @@ export class MaterialCssVarsService {
this.setWarnColor(this.warn);
}

/** @deprecated use setContrastColorThresholdPrimary instead */
changeContrastColorThresholdPrimary(threshold: HueValue) {
this.setContrastColorThresholdPrimary(threshold);
}

/** @deprecated use setContrastColorThresholdAccent instead */
changeContrastColorThresholdAccent(threshold: HueValue) {
this.setContrastColorThresholdAccent(threshold);
}

/** @deprecated use setContrastColorThresholdWarn instead */
changeContrastColorThresholdWarn(threshold: HueValue) {
this.setContrastColorThresholdWarn(threshold);
}

/** @deprecated use setContrastColorThreshold instead */
changeContrastColorThreshold(
threshold: HueValue,
palettePrefix: MatCssPalettePrefix,
) {
this.setContrastColorThreshold(threshold, palettePrefix);
}

getPaletteForColor(hex: string): MatCssHueColorMapItem[] {
if (this.cfg.isAlternativeColorAlgorithm) {
return this.getTraditionalPaletteForColor(hex);
Expand Down

0 comments on commit 62d0c0a

Please sign in to comment.