Skip to content

Commit

Permalink
Fix up display of dropdown submenu examples on responsive views
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Dec 5, 2012
1 parent e31c7fb commit 12916b0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 13 deletions.
36 changes: 35 additions & 1 deletion docs/assets/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,21 @@ form.bs-docs-example {
margin: 20px;
}

/* Dropdowns */
.bs-docs-example-submenus {
min-height: 180px;
}
.bs-docs-example-submenus > .pull-left + .pull-left {
margin-left: 20px;
}
.bs-docs-example-submenus .dropup > .dropdown-menu,
.bs-docs-example-submenus .dropdown > .dropdown-menu {
display: block;
position: static;
margin-bottom: 5px;
*width: 180px;
}



/* Responsive docs
Expand Down Expand Up @@ -1013,7 +1028,26 @@ form.bs-docs-example {
word-break: break-all;
}

/* Modal example */
/* Examples: dropdowns */
.bs-docs-example-submenus > .pull-left {
float: none;
clear: both;
}
.bs-docs-example-submenus > .pull-left,
.bs-docs-example-submenus > .pull-left + .pull-left {
margin-left: 0;
}
.bs-docs-example-submenus p {
margin-bottom: 0;
}
.bs-docs-example-submenus .dropup > .dropdown-menu,
.bs-docs-example-submenus .dropdown > .dropdown-menu {
margin-bottom: 10px;
float: none;
max-width: 180px;
}

/* Examples: modal */
.modal-example .modal {
position: relative;
top: auto;
Expand Down
12 changes: 6 additions & 6 deletions docs/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ <h3>Aligning the menus</h3>

<h3>Sub menus on dropdowns</h3>
<p>Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add <code>.dropdown-submenu</code> to any <code>li</code> in an existing dropdown menu for automatic styling.</p>
<div class="bs-docs-example" style="min-height: 180px;">
<div class="bs-docs-example bs-docs-example-submenus">

<div class="pull-left">
<p class="muted">Default</p>
<div class="dropdown clearfix">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
Expand All @@ -189,10 +189,10 @@ <h3>Sub menus on dropdowns</h3>
</div>
</div>

<div class="pull-left" style="margin-left: 20px;">
<div class="pull-left">
<p class="muted">Dropup</p>
<div class="dropup">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
Expand All @@ -211,10 +211,10 @@ <h3>Sub menus on dropdowns</h3>
</div>
</div>

<div class="pull-left" style="margin-left: 20px;">
<div class="pull-left">
<p class="muted">Left submenu</p>
<div class="dropdown">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
Expand Down
12 changes: 6 additions & 6 deletions docs/templates/pages/components.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@

<h3>{{_i}}Sub menus on dropdowns{{/i}}</h3>
<p>{{_i}}Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add <code>.dropdown-submenu</code> to any <code>li</code> in an existing dropdown menu for automatic styling.{{/i}}</p>
<div class="bs-docs-example" style="min-height: 180px;">
<div class="bs-docs-example bs-docs-example-submenus">

<div class="pull-left">
<p class="muted">Default</p>
<div class="dropdown clearfix">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li>
Expand All @@ -118,10 +118,10 @@
</div>
</div>{{! /.pull-left }}

<div class="pull-left" style="margin-left: 20px;">
<div class="pull-left">
<p class="muted">Dropup</p>
<div class="dropup">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li>
Expand All @@ -140,10 +140,10 @@
</div>
</div>{{! /.pull-left }}

<div class="pull-left" style="margin-left: 20px;">
<div class="pull-left">
<p class="muted">Left submenu</p>
<div class="dropdown">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">{{_i}}Action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li>
<li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li>
Expand Down

0 comments on commit 12916b0

Please sign in to comment.