]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Button group refactoring and fixes (#25395)
authorysds <fellows3@gmail.com>
Sun, 4 Nov 2018 06:50:21 +0000 (15:50 +0900)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 4 Nov 2018 06:50:21 +0000 (08:50 +0200)
scss/_button-group.scss

index 54951703459cc042907edc7d2202e706e3b1d01e..716cf5208a9fbadd7cf60745ebce5bcdfb2f883e 100644 (file)
       z-index: 1;
     }
   }
-
-  // Prevent double borders when buttons are next to each other
-  .btn + .btn,
-  .btn + .btn-group,
-  .btn-group + .btn,
-  .btn-group + .btn-group {
-    margin-left: -$btn-border-width;
-  }
 }
 
 // Optional: Group multiple button groups together for a toolbar
 }
 
 .btn-group {
-  > .btn:first-child {
-    margin-left: 0;
+  // Prevent double borders when buttons are next to each other
+  > .btn:not(:first-child),
+  > .btn-group:not(:first-child) {
+    margin-left: -$btn-border-width;
   }
 
   // Reset rounded corners
   align-items: flex-start;
   justify-content: center;
 
-  .btn,
-  .btn-group {
+  .btn,
+  .btn-group {
     width: 100%;
   }
 
-  > .btn + .btn,
-  > .btn + .btn-group,
-  > .btn-group + .btn,
-  > .btn-group + .btn-group {
+  > .btn:not(:first-child),
+  > .btn-group:not(:first-child) {
     margin-top: -$btn-border-width;
-    margin-left: 0;
   }
 
   // Reset rounded corners