1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 09:04:14 +02:00

Use grid classes or mixins on .dl-horizontal, update docs to include it, removes auto truncate and makes .text-overflow mixin into a .text-truncate class and mixin combo for better granularity

This commit is contained in:
Mark Otto
2014-12-11 14:12:10 -08:00
parent 8ba213c9aa
commit 3737cb1d46
12 changed files with 50 additions and 73 deletions

View File

@@ -34,7 +34,7 @@
@import "mixins/size";
@import "mixins/tab-focus";
@import "mixins/text-emphasis";
@import "mixins/text-overflow";
@import "mixins/text-truncate";
// // Components
@import "mixins/alert";

View File

@@ -142,28 +142,11 @@ dd {
margin-left: 0; // Undo browser default
}
// Horizontal description lists
//
// Defaults to being stacked without any of the below styles applied, until the
// grid breakpoint is reached (default of ~768px).
// Horizontal description lists w/ grid classes
.dl-horizontal {
dd {
@include clearfix(); // Clear the floated `dt` if an empty `dd` is present
}
@media (min-width: $grid-float-breakpoint) {
dt {
float: left;
width: ($dl-horizontal-offset - 20);
clear: left;
text-align: right;
@include text-overflow();
}
dd {
margin-left: $dl-horizontal-offset;
}
}
margin-right: -$grid-gutter-width;
margin-left: -$grid-gutter-width;
@include clearfix;
}

View File

@@ -79,6 +79,7 @@
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-nowrap { white-space: nowrap; }
.text-truncate { @include text-truncate; }
// Transformation
.text-lowercase { text-transform: lowercase; }

View File

@@ -1,7 +1,7 @@
// Text overflow
// Text truncate
// Requires inline-block or block for proper styling
@mixin text-overflow() {
@mixin text-truncate() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;