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

Input group scss refactoring #28309

Closed
wants to merge 7 commits into from

Conversation

alexandreDavid
Copy link

Using a mixin for removing duplicated code.

@alexandreDavid alexandreDavid requested a review from a team as a code owner February 19, 2019 14:04
Copy link
Member

@XhmikosR XhmikosR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please retarget the PR to the master branch.

@XhmikosR XhmikosR added the css label Feb 19, 2019
@alexandreDavid alexandreDavid changed the base branch from v4-dev to master February 19, 2019 14:09
@XhmikosR
Copy link
Member

And make sure tests pass ofc.

Co-Authored-By: alexandreDavid <alexandre.David42@gmail.com>
@MartijnCuppens
Copy link
Member

I got mixed feelings with this one. On one hand this removes a lot of duplicate code, on the other hand, this adds a new file, with only one mixin. I guess this is a step closer an ideal solution, but we're not there yet.

Thoughts @mdo @ysds?

line-height: $input-line-height-sm;
@include border-radius($input-border-radius-sm);
.input-group-sm {
@include input-group-size($input-height-sm, $input-padding-y-sm, $input-padding-x-sm, $input-font-size-sm, $input-line-height-sm, $input-border-radius-sm);
}

.input-group-lg > .custom-select,
Copy link
Contributor

@vsn4ik vsn4ik Feb 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

.input-group-lg > .custom-select,
.input-group-sm > .custom-select {
  padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
}

->

@mixin input-group-size(...) {
  ...
  > .custom-select {
    padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
  }
}

?

@ysds
Copy link
Contributor

ysds commented Feb 21, 2019

@MartijnCuppens We already have a file for similar sizing mixin - mixin/_pagination.scss. Maybe we should choose to add the input group sizing mixin or remove the pagination' one for consistency.

@MartijnCuppens
Copy link
Member

Closing this to consolidate #29885

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

Successfully merging this pull request may close these issues.

5 participants