]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Remove a few duplicate selectors.
authorXhmikosR <xhmikosr@gmail.com>
Sat, 22 Sep 2018 12:46:56 +0000 (15:46 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 18 Nov 2018 08:00:03 +0000 (10:00 +0200)
less/navbar.less
less/popovers.less
less/tooltip.less

index cd1a1aaec014ca08d510532805ec909d5967f672..da95e37a30db21c70749f2ccc878c856d5c34ac2 100644 (file)
@@ -1,4 +1,4 @@
-// stylelint-disable selector-max-type, selector-max-compound-selectors, selector-max-combinators, selector-max-class, declaration-no-important, selector-no-qualifying-type, no-duplicate-selectors
+// stylelint-disable selector-max-type, selector-max-compound-selectors, selector-max-combinators, selector-max-class, declaration-no-important, selector-no-qualifying-type
 
 //
 // Navbars
       max-height: 200px;
     }
   }
+
+  // Fix the top/bottom navbars when screen real estate supports it
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: @zindex-navbar-fixed;
+
+  // Undo the rounded corners
+  @media (min-width: @grid-float-breakpoint) {
+    border-radius: 0;
+  }
+}
+
+.navbar-fixed-top {
+  top: 0;
+  border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+  margin-bottom: 0; // override .navbar defaults
+  border-width: 1px 0 0;
 }
 
 
   }
 }
 
-// Fix the top/bottom navbars when screen real estate supports it
-.navbar-fixed-top,
-.navbar-fixed-bottom {
-  position: fixed;
-  right: 0;
-  left: 0;
-  z-index: @zindex-navbar-fixed;
-
-  // Undo the rounded corners
-  @media (min-width: @grid-float-breakpoint) {
-    border-radius: 0;
-  }
-}
-.navbar-fixed-top {
-  top: 0;
-  border-width: 0 0 1px;
-}
-.navbar-fixed-bottom {
-  bottom: 0;
-  margin-bottom: 0; // override .navbar defaults
-  border-width: 1px 0 0;
-}
-
 
 // Brand/project name
 
         background-color: @navbar-default-link-disabled-bg;
       }
     }
-  }
-
-  .navbar-toggle {
-    border-color: @navbar-default-toggle-border-color;
-    &:hover,
-    &:focus {
-      background-color: @navbar-default-toggle-hover-bg;
-    }
-    .icon-bar {
-      background-color: @navbar-default-toggle-icon-bar-bg;
-    }
-  }
-
-  .navbar-collapse,
-  .navbar-form {
-    border-color: @navbar-default-border;
-  }
 
-  // Dropdown menu items
-  .navbar-nav {
+    // Dropdown menu items
     // Remove background color from open dropdown
     > .open > a {
       &,
     }
   }
 
+  .navbar-toggle {
+    border-color: @navbar-default-toggle-border-color;
+    &:hover,
+    &:focus {
+      background-color: @navbar-default-toggle-hover-bg;
+    }
+    .icon-bar {
+      background-color: @navbar-default-toggle-icon-bar-bg;
+    }
+  }
+
+  .navbar-collapse,
+  .navbar-form {
+    border-color: @navbar-default-border;
+  }
+
 
   // Links in navbars
   //
         background-color: @navbar-inverse-link-disabled-bg;
       }
     }
-  }
-
-  // Darken the responsive nav toggle
-  .navbar-toggle {
-    border-color: @navbar-inverse-toggle-border-color;
-    &:hover,
-    &:focus {
-      background-color: @navbar-inverse-toggle-hover-bg;
-    }
-    .icon-bar {
-      background-color: @navbar-inverse-toggle-icon-bar-bg;
-    }
-  }
-
-  .navbar-collapse,
-  .navbar-form {
-    border-color: darken(@navbar-inverse-bg, 7%);
-  }
 
-  // Dropdowns
-  .navbar-nav {
+    // Dropdowns
     > .open > a {
       &,
       &:hover,
     }
   }
 
+  // Darken the responsive nav toggle
+  .navbar-toggle {
+    border-color: @navbar-inverse-toggle-border-color;
+    &:hover,
+    &:focus {
+      background-color: @navbar-inverse-toggle-hover-bg;
+    }
+    .icon-bar {
+      background-color: @navbar-inverse-toggle-icon-bar-bg;
+    }
+  }
+
+  .navbar-collapse,
+  .navbar-form {
+    border-color: darken(@navbar-inverse-bg, 7%);
+  }
+
   .navbar-link {
     color: @navbar-inverse-link-color;
     &:hover {
index 92f17e7cb9fc0210be7e4d959d5ed02334ea99d1..3920eb5b0a6ffebfd2b4f9396cf8018c5c7338de 100644 (file)
@@ -1,5 +1,3 @@
-// stylelint-disable no-duplicate-selectors
-
 //
 // Popovers
 // --------------------------------------------------
       border-width: @popover-arrow-width;
     }
   }
-}
-
-.popover-title {
-  padding: 8px 14px;
-  margin: 0; // reset heading margin
-  font-size: @font-size-base;
-  background-color: @popover-title-bg;
-  border-bottom: 1px solid darken(@popover-title-bg, 5%);
-  border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
-}
-
-.popover-content {
-  padding: 9px 14px;
-}
 
-.popover {
   &.top > .arrow {
     bottom: -@popover-arrow-outer-width;
     left: 50%;
     }
   }
 }
+
+.popover-title {
+  padding: 8px 14px;
+  margin: 0; // reset heading margin
+  font-size: @font-size-base;
+  background-color: @popover-title-bg;
+  border-bottom: 1px solid darken(@popover-title-bg, 5%);
+  border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
+}
+
+.popover-content {
+  padding: 9px 14px;
+}
index 11b9be835b0c370c22dc03088e92537c489ae1ff..650ab424d3bae0bbe920d9572be20f6f157ec7b6 100644 (file)
@@ -1,5 +1,3 @@
-// stylelint-disable no-duplicate-selectors
-
 //
 // Tooltips
 // --------------------------------------------------
     padding: 0 @tooltip-arrow-width;
     margin-left: -3px;
   }
-}
-
-// Wrapper for the tooltip content
-.tooltip-inner {
-  max-width: @tooltip-max-width;
-  padding: 3px 8px;
-  color: @tooltip-color;
-  text-align: center;
-  background-color: @tooltip-bg;
-  border-radius: @border-radius-base;
-}
 
-// Arrows
-.tooltip-arrow {
-  position: absolute;
-  width: 0;
-  height: 0;
-  border-color: transparent;
-  border-style: solid;
-}
-// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
-.tooltip {
+  // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
   &.top .tooltip-arrow {
     bottom: 0;
     left: 50%;
     border-bottom-color: @tooltip-arrow-color;
   }
 }
+
+// Wrapper for the tooltip content
+.tooltip-inner {
+  max-width: @tooltip-max-width;
+  padding: 3px 8px;
+  color: @tooltip-color;
+  text-align: center;
+  background-color: @tooltip-bg;
+  border-radius: @border-radius-base;
+}
+
+// Arrows
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}