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

Clean up the reset code for button's rounded corners in button group and input button #24696

Closed
wants to merge 5 commits into from

Conversation

ysds
Copy link
Member

@ysds ysds commented Nov 7, 2017

A .dropdown-toggle selector is used to reset a button's rounded corner in button group and input button. But should not use a dropdown-toggle selector to reset it, because dropdown-toggle does not have rounded corners by default.

This PR including the follwings:

  • Use last-of-type selector instead of .dropdown-toggle
  • Remove border-raduis :0 because it is enough by each reset of the left and right side

I hope that this PR will help improve code. Thanks.

- Use last-of-type selector instead of dropdown-toggle
- Remove `border-raduis :0` because it is enough by each reset of the left and right side
@ysds ysds closed this Nov 22, 2017
@ysds ysds reopened this Nov 22, 2017
@andresgalante
Copy link
Collaborator

Hi @ysds Thanks for the PR. I found that there is still a rounded corner on the last btn before the drop menu. Look a the first example under "nesting":

screen shot 2017-11-28 at 8 57 34 am

It's really challenging to remove or simplify code, thanks a lot for giving it a try.

@ysds
Copy link
Member Author

ysds commented Nov 29, 2017

Hi @andresgalante Thank you for your review! and sorry for my insufficient check. Using last-of-type instead of .dropdown-toggle seems does not to be appropriate.
I modified and restored some selector, please double check it.

Copy link
Collaborator

@andresgalante andresgalante left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ysds, I have tested and review the code and I it looks ok to me.

But in case I am missing something I'll assign this PR to @mdo to take another look.

The comment on line 57 is confusing to me, maybe we can improve the language.

}

// Custom edits for including btn-groups within btn-groups (useful for including
// Alignment for including btn-groups within btn-groups (useful for including
// dropdown buttons within a btn-group)
> .btn-group {
float: left;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we actually need this float here? What is it for?

@ysds
Copy link
Member Author

ysds commented Dec 8, 2017

@andresgalante

I updated the comment more concisely.

Do we actually need this float here? What is it for?

I think so too. it will not be needed. and there seems to be some other code that can be deleted/clean-up.

e.g: L47-

.btn-group {
  > .btn:first-child {
    margin-left: 0;
  }

and more. I can additional cleanup with another PR if this PR is approved. Thanks.

@mdo
Copy link
Member

mdo commented Dec 19, 2017

Changes to the input group here will need to be removed once #25020 lands.

@ysds ysds mentioned this pull request Dec 25, 2017
@ysds
Copy link
Member Author

ysds commented Dec 25, 2017

Please follow #25073 😄

@ysds ysds closed this Dec 25, 2017
@ysds ysds deleted the reset-btn-border-radius branch January 3, 2018 03:28
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.

None yet

4 participants