Skip to content

Commit

Permalink
fix(TextInput): unequal text alignment in textinput
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilDem committed Feb 2, 2024
1 parent 1f2c718 commit 62f5d38
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions src/components/controls/TextInput/TextInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@
@include mixins.text-accent;
}

@mixin input-control($size) {
@include control-mixins.input-control($size);
@if $size == 's' {
line-height: #{variables.$s-height - control-variables.$border-width * 2};
}

@if $size == 'm' {
line-height: #{variables.$m-height - control-variables.$border-width * 2};
}

@if $size == 'l' {
line-height: #{variables.$l-height - control-variables.$border-width * 2};
}

@if $size == 'xl' {
line-height: #{variables.$xl-height - control-variables.$border-width * 2};
}
}

$block: '.#{variables.$ns}text-input';

#{$block} {
Expand Down Expand Up @@ -110,7 +129,7 @@ $block: '.#{variables.$ns}text-input';
&_size {
&_s {
#{$block}__control {
@include control-mixins.input-control(s);
@include input-control(s);
}

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

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

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

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

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

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

#{$block}__label {
Expand Down

0 comments on commit 62f5d38

Please sign in to comment.