Skip to content

Commit

Permalink
refactor(button): Reduce build warnings by using sass modules as oppo…
Browse files Browse the repository at this point in the history
…sed to top-level-functions.

PiperOrigin-RevId: 702178598
  • Loading branch information
material-web-copybara authored and copybara-github committed Dec 3, 2024
1 parent e0563ec commit 4f94e3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/mdc-button/_button-shared-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@use '@material/theme/theme';
@use '@material/theme/theme-color';
@use '@material/typography/typography';
@use './button-ripple';
@use 'button-ripple';

$height: 36px !default;
$horizontal-padding: 8px !default;
Expand Down Expand Up @@ -526,6 +526,7 @@ $disabled-container-color: rgba(
$feat-structure: feature-targeting.create-target($query, structure);

@include feature-targeting.targets($feat-structure) {
// stylelint-disable-next-line shorthand-property-no-redundant-values --
// $padding should be a single value; enforce it by specifying all 4 sides in the output
padding: 0 $padding 0 $padding;
}
Expand Down Expand Up @@ -745,7 +746,7 @@ $disabled-container-color: rgba(
);

.mdc-button__focus-ring {
@if $radius-value != 0 and type-of($radius-value) == 'number' {
@if $radius-value != 0 and meta.type-of($radius-value) == 'number' {
@include focus-ring.focus-ring-radius(
$ring-radius: $radius-value,
$query: $query
Expand Down Expand Up @@ -779,7 +780,7 @@ $disabled-container-color: rgba(
);

.mdc-button__focus-ring {
@if $offset-value != 0 and type-of($offset-value) == 'number' {
@if $offset-value != 0 and meta.type-of($offset-value) == 'number' {
@include focus-ring.focus-ring-offset(
$offset: $offset-value,
$query: $query
Expand Down

0 comments on commit 4f94e3c

Please sign in to comment.