mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Fixes #8770: mobile-first (stacked by default) horizontal dls
This commit is contained in:
parent
41eef69e6f
commit
6af693d160
4 changed files with 50 additions and 46 deletions
2
css.html
2
css.html
|
@ -807,7 +807,7 @@ base_url: "../"
|
|||
{% endhighlight %}
|
||||
|
||||
<h4>Horizontal description</h4>
|
||||
<p>Make terms and descriptions in <code><dl></code> line up side-by-side.</p>
|
||||
<p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></code>s, but when the navbar expands, so do these.</p>
|
||||
<div class="bs-example">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Description lists</dt>
|
||||
|
|
61
dist/css/bootstrap.css
vendored
61
dist/css/bootstrap.css
vendored
|
@ -564,38 +564,35 @@ dd {
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dl-horizontal dt {
|
||||
float: left;
|
||||
width: 160px;
|
||||
overflow: hidden;
|
||||
clear: left;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dl-horizontal dd {
|
||||
margin-left: 180px;
|
||||
}
|
||||
|
||||
.dl-horizontal dd:before,
|
||||
.dl-horizontal dd:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dl-horizontal dd:before,
|
||||
.dl-horizontal dd:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
@media (min-width: 768px) {
|
||||
.dl-horizontal dt {
|
||||
float: left;
|
||||
width: 160px;
|
||||
overflow: hidden;
|
||||
clear: left;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dl-horizontal dd {
|
||||
margin-left: 180px;
|
||||
}
|
||||
.dl-horizontal dd:before,
|
||||
.dl-horizontal dd:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
}
|
||||
.dl-horizontal dd:before,
|
||||
.dl-horizontal dd:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
|
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -141,18 +141,25 @@ dt {
|
|||
dd {
|
||||
margin-left: 0; // Undo browser default
|
||||
}
|
||||
// Horizontal layout (like forms)
|
||||
.dl-horizontal {
|
||||
dt {
|
||||
float: left;
|
||||
width: (@component-offset-horizontal - 20);
|
||||
clear: left;
|
||||
text-align: right;
|
||||
.text-overflow();
|
||||
}
|
||||
dd {
|
||||
.clearfix(); // Clear the floated `dt` if an empty `dd` is present
|
||||
margin-left: @component-offset-horizontal;
|
||||
|
||||
// Horizontal description lists
|
||||
//
|
||||
// Defaults to being stacked without any of the below styles applied, until the
|
||||
// grid breakpoint is reached (default of ~768px).
|
||||
|
||||
@media (min-width: @grid-float-breakpoint) {
|
||||
.dl-horizontal {
|
||||
dt {
|
||||
float: left;
|
||||
width: (@component-offset-horizontal - 20);
|
||||
clear: left;
|
||||
text-align: right;
|
||||
.text-overflow();
|
||||
}
|
||||
dd {
|
||||
margin-left: @component-offset-horizontal;
|
||||
.clearfix(); // Clear the floated `dt` if an empty `dd` is present
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue