mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
Move text and background utilties from _type to _utilities
This commit is contained in:
parent
073389ca5e
commit
2cc9e773c5
@ -80,63 +80,6 @@ mark,
|
|||||||
padding: .2em;
|
padding: .2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alignment
|
|
||||||
.text-left { text-align: left; }
|
|
||||||
.text-right { text-align: right; }
|
|
||||||
.text-center { text-align: center; }
|
|
||||||
.text-justify { text-align: justify; }
|
|
||||||
.text-nowrap { white-space: nowrap; }
|
|
||||||
|
|
||||||
// Transformation
|
|
||||||
.text-lowercase { text-transform: lowercase; }
|
|
||||||
.text-uppercase { text-transform: uppercase; }
|
|
||||||
.text-capitalize { text-transform: capitalize; }
|
|
||||||
|
|
||||||
// Contextual colors
|
|
||||||
.text-muted {
|
|
||||||
color: @text-muted;
|
|
||||||
}
|
|
||||||
.text-primary {
|
|
||||||
.text-emphasis-variant(@brand-primary);
|
|
||||||
}
|
|
||||||
.text-success {
|
|
||||||
.text-emphasis-variant(@state-success-text);
|
|
||||||
}
|
|
||||||
.text-info {
|
|
||||||
.text-emphasis-variant(@state-info-text);
|
|
||||||
}
|
|
||||||
.text-warning {
|
|
||||||
.text-emphasis-variant(@state-warning-text);
|
|
||||||
}
|
|
||||||
.text-danger {
|
|
||||||
.text-emphasis-variant(@state-danger-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
.bg-variant(@brand-primary);
|
|
||||||
}
|
|
||||||
.bg-success {
|
|
||||||
.bg-variant(@state-success-bg);
|
|
||||||
}
|
|
||||||
.bg-info {
|
|
||||||
.bg-variant(@state-info-bg);
|
|
||||||
}
|
|
||||||
.bg-warning {
|
|
||||||
.bg-variant(@state-warning-bg);
|
|
||||||
}
|
|
||||||
.bg-danger {
|
|
||||||
.bg-variant(@state-danger-bg);
|
|
||||||
}
|
|
||||||
.bg-gray-dark {
|
|
||||||
.bg-variant(@gray-dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Page header
|
// Page header
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Floats
|
// Floats
|
||||||
// -------------------------
|
|
||||||
|
|
||||||
.clearfix {
|
.clearfix {
|
||||||
.clearfix();
|
.clearfix();
|
||||||
}
|
}
|
||||||
@ -50,8 +48,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Toggling content
|
// Toggling content
|
||||||
// -------------------------
|
|
||||||
|
|
||||||
.show {
|
.show {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
@ -66,7 +62,6 @@
|
|||||||
// Hide from screenreaders and browsers
|
// Hide from screenreaders and browsers
|
||||||
//
|
//
|
||||||
// Credit: HTML5 Boilerplate
|
// Credit: HTML5 Boilerplate
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
@ -74,8 +69,63 @@
|
|||||||
|
|
||||||
|
|
||||||
// For Affix plugin
|
// For Affix plugin
|
||||||
// -------------------------
|
|
||||||
|
|
||||||
.affix {
|
.affix {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alignment
|
||||||
|
.text-left { text-align: left; }
|
||||||
|
.text-right { text-align: right; }
|
||||||
|
.text-center { text-align: center; }
|
||||||
|
.text-justify { text-align: justify; }
|
||||||
|
.text-nowrap { white-space: nowrap; }
|
||||||
|
|
||||||
|
// Transformation
|
||||||
|
.text-lowercase { text-transform: lowercase; }
|
||||||
|
.text-uppercase { text-transform: uppercase; }
|
||||||
|
.text-capitalize { text-transform: capitalize; }
|
||||||
|
|
||||||
|
// Contextual colors
|
||||||
|
.text-muted {
|
||||||
|
color: @text-muted;
|
||||||
|
}
|
||||||
|
.text-primary {
|
||||||
|
.text-emphasis-variant(@brand-primary);
|
||||||
|
}
|
||||||
|
.text-success {
|
||||||
|
.text-emphasis-variant(@state-success-text);
|
||||||
|
}
|
||||||
|
.text-info {
|
||||||
|
.text-emphasis-variant(@state-info-text);
|
||||||
|
}
|
||||||
|
.text-warning {
|
||||||
|
.text-emphasis-variant(@state-warning-text);
|
||||||
|
}
|
||||||
|
.text-danger {
|
||||||
|
.text-emphasis-variant(@state-danger-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
.bg-variant(@brand-primary);
|
||||||
|
}
|
||||||
|
.bg-success {
|
||||||
|
.bg-variant(@state-success-bg);
|
||||||
|
}
|
||||||
|
.bg-info {
|
||||||
|
.bg-variant(@state-info-bg);
|
||||||
|
}
|
||||||
|
.bg-warning {
|
||||||
|
.bg-variant(@state-warning-bg);
|
||||||
|
}
|
||||||
|
.bg-danger {
|
||||||
|
.bg-variant(@state-danger-bg);
|
||||||
|
}
|
||||||
|
.bg-gray-dark {
|
||||||
|
.bg-variant(@gray-dark);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user