Skip to content

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

Closed
ysds wants to merge 5 commits into
twbs:v4-devfrom
ysds:reset-btn-border-radius
Closed

ysds wants to merge 5 commits into
twbs:v4-devfrom
ysds:reset-btn-border-radius

Conversation

@ysds

@ysds ysds commented Nov 7, 2017 •

Copy link
Copy Markdown
Contributor

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
@Johann-S Johann-S added css Sass sources or compiled CSS v4 v4, the frozen docs on gh-pages labels Nov 7, 2017
@ysds ysds closed this Nov 22, 2017
@ysds ysds reopened this Nov 22, 2017
@andresgalante

Copy link
Copy Markdown
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

ysds commented Nov 29, 2017 •

Copy link
Copy Markdown
Contributor Author

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.

@andresgalante
andresgalante requested a review from mdo November 29, 2017 16:15

@andresgalante andresgalante left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread scss/_button-group.scss
// Alignment for including btn-groups within btn-groups (useful for including
// dropdown buttons within a btn-group)
> .btn-group {
float: left;

Copy link
Copy Markdown
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

ysds commented Dec 8, 2017

Copy link
Copy Markdown
Contributor Author

@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

mdo commented Dec 19, 2017

Copy link
Copy Markdown
Member

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

@ysds ysds mentioned this pull request Dec 25, 2017
@ysds

ysds commented Dec 25, 2017

Copy link
Copy Markdown
Contributor Author

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

css Sass sources or compiled CSS v4 v4, the frozen docs on gh-pages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants