]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix for double border on cards in an accordion (#27133)
authorRoy Klutman <royklutman@users.noreply.github.com>
Sun, 21 Oct 2018 06:49:05 +0000 (08:49 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 21 Oct 2018 06:49:05 +0000 (09:49 +0300)
scss/_card.scss

index 28d7e624474c54deed9251445f3e2b7c0273e713..fcae56d630faa8308bf2dee06461a9982968f61b 100644 (file)
 //
 
 .accordion {
-  .card:not(:first-of-type):not(:last-of-type) {
-    border-bottom: 0;
-    border-radius: 0;
-  }
+  .card {
+    overflow: hidden;
+
+    &:not(:first-of-type) {
+      .card-header:first-child {
+        border-radius: 0;
+      }
 
-  .card:not(:first-of-type) {
-    .card-header:first-child {
-      border-radius: 0;
+      &:not(:last-of-type) {
+        border-bottom: 0;
+        border-radius: 0;
+      }
     }
-  }
 
-  .card:first-of-type {
-    border-bottom: 0;
-    border-bottom-right-radius: 0;
-    border-bottom-left-radius: 0;
-  }
+    &:first-of-type {
+      border-bottom: 0;
+      border-bottom-right-radius: 0;
+      border-bottom-left-radius: 0;
+    }
 
-  .card:last-of-type {
-    border-top-left-radius: 0;
-    border-top-right-radius: 0;
+    &:last-of-type {
+      border-top-left-radius: 0;
+      border-top-right-radius: 0;
+    }
+
+    .card-header {
+      margin-bottom: -$card-border-width;
+    }
   }
 }