aboutsummaryrefslogtreecommitdiff
path: root/less/type.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-18 10:22:18 -0800
committerMark Otto <[email protected]>2013-12-18 10:22:18 -0800
commit1bc8607bdffe641d58191084b214138a98aba229 (patch)
treeffb2855b592ee37c5068da181a4c3fb335a322da /less/type.less
parent9e38e255343a4fd5fa2fa932c96be9cb5c902337 (diff)
parentd15218a09ce68d0854d0aa5f5170c1ea859aee31 (diff)
downloadbootstrap-1bc8607bdffe641d58191084b214138a98aba229.tar.xz
bootstrap-1bc8607bdffe641d58191084b214138a98aba229.zip
Merge branch 'master' into css-source-maps
Conflicts: Gruntfile.js
Diffstat (limited to 'less/type.less')
-rw-r--r--less/type.less69
1 files changed, 54 insertions, 15 deletions
diff --git a/less/type.less b/less/type.less
index 1eddb3f9b..1d01b9a71 100644
--- a/less/type.less
+++ b/less/type.less
@@ -21,9 +21,9 @@ h1, h2, h3, h4, h5, h6,
}
}
-h1,
-h2,
-h3 {
+h1, .h1,
+h2, .h2,
+h3, .h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
@@ -32,9 +32,9 @@ h3 {
font-size: 65%;
}
}
-h4,
-h5,
-h6 {
+h4, .h4,
+h5, .h5,
+h6, .h6 {
margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2);
@@ -61,7 +61,7 @@ p {
.lead {
margin-bottom: @line-height-computed;
- font-size: floor(@font-size-base * 1.15);
+ font-size: floor((@font-size-base * 1.15));
font-weight: 200;
line-height: 1.4;
@@ -81,7 +81,13 @@ small,
// Undo browser default styling
cite { font-style: normal; }
-// Contextual emphasis
+// Alignment
+.text-left { text-align: left; }
+.text-right { text-align: right; }
+.text-center { text-align: center; }
+.text-justify { text-align: justify; }
+
+// Contextual colors
.text-muted {
color: @text-muted;
}
@@ -116,11 +122,42 @@ cite { font-style: normal; }
}
}
-// Alignment
-.text-left { text-align: left; }
-.text-right { text-align: right; }
-.text-center { text-align: center; }
-.text-justify { text-align: justify; }
+// Contextual backgrounds
+// For now we'll leave these alongside the text classes until v4 when we can
+// safely shift things around (per SemVer rules).
+.bg-primary {
+ // Given the contrast here, this is the only class to have its color inverted
+ // automatically.
+ color: #fff;
+ background-color: @brand-primary;
+ a&:hover {
+ background-color: darken(@brand-primary, 10%);
+ }
+}
+.bg-warning {
+ background-color: @state-warning-bg;
+ a&:hover {
+ background-color: darken(@state-warning-bg, 10%);
+ }
+}
+.bg-danger {
+ background-color: @state-danger-bg;
+ a&:hover {
+ background-color: darken(@state-danger-bg, 10%);
+ }
+}
+.bg-success {
+ background-color: @state-success-bg;
+ a&:hover {
+ background-color: darken(@state-success-bg, 10%);
+ }
+}
+.bg-info {
+ background-color: @state-info-bg;
+ a&:hover {
+ background-color: darken(@state-info-bg, 10%);
+ }
+}
// Page header
@@ -229,12 +266,14 @@ blockquote {
border-left: 5px solid @blockquote-border-color;
p {
font-size: (@font-size-base * 1.25);
- font-weight: 300;
- line-height: 1.25;
}
p:last-child {
margin-bottom: 0;
}
+
+ // Deprecating small and .small for v3.1
+ // Context: https://github.com/twbs/bootstrap/issues/11660
+ footer,
small,
.small {
display: block;