]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
refactoring: add & use .text-emphasis-variant() mixin
authorChris Rebert <code@rebertia.com>
Thu, 16 Jan 2014 02:07:22 +0000 (18:07 -0800)
committerChris Rebert <code@rebertia.com>
Thu, 16 Jan 2014 02:07:22 +0000 (18:07 -0800)
less/mixins.less
less/type.less

index 3af3c8208752dae06f9f5075626f194e46084b45..1edaa3f4efc24ec9a43848615227de7b05bf4c59 100644 (file)
   }
 }
 
+// Typography
+// -------------------------
+.text-emphasis-variant(@color) {
+  color: @color;
+  &:hover {
+    color: darken(@color, 10%);
+  }
+}
+
 // Navbar vertical align
 // -------------------------
 // Vertically center elements in the navbar.
index 91496dc8c1b830a9a93faa98643f70080f373983..aaf654f70a27e41bf4eeff57a02daa93bf10f21b 100644 (file)
@@ -92,34 +92,19 @@ cite    { font-style: normal; }
   color: @text-muted;
 }
 .text-primary {
-  color: @brand-primary;
-  &:hover {
-    color: darken(@brand-primary, 10%);
-  }
+  .text-emphasis-variant(@brand-primary);
 }
 .text-success {
-  color: @state-success-text;
-  &:hover {
-    color: darken(@state-success-text, 10%);
-  }
+  .text-emphasis-variant(@state-success-text);
 }
 .text-info {
-  color: @state-info-text;
-  &:hover {
-    color: darken(@state-info-text, 10%);
-  }
+  .text-emphasis-variant(@state-info-text);
 }
 .text-warning {
-  color: @state-warning-text;
-  &:hover {
-    color: darken(@state-warning-text, 10%);
-  }
+  .text-emphasis-variant(@state-warning-text);
 }
 .text-danger {
-  color: @state-danger-text;
-  &:hover {
-    color: darken(@state-danger-text, 10%);
-  }
+  .text-emphasis-variant(@state-danger-text);
 }
 
 // Contextual backgrounds