Skip to content

Commit

Permalink
chore: replace input-control by input-control-min-height
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Aug 12, 2024
1 parent d370a17 commit c7e5ee4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 35 deletions.
8 changes: 4 additions & 4 deletions src/components/controls/TextInput/TextInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ $block: '.#{variables.$ns}text-input';
&_size {
&_s {
#{$block}__control {
@include control-mixins.input-control(s);
@include control-mixins.input-control-min-height(s);
}

#{$block}__label {
Expand Down Expand Up @@ -178,7 +178,7 @@ $block: '.#{variables.$ns}text-input';

&_m {
#{$block}__control {
@include control-mixins.input-control(m);
@include control-mixins.input-control-min-height(m);
}

#{$block}__label {
Expand Down Expand Up @@ -209,7 +209,7 @@ $block: '.#{variables.$ns}text-input';

&_l {
#{$block}__control {
@include control-mixins.input-control(l);
@include control-mixins.input-control-min-height(l);
}

#{$block}__label {
Expand Down Expand Up @@ -240,7 +240,7 @@ $block: '.#{variables.$ns}text-input';

&_xl {
#{$block}__control {
@include control-mixins.input-control(xl);
@include control-mixins.input-control-min-height(xl);
}

#{$block}__label {
Expand Down
31 changes: 0 additions & 31 deletions src/components/controls/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,6 @@
@use '../variables.scss';
@use './variables.scss' as control-variables;

@mixin input-control($size) {
--_--input-control-border-width: var(
--g-text-input-border-width,
var(--g-text-area-border-width, #{control-variables.$border-width})
);
@if $size == 's' {
@include mixins.text-body-short;

height: calc(#{variables.$s-height} - var(--_--input-control-border-width) * 2);
padding: 3px 8px;
}
@if $size == 'm' {
@include mixins.text-body-short;

height: calc(#{variables.$m-height} - var(--_--input-control-border-width) * 2);
padding: 5px 8px;
}
@if $size == 'l' {
@include mixins.text-body-short;

height: calc(#{variables.$l-height} - var(--_--input-control-border-width) * 2);
padding: 9px 12px;
}
@if $size == 'xl' {
@include mixins.text-body-2;

height: calc(#{variables.$xl-height} - var(--_--input-control-border-width) * 2);
padding: 11px 12px;
}
}

@mixin input-control-min-height($size) {
--_--input-control-border-width: var(
--g-text-input-border-width,
Expand Down

0 comments on commit c7e5ee4

Please sign in to comment.