0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

fix #2860: truncate .dl-horizontal terms and reset to stacked for <767px layouts

This commit is contained in:
Mark Otto 2012-03-31 23:53:54 -07:00
parent 452ddc0f0d
commit d652af1097
7 changed files with 42 additions and 0 deletions

Binary file not shown.

View File

@ -139,6 +139,15 @@
.container-fluid {
padding: 0;
}
.dl-horizontal dt {
float: none;
clear: none;
width: auto;
text-align: left;
}
.dl-horizontal dd {
margin-left: 0;
}
.container {
width: auto;
}

View File

@ -458,6 +458,9 @@ dd {
margin-left: 9px;
}
.dl-horizontal dt {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
float: left;
clear: left;
width: 120px;

View File

@ -371,7 +371,14 @@
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
<dt>Malesuada porta</dt>
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
<dt>Felis euismod semper eget lacinia</dt>
<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
</dl>
<hr>
<p>
<span class="label label-info">Heads up!</span>
Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.
</p>
</div>
</div><!-- /row -->
</section>

View File

@ -294,7 +294,14 @@
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
<dt>Malesuada porta</dt>
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
<dt>Felis euismod semper eget lacinia</dt>
<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
</dl>
<hr>
<p>
<span class="label label-info">{{_i}}Heads up!{{/i}}</span>
{{_i}}Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.{{/i}}
</p>
</div>
</div><!-- /row -->
</section>

View File

@ -86,6 +86,21 @@
padding: 0;
}
// TYPOGRAPHY
// ----------
// Reset horizontal dl
.dl-horizontal {
dt {
float: none;
clear: none;
width: auto;
text-align: left;
}
dd {
margin-left: 0;
}
}
// GRID & CONTAINERS
// -----------------
// Remove width from containers

View File

@ -135,6 +135,7 @@ dd {
// Horizontal layout (like forms)
.dl-horizontal {
dt {
.text-overflow();
float: left;
clear: left;
width: 120px;