Skip to content

Commit

Permalink
refactor(theme)!: removed deprecated functions and mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdamevin committed May 25, 2023
1 parent 90fa6d2 commit df04297
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 34 deletions.
7 changes: 0 additions & 7 deletions color/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,3 @@ $_custom-property-prefix: "color";
@function emit-variable($token, $fallback: false) {
@return core.emit-variable(core.$colors, _exist($token), $fallback, $_custom-property-prefix);
}

///
/// @deprecated Use `emit-variable()` function instead.
///
@function variable($token, $fallback: false) {
@return emit-variable($token, $fallback);
}
7 changes: 0 additions & 7 deletions core/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
@return $tokens;
}

///
/// @deprecated Use `validation()` function instead.
///
@function validate-theme($reference, $tokens) {
@return validation($reference, $tokens);
}

///
/// Transforms a user-provided theme's tokens map values into a `var()` custom properties.
///
Expand Down
18 changes: 0 additions & 18 deletions core/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,6 @@
}
}

///
/// @deprecated Use `emit-color-scheme()` mixin instead.
///
@mixin prefers-color-scheme($scheme: light) {
$theme: (
light,
dark
);

@if list.index($theme, $scheme) == null {
@error "Invalid color scheme, '#{$scheme}' doesn't exist. Choose one of '#{$theme}'.";
}

@media (prefers-color-scheme: $scheme) {
@content;
}
}

///
/// Config.
///
Expand Down
2 changes: 1 addition & 1 deletion shape/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $_custom-property-prefix: "shape";
}
}

$tokens: core.validate-theme(core.$shapes, $theme);
$tokens: core.validation(core.$shapes, $theme);
$tokens: core.create-theme-vars($theme, $_custom-property-prefix);

@include core.emit-theme-vars($tokens);
Expand Down
2 changes: 1 addition & 1 deletion typography/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $_custom-property-prefix: "typography";
}
}

$tokens: core.validate-theme(core.$typographies, $theme);
$tokens: core.validation(core.$typographies, $theme);
$tokens: core.create-theme-vars($theme, $_custom-property-prefix);

@include core.emit-theme-vars($tokens);
Expand Down

0 comments on commit df04297

Please sign in to comment.