]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Clean up docs Sass code.
authorXhmikosR <xhmikosr@gmail.com>
Mon, 15 Oct 2018 08:27:00 +0000 (11:27 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Sat, 20 Oct 2018 18:08:37 +0000 (21:08 +0300)
* remove unused rules
* use Sass nesting in more places
* use the core mixins in more places
* use the color variables more

site/docs/4.1/assets/scss/_algolia.scss
site/docs/4.1/assets/scss/_brand.scss
site/docs/4.1/assets/scss/_buttons.scss
site/docs/4.1/assets/scss/_callouts.scss
site/docs/4.1/assets/scss/_clipboard-js.scss
site/docs/4.1/assets/scss/_examples.scss [deleted file]
site/docs/4.1/assets/scss/_nav.scss
site/docs/4.1/assets/scss/docs.scss

index 7eca6c89cd9e7bb98fa9daa0fd64664d0159da23..e523dec8ef3d8d4f8628f1f4732046fbdca3aff4 100644 (file)
@@ -13,7 +13,7 @@
     min-width: 0 !important;
     max-width: none !important;
     padding: .75rem 0 !important;
-    background-color: #fff;
+    background-color: $white;
     background-clip: padding-box;
     border: 1px solid rgba(0, 0, 0, .1);
     box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
index 2d5c5a4cf45f26c854b7dd0e72b29af37366c011..c8c5c2d5662620074e214b2d486ac4fa335b1fc6 100644 (file)
@@ -1,5 +1,3 @@
-// stylelint-disable no-duplicate-selectors
-
 //
 // Brand guidelines
 //
   width: 100%;
   margin-bottom: 1rem;
   overflow: hidden;
-  color: #563d7c;
+  color: $bd-purple;
   background-color: #f9f9f9;
   border-radius: .25rem;
+
+  .inverse {
+    color: $white;
+    background-color: $bd-purple;
+  }
 }
 
 // Individual items
 .bd-brand-item {
   padding: 4rem 0;
   text-align: center;
-}
-.bd-brand-item + .bd-brand-item {
-  border-top: 1px solid #fff;
-}
-.bd-brand-logos .inverse {
-  color: #fff;
-  background-color: #563d7c;
-}
 
-// Heading content within
-.bd-brand-item h1,
-.bd-brand-item h3 {
-  margin-top: 0;
-  margin-bottom: 0;
-}
-.bd-brand-item .bd-booticon {
-  margin-right: auto;
-  margin-left: auto;
-}
+  + .bd-brand-item {
+    border-top: 1px solid $white;
+  }
 
-// Make the icons stand out on what is/isn't okay
-// .bd-brand-item .glyphicon {
-//   width: 30px;
-//   height: 30px;
-//   margin: 10px auto -10px;
-//   line-height: 30px;
-//   color: #fff;
-//   border-radius: 50%;
-// }
-// .bd-brand-item .glyphicon-ok {
-//   background-color: #5cb85c;
-// }
-// .bd-brand-item .glyphicon-remove {
-//   background-color: #d9534f;
-// }
+  // Heading content within
+  h1,
+  h3 {
+    margin-top: 0;
+    margin-bottom: 0;
+  }
 
-@media (min-width: 768px) {
-  .bd-brand-item {
+  @include media-breakpoint-up(md) {
     display: table-cell;
     width: 1%;
-  }
-  .bd-brand-item + .bd-brand-item {
-    border-top: 0;
-    border-left: 1px solid #fff;
-  }
-  .bd-brand-item h1 {
-    font-size: 4rem;
+
+    + .bd-brand-item {
+      border-top: 0;
+      border-left: 1px solid $white;
+    }
+
+    h1 {
+      font-size: 4rem;
+    }
   }
 }
 
 .color-swatches {
   margin: 0 -5px;
   overflow: hidden; // clearfix
-}
 
-.color-swatch {
-  float: left;
-  width: 4rem;
-  height: 4rem;
-  margin-right: .25rem;
-  margin-left: .25rem;
-  border-radius: .25rem;
-
-  @media (min-width: 768px) {
-    width: 6rem;
-    height: 6rem;
-  }
-}
-
-// Docs colors
-.color-swatches {
+  // Docs colors
   .bd-purple {
     background-color: $bd-purple;
   }
     background-color: #f9f9f9;
   }
 }
+
+.color-swatch {
+  float: left;
+  width: 4rem;
+  height: 4rem;
+  margin-right: .25rem;
+  margin-left: .25rem;
+  border-radius: .25rem;
+
+  @include media-breakpoint-up(md) {
+    width: 6rem;
+    height: 6rem;
+  }
+}
index 21765b5a99722747793c724d228ee48317690671..25bcbbd4b0f33cd7c12b3a817d15f680f7bcaef9 100644 (file)
@@ -9,7 +9,7 @@
 
   &:hover,
   &:active {
-    color: #fff;
+    color: $white;
     background-color: $bd-purple-bright;
     border-color: $bd-purple-bright;
   }
index 401bfd6f525309a60aa6c17db44728040013900c..b11e370c6418930db4b0f98c0a0077697d749ebd 100644 (file)
@@ -9,23 +9,23 @@
   border: 1px solid #eee;
   border-left-width: .25rem;
   border-radius: .25rem;
-}
 
-.bd-callout h4 {
-  margin-top: 0;
-  margin-bottom: .25rem;
-}
+  h4 {
+    margin-top: 0;
+    margin-bottom: .25rem;
+  }
 
-.bd-callout p:last-child {
-  margin-bottom: 0;
-}
+  p:last-child {
+    margin-bottom: 0;
+  }
 
-.bd-callout code {
-  border-radius: .25rem;
-}
+  code {
+    border-radius: .25rem;
+  }
 
-.bd-callout + .bd-callout {
-  margin-top: -.25rem;
+  + .bd-callout {
+    margin-top: -.25rem;
+  }
 }
 
 // Variations
index e27d1d4f8478010a2c9b7eb727368b5b728e49f6..001a6b01e29e7e30a1b33ee39fa2ad2a185ca0c7 100644 (file)
   + .highlight {
     margin-top: 0;
   }
+
+  @include media-breakpoint-up(md) {
+    display: block;
+  }
 }
 
 .btn-clipboard {
   border-radius: .25rem;
 
   &:hover {
-    color: #fff;
+    color: $white;
     background-color: #027de7;
   }
 }
-
-@media (min-width: 768px) {
-  .bd-clipboard {
-    display: block;
-  }
-}
diff --git a/site/docs/4.1/assets/scss/_examples.scss b/site/docs/4.1/assets/scss/_examples.scss
deleted file mode 100644 (file)
index a4ec7a2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Examples
-//
-
-.bd-examples .img-thumbnail {
-  margin-bottom: .75rem;
-}
-.bd-examples h4 {
-  margin-bottom: .25rem;
-}
-.bd-examples p {
-  margin-bottom: 1.25rem;
-}
-
-@media (max-width: 480px) {
-  .bd-examples {
-    margin-right: -.75rem;
-    margin-left: -.75rem;
-  }
-  .bd-examples > [class^="col-"] {
-    padding-right: .75rem;
-    padding-left: .75rem;
-  }
-}
index a815773814b0855ff418d044f68b992aed8e3571..6154ab3035ee2a86b361f67fe237a5217b14c6c9 100644 (file)
@@ -43,7 +43,7 @@
 
       &.active,
       &:hover {
-        color: #fff;
+        color: $white;
         background-color: transparent;
       }
 
index 0f779710343aa814246eb05f46472813eba4ab68..046521f7f2786b2e7f3cbadff15dc42c0a9db8ed 100644 (file)
@@ -40,7 +40,6 @@
 @import "component-examples";
 @import "buttons";
 @import "callouts";
-@import "examples";
 @import "browser-bugs";
 @import "brand";
 @import "colors";