diff options
| author | Mark Otto <[email protected]> | 2012-07-27 10:06:54 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-07-27 10:06:54 -0700 |
| commit | 9d5c4312232ebb53b2499ed495851c0d61eb648c (patch) | |
| tree | ee602408a1cd0bb79afd0cfd59cca7f0ede8df0b /docs | |
| parent | 1e9b4506196bd448c4038151964733ca524c10bb (diff) | |
| download | bootstrap-9d5c4312232ebb53b2499ed495851c0d61eb648c.tar.xz bootstrap-9d5c4312232ebb53b2499ed495851c0d61eb648c.zip | |
add basic support for sub menus in dropdown menus
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/assets/css/bootstrap.css | 31 | ||||
| -rw-r--r-- | docs/components.html | 19 | ||||
| -rw-r--r-- | docs/templates/pages/components.mustache | 19 |
3 files changed, 45 insertions, 24 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 87922cf88..f24baf581 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -2687,7 +2687,8 @@ table .span24 { } .dropdown-menu li > a:hover, -.dropdown-menu li > a:focus { +.dropdown-menu li > a:focus, +.dropdown-submenu:hover > a { color: #ffffff; text-decoration: none; background-color: #0088cc; @@ -2728,11 +2729,6 @@ table .span24 { background-color: transparent; } -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - .open { *z-index: 1000; } @@ -2760,6 +2756,29 @@ table .span24 { margin-bottom: 1px; } +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -5px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover .dropdown-menu { + display: block; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + .typeahead { margin-top: 2px; -webkit-border-radius: 4px; diff --git a/docs/components.html b/docs/components.html index 181a8cbfc..c36eec940 100644 --- a/docs/components.html +++ b/docs/components.html @@ -122,7 +122,16 @@ <li><a tabindex="-1" href="#">Another action</a></li> <li><a tabindex="-1" href="#">Something else here</a></li> <li class="divider"></li> - <li><a tabindex="-1" href="#">Separated link</a></li> + <li class="dropdown-submenu"> + <a tabindex="-1" href="#">Separated link</a> + <ul class="dropdown-menu"> + <li><a tabindex="-1" href="#">Second level link</a></li> + <li><a tabindex="-1" href="#">Second level link</a></li> + <li><a tabindex="-1" href="#">Second level link</a></li> + <li><a tabindex="-1" href="#">Second level link</a></li> + <li><a tabindex="-1" href="#">Second level link</a></li> + </ul> + </li> </ul> </div> </div> @@ -136,10 +145,6 @@ </ul> </pre> - - <hr class="bs-docs-separator"> - - <h2>Markup</h2> <p>Looking at just the dropdown menu, here's the required HTML. You need to wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then just create the menu.</p> @@ -156,10 +161,6 @@ </div> </pre> - - <hr class="bs-docs-separator"> - - <h2>Options</h2> <p>...</p> diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index 52d5137c0..e9022ee12 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -51,7 +51,16 @@ <li><a tabindex="-1" href="#">{{_i}}Another action{{/i}}</a></li> <li><a tabindex="-1" href="#">{{_i}}Something else here{{/i}}</a></li> <li class="divider"></li> - <li><a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a></li> + <li class="dropdown-submenu"> + <a tabindex="-1" href="#">{{_i}}Separated link{{/i}}</a> + <ul class="dropdown-menu"> + <li><a tabindex="-1" href="#">{{_i}}Second level link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Second level link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Second level link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Second level link{{/i}}</a></li> + <li><a tabindex="-1" href="#">{{_i}}Second level link{{/i}}</a></li> + </ul> + </li> </ul> </div> </div>{{! /example }} @@ -65,10 +74,6 @@ </ul> </pre> - - <hr class="bs-docs-separator"> - - <h2>{{_i}}Markup{{/i}}</h2> <p>{{_i}}Looking at just the dropdown menu, here's the required HTML. You need to wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then just create the menu.{{/i}}</p> @@ -85,10 +90,6 @@ </div> </pre> - - <hr class="bs-docs-separator"> - - <h2>{{_i}}Options{{/i}}</h2> <p>{{_i}}...{{/i}}</p> |
