Skip to content
Merged
15 changes: 14 additions & 1 deletion packages/theme-chalk/src/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
display: inline-block;
vertical-align: middle;

& .el-button {
& > .el-button {
float: left;
position: relative;
& + .el-button {
Expand Down Expand Up @@ -232,6 +232,19 @@
z-index: 1;
}
}

& > .el-dropdown {
& > .el-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;

@each $type in (primary, success, warning, danger, info) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to use a loop?

border-left-color: rgba($--color-white, 0.5);

This also should work.

Copy link
Contributor Author

@bluejfox bluejfox Sep 25, 2018

Choose a reason for hiding this comment

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

When Dropdown is the last child in ButtonGroup, the Button which in Dropdown isn't be considered the last child in the ButtonGroup, and the Dropdown is usually used as the last child in the ButtonGroup, so I add below loop style.

@each $type in (primary, success, warning, danger, info) {
  &.el-button--#{$type} {
    border-left-color: rgba($--color-white, 0.5);
  }
}

The capture when remove loop style definition
image

Copy link
Contributor

Choose a reason for hiding this comment

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

@bluejfox I find this also works for me.

  & > .el-dropdown {
    & > .el-button {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
+    border-left-color: rgba($--color-white, 0.5);
- 	 @each $type in (primary, success, warning, danger, info) {
-   	   &.el-button--#{$type} {
-		border-left-color: rgba($--color-white, 0.5);
- 	   }
      }
   }
}

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ziyoung Sorry, I misunderstood your point.I had modified style source.Pls confirm it.

&.el-button--#{$type} {
border-left-color: rgba($--color-white, 0.5);
}
}
}
}

@each $type in (primary, success, warning, danger, info) {
.el-button--#{$type} {
Expand Down