Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form variable definitions appear inconsistent #26953

Closed
Dagothig opened this issue Jul 24, 2018 · 4 comments
Closed

Form variable definitions appear inconsistent #26953

Dagothig opened this issue Jul 24, 2018 · 4 comments

Comments

@Dagothig
Copy link

Both forms and buttons share variable definitions form the $input-btn- line of variables. However some of the computed default values use the $input-btn- variables rather than the $input- ones. For instance inner height is defined as ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2). Each of these btn variables is also defined so it means that changing the input line height doesn't change the actual input height, but changing the input btn line height does, which comes off as a little surprising.

In a similar manner, the $custom-select variables mix both $input-btn and $input variables when all of the variables are defined by $input.

Overall this leads to situations where overriding all the $input variables only partially changes the values that are used (so for instance the custom select's height does not match the other input heights).

@tkrotoff
Copy link
Contributor

After reading the source code, found it strange to have:
$input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;

I think this should be written like this:
$input-height-inner: ($font-size-base * $input-line-height) + ($input-padding-y * 2) !default;
so without btn. btn means button right?

Same for $input-height-inner-sm and $input-height-inner-lg

@XhmikosR
Copy link
Member

/CC @andresgalante @MartijnCuppens @mdo

@k-funk
Copy link

k-funk commented Sep 28, 2018

I agree with @tkrotoff. It should be:

$input-height-inner: ($font-size-base * $input-line-height) + ($input-padding-y * 2) !default;

#27249 may have cleaned some things up, but not this particular one.

@XhmikosR
Copy link
Member

@k-funk: please make a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants