Преглед изворни кода

put the style for '.btn-group' in the mixin.

Shu Katabe пре 5 година
родитељ
комит
3f69ade7fb
1 измењених фајлова са 11 додато и 10 уклоњено
  1. 11 10
      src/client/styles/scss/_mixins.scss

+ 11 - 10
src/client/styles/scss/_mixins.scss

@@ -221,8 +221,17 @@
   transition-duration: 300ms;
 }
 
-@mixin border-vertical($beforeOrAfter, $borderColor, $borderLength, $zIndex: initial) {
+@mixin border-vertical($beforeOrAfter, $borderColor, $borderLength, $zIndex: initial, $isBtnGroup: false) {
   position: relative;
+  @if $isBtnGroup {
+    &:not(:first-child) {
+      margin-left: 0;
+      border-left: none;
+    }
+    &:not(:last-child) {
+      border-right: none;
+    }
+  }
   &:not(:first-child) {
     &::#{$beforeOrAfter} {
       position: absolute;
@@ -251,8 +260,7 @@
   background-color: $bgColor;
   border-color: $borderColor;
 
-  @include border-vertical('before', $borderColor, 70%, 1);
-  @include border-vertical('after', transparent, 100%, 0);
+  @include border-vertical('before', $borderColor, 70%, 1, true);
 
   &.view-button,
   &.edit-button {
@@ -268,13 +276,6 @@
       margin-right: -0.1rem;
     }
   }
-  &:not(:first-child) {
-    margin-left: 0;
-    border-left: none;
-  }
-  &:not(:last-child) {
-    border-right: none;
-  }
   &:hover,
   &:active {
     color: $textColor;