diff --git a/docs/_includes/nav-components.html b/docs/_includes/nav-components.html index ed00b62fa3ea8d6656e1d281278855f8f92d6c7b..514dcfed3c06f3f197c99a4c77d73755a084d0cf 100644 --- a/docs/_includes/nav-components.html +++ b/docs/_includes/nav-components.html @@ -3,6 +3,7 @@ <ul class="nav"> <li><a href="#dropdowns-example">Example</a></li> <li><a href="#dropdowns-alignment">Alignment options</a></li> + <li><a href="#dropdowns-headers">Headers</a></li> <li><a href="#dropdowns-disabled">Disabled menu items</a></li> </ul> </li> diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 58f4957049ccd333828c5bce408c5d46cf15a7f4..8111f9288e3bd913263f99a6d427e7c2b1b0cf5d 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1249,6 +1249,12 @@ table th[class^="col-"] { float: none; } +.table > tbody > tr > td.active, +.table > tbody > tr > th.active, +.table > tbody > tr.active > td { + background-color: #f5f5f5; +} + .table > tbody > tr > td.success, .table > tbody > tr > th.success, .table > tbody > tr.success > td { @@ -1348,8 +1354,6 @@ input[type="color"] { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - -moz-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } @@ -2144,8 +2148,6 @@ input[type="button"].btn-block { .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } @@ -2158,8 +2160,6 @@ input[type="button"].btn-block { height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; transition: height 0.35s ease; } @@ -2196,9 +2196,7 @@ input[type="button"].btn-block { border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; + background-clip: padding-box; } .dropdown-menu.pull-right { @@ -2275,6 +2273,14 @@ input[type="button"].btn-block { outline: 0; } +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.428571429; + color: #999999; +} + .dropdown-backdrop { position: fixed; top: 0; @@ -2303,11 +2309,6 @@ input[type="button"].btn-block { margin-bottom: 1px; } -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - .list-group { padding-left: 0; margin-bottom: 20px; @@ -2710,17 +2711,6 @@ button.close { text-align: center; } -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 1.428571429; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - .tabbable:before, .tabbable:after { display: table; @@ -2858,7 +2848,7 @@ button.close { .navbar-brand { display: block; max-width: 200px; - padding: 15px; + padding: 15px 15px; margin-right: auto; margin-left: auto; font-size: 18px; @@ -3475,8 +3465,6 @@ button.close { .modal.fade { top: -25%; -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; transition: opacity 0.3s linear, top 0.3s ease-out; } @@ -3503,9 +3491,7 @@ button.close { outline: none; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; + background-clip: padding-box; } .modal-backdrop { @@ -3607,7 +3593,7 @@ button.close { position: absolute; z-index: 1030; display: block; - font-size: 11px; + font-size: 12px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); @@ -3950,8 +3936,6 @@ button.close { border: 1px solid #dddddd; border-radius: 4px; -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } @@ -4183,8 +4167,6 @@ a.list-group-item.active > .badge, -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; transition: width 0.6s ease; } @@ -4194,10 +4176,7 @@ a.list-group-item.active > .badge, background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; + background-size: 40px 40px; } .progress.active .progress-bar { @@ -4295,8 +4274,6 @@ a.list-group-item.active > .badge, position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } @@ -4392,7 +4369,9 @@ a.list-group-item.active > .badge, filter: alpha(opacity=90); } -.carousel-control .glyphicon { +.carousel-control .glyphicon, +.carousel-control .icon-prev, +.carousel-control .icon-next { position: absolute; top: 50%; left: 50%; @@ -4404,6 +4383,14 @@ a.list-group-item.active > .badge, margin-left: -10px; } +.carousel-control .icon-prev:before { + content: '\2039'; +} + +.carousel-control .icon-next:before { + content: '\203a'; +} + .carousel-indicators { position: absolute; bottom: 20px; @@ -4452,7 +4439,9 @@ a.list-group-item.active > .badge, } @media screen and (min-width: 768px) { - .carousel-control .glyphicon { + .carousel-control .glyphicon, + .carousel-control .icon-prev, + .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; diff --git a/docs/components.html b/docs/components.html index 5cc3a1e2809e72e2a9d663d80e87b99663dc912d..9202b133a1f6bbae05bfd3f4dcf317d1da9f4454 100644 --- a/docs/components.html +++ b/docs/components.html @@ -46,6 +46,31 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel"> ... </ul> +{% endhighlight %} + + <h3 id="dropdowns-headers">Dropdown headers</h3> + <p>Add a header to break up label sections of actions in any dropdown menu.</p> + <div class="bs-example"> + <div class="dropdown clearfix"> + <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> + <li class="dropdown-header">Dropdown header</li> + <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> + <li class="divider"></li> + <li class="dropdown-header">Dropdown header</li> + <li><a tabindex="-1" href="#">Separated link</a></li> + </ul> + </div> + </div><!-- /example --> +{% highlight html %} +<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> + <li class="dropdown-header">Dropdown header</li> + ... + <li class="divider"></li> + <li class="dropdown-header">Dropdown header</li> + ... +</ul> {% endhighlight %} <h3 id="dropdowns-disabled">Disabled menu options</h3> diff --git a/docs/css.html b/docs/css.html index b401b6593dcc787f88327d28cfe1e16047a03dec..10f2ea1ddf4ff03dc4c1fae6c7dde38f2d9caa0a 100644 --- a/docs/css.html +++ b/docs/css.html @@ -1048,8 +1048,8 @@ For example, <code><section></code> should be wrapped as inline. - <h2 id="tables-row-classes">Optional row classes</h2> - <p>Use contextual classes to color table rows.</p> + <h2 id="tables-row-classes">Contextual table classes</h2> + <p>Use contextual classes to color table rows or individual cells.</p> <table class="table table-bordered table-striped"> <colgroup> <col class="col-lg-1"> @@ -1066,19 +1066,25 @@ For example, <code><section></code> should be wrapped as inline. <td> <code>.success</code> </td> - <td>Indicates a successful or positive action.</td> + <td>Indicates a successful or positive action</td> </tr> <tr> <td> <code>.danger</code> </td> - <td>Indicates a dangerous or potentially negative action.</td> + <td>Indicates a dangerous or potentially negative action</td> </tr> <tr> <td> <code>.warning</code> </td> - <td>Indicates a warning that might need attention.</td> + <td>Indicates a warning that might need attention</td> + </tr> + <tr> + <td> + <code>.active</code> + </td> + <td>Applies the hover color to a particular row or cell</td> </tr> </tbody> </table> @@ -1087,42 +1093,64 @@ For example, <code><section></code> should be wrapped as inline. <thead> <tr> <th>#</th> - <th>Product</th> - <th>Payment Taken</th> - <th>Status</th> + <th>Column heading</th> + <th>Column heading</th> + <th>Column heading</th> </tr> </thead> <tbody> <tr class="success"> <td>1</td> - <td>TB - Monthly</td> - <td>01/04/2012</td> - <td>Approved</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> </tr> - <tr class="danger"> + <tr> <td>2</td> - <td>TB - Monthly</td> - <td>02/04/2012</td> - <td>Declined</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> </tr> - <tr class="warning"> + <tr class="danger"> <td>3</td> - <td>TB - Monthly</td> - <td>03/04/2012</td> - <td>Pending</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> + </tr> + <tr> + <td>4</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> + </tr> + <tr class="warning"> + <td>5</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> + </tr> + <tr> + <td>6</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> + </tr> + <tr class="active"> + <td>7</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> </tr> </tbody> </table> </div><!-- /example --> {% highlight html %} -... <tr class="success"> <td>1</td> - <td>TB - Monthly</td> - <td>01/04/2012</td> - <td>Approved</td> + <td>Column content</td> + <td>Column content</td> + <td>Column content</td> </tr> -... {% endhighlight %} </div> diff --git a/docs/javascript.html b/docs/javascript.html index fd239b4065371721ca910a7843696e735020aff5..94946a351273ec3da43a8f8d6176df8d10d2f9ec 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1518,10 +1518,10 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { </div> </div> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> - <span class="glyphicon glyphicon-chevron-left"></span> + <span class="icon-prev"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> - <span class="glyphicon glyphicon-chevron-right"></span> + <span class="icon-next"></span> </a> </div> </div><!-- /example --> @@ -1547,13 +1547,17 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> - <span class="glyphicon glyphicon-chevron-left"></span> + <span class="icon-prev"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> - <span class="glyphicon glyphicon-chevron-right"></span> + <span class="icon-next"></span> </a> </div> {% endhighlight %} +<div class="bs-callout"> + <h4>Glyphicon Alternative</h4> + <p>With <a href="/css/#glyphicons">Glyphicons</a> available, you may choose to style the left and right toggle buttons with <code>.glyphicon-chevron-left</code> and <code>.glyphicon-chevron-right</code>.</p> +</div> <h3>Optional captions</h3> <p>Add captions to your slides easily with the <code>.carousel-caption</code> element within any <code>.item</code>. Place just about any optional HTML within there and it will be automatically aligned and formatted.</p> @@ -1592,10 +1596,10 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { </div> </div> <a class="left carousel-control" href="#carousel-example-captions" data-slide="prev"> - <span class="glyphicon glyphicon-chevron-left"></span> + <span class="icon-prev"></span> </a> <a class="right carousel-control" href="#carousel-example-captions" data-slide="next"> - <span class="glyphicon glyphicon-chevron-right"></span> + <span class="icon-next"></span> </a> </div> </div><!-- /example --> diff --git a/less/carousel.less b/less/carousel.less index 8834c6f7b8b999c44fbefaa2400ed1c88dfe7b4e..40d7e277e7fc4400f9f895b3563343010c7c4433 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -99,7 +99,9 @@ } // Toggles - .glyphicon { + .glyphicon, + .icon-prev, + .icon-next { position: absolute; top: 50%; left: 50%; @@ -110,6 +112,17 @@ margin-top: -10px; margin-left: -10px; } + // Non-glyphicon toggles + .icon-prev { + &:before { + content: '\2039'; + } + } + .icon-next { + &:before { + content: '\203a'; + } + } } // Optional indicator pips @@ -167,7 +180,9 @@ @media screen and (min-width: @screen-tablet) { // Scale up the controls a smidge - .carousel-control .glyphicon { + .carousel-control .glyphicon, + .carousel-control .icon-prev, + .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; diff --git a/less/dropdowns.less b/less/dropdowns.less index 8ae9dbba158859e5d26ce051c683cc1f07f19d95..7e35d42871caee81530a0909413ac9e87186d54c 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -120,6 +120,17 @@ } } +// Dropdown section headers +// --------------------------- +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: @font-size-small; + line-height: @line-height-base; + color: @gray-light; +} + + // Backdrop to catch body clicks on mobile, etc. // --------------------------- @@ -158,11 +169,3 @@ margin-bottom: 1px; } } - -// Tweak nav headers -// --------------------------- -// Increase padding from 15px to 20px on sides -.dropdown .dropdown-menu .nav-header { - padding-left: 20px; - padding-right: 20px; -} diff --git a/less/mixins.less b/less/mixins.less index 440dcd074099e08ba1f3fd9b766f1ab727867dab..4dbfa83ef5cd6bad7bf65ee4328bae0d36bc9e45 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -110,56 +110,40 @@ // Transitions .transition(@transition) { -webkit-transition: @transition; - -moz-transition: @transition; - -o-transition: @transition; transition: @transition; } .transition-delay(@transition-delay) { -webkit-transition-delay: @transition-delay; - -moz-transition-delay: @transition-delay; - -o-transition-delay: @transition-delay; transition-delay: @transition-delay; } .transition-duration(@transition-duration) { -webkit-transition-duration: @transition-duration; - -moz-transition-duration: @transition-duration; - -o-transition-duration: @transition-duration; transition-duration: @transition-duration; } // Transformations .rotate(@degrees) { -webkit-transform: rotate(@degrees); - -moz-transform: rotate(@degrees); -ms-transform: rotate(@degrees); - -o-transform: rotate(@degrees); transform: rotate(@degrees); } .scale(@ratio) { -webkit-transform: scale(@ratio); - -moz-transform: scale(@ratio); -ms-transform: scale(@ratio); - -o-transform: scale(@ratio); transform: scale(@ratio); } .translate(@x, @y) { -webkit-transform: translate(@x, @y); - -moz-transform: translate(@x, @y); -ms-transform: translate(@x, @y); - -o-transform: translate(@x, @y); transform: translate(@x, @y); } .skew(@x, @y) { -webkit-transform: skew(@x, @y); - -moz-transform: skew(@x, @y); -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885 - -o-transform: skew(@x, @y); transform: skew(@x, @y); } .translate3d(@x, @y, @z) { -webkit-transform: translate3d(@x, @y, @z); - -moz-transform: translate3d(@x, @y, @z); - -o-transform: translate3d(@x, @y, @z); transform: translate3d(@x, @y, @z); } @@ -175,16 +159,11 @@ // Background clipping .background-clip(@clip) { - -webkit-background-clip: @clip; - -moz-background-clip: @clip; background-clip: @clip; } // Background sizing .background-size(@size) { - -webkit-background-size: @size; - -moz-background-size: @size; - -o-background-size: @size; background-size: @size; } @@ -463,8 +442,6 @@ .clearfix(); } -// Make a grid - // Creates a wrapper for a series of columns .make-row() { // Then clear the floated columns @@ -481,6 +458,7 @@ margin-right: (@grid-gutter-width / -2); } } + // Generate the columns .make-column(@columns) { position: relative; @@ -496,6 +474,7 @@ width: percentage((@columns / @grid-columns)); } } + // Generate the column offsets .make-column-offset(@columns) { @media (min-width: @grid-float-breakpoint) { @@ -513,7 +492,22 @@ } } +// Generate the small columns +.make-small-column(@columns) { + position: relative; + float: left; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); + @max-width: (@grid-float-breakpoint - 1); + // Calculate width based on number of columns available + @media (max-width: @max-width) { + width: percentage((@columns / @grid-columns)); + } +} // Framework mixins // -------------------------------------------------- diff --git a/less/navbar.less b/less/navbar.less index 7a6e80488fc4f0232de354590f614d707f17d4fd..1818490577a2dd9e1d559da015eb8fd021e47846 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -6,8 +6,8 @@ .navbar { position: relative; margin-bottom: 20px; - padding-left: @navbar-padding; - padding-right: @navbar-padding; + padding-left: @navbar-padding-horizontal; + padding-right: @navbar-padding-horizontal; background-color: @navbar-bg; border-radius: @border-radius-base; @@ -100,7 +100,7 @@ max-width: 200px; margin-left: auto; margin-right: auto; - padding: @navbar-padding; + padding: @navbar-padding-vertical @navbar-padding-horizontal; font-size: @font-size-large; font-weight: 500; line-height: @line-height-computed; @@ -298,7 +298,7 @@ .navbar-brand { float: left; - margin-left: -(@navbar-padding); + margin-left: -(@navbar-padding-horizontal); margin-right: 5px; } .navbar-nav { diff --git a/less/navs.less b/less/navs.less index 87780a156fc8bcf8c29bdbdfce643ed3cf8f0cae..9f671643a775787bddd0ad78306f40c8926b60f8 100644 --- a/less/navs.less +++ b/less/navs.less @@ -195,22 +195,6 @@ -// Nav headers (for dropdowns and lists) -// ------------------------- - -.nav-header { - display: block; - padding: 3px 15px; - font-size: @font-size-mini; - font-weight: bold; - line-height: @line-height-base; - color: @gray-light; - text-shadow: 0 1px 0 rgba(255,255,255,.5); - text-transform: uppercase; -} - - - // Tabbable tabs // ------------------------- diff --git a/less/scaffolding.less b/less/scaffolding.less index 8fc3a2360efd14bd91ae0a76cc1ac51fcf34b7ae..b6128dc5d1afdf17f0b17d87d335278dd047dd1c 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -71,7 +71,7 @@ img { // Rounded corners .img-rounded { - border-radius: 6px; + border-radius: @border-radius-large; } // Image thumbnails diff --git a/less/tables.less b/less/tables.less index 3a546917c4bd9e7d89a311cb9cb12a38fc49bf94..b742897c17aa4d83849d7b21abf0f734cce40fd6 100644 --- a/less/tables.less +++ b/less/tables.less @@ -219,6 +219,11 @@ table { // Exact selectors below required to override .table-striped .table > tbody > tr { + > td.active, + > th.active, + &.active > td { + background-color: @table-bg-hover; + } > td.success, > th.success, &.success > td { diff --git a/less/tooltip.less b/less/tooltip.less index 790eb1cd3e0b5a7d8c9569b308b540c7033e52e5..fef430900a3e9b1d5d7d46ed64c08996e7be4a13 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -9,7 +9,7 @@ z-index: @zindex-tooltip; display: block; visibility: visible; - font-size: @font-size-mini; + font-size: @font-size-small; line-height: 1.4; .opacity(0); diff --git a/less/variables.less b/less/variables.less index fdd5929db63f6ff9739b414515c72d353b846f41..b28d33091f8c06b20fa8657d2b877c2174621ce5 100644 --- a/less/variables.less +++ b/less/variables.less @@ -48,7 +48,6 @@ @font-size-base: 14px; @font-size-large: ceil(@font-size-base * 1.25); // ~18px @font-size-small: ceil(@font-size-base * 0.85); // ~12px -@font-size-mini: ceil(@font-size-base * 0.75); // ~11px @line-height-base: 1.428571429; // 20/14 @line-height-computed: floor(@font-size-base * @line-height-base); // ~20px @@ -86,7 +85,8 @@ @table-bg: transparent; // overall background-color @table-bg-accent: #f9f9f9; // for striping -@table-bg-hover: #f5f5f5; // for hover +@table-bg-hover: #f5f5f5; +@table-bg-active: @table-bg-hover; @table-border-color: #ddd; // table and cell border @@ -176,7 +176,8 @@ @navbar-height: 50px; @navbar-color: #777; @navbar-bg: #eee; -@navbar-padding: floor(@grid-gutter-width / 2); // ~15px +@navbar-padding-horizontal: floor(@grid-gutter-width / 2); // ~15px +@navbar-padding-vertical: 15px; // Navbar links @navbar-link-color: #777;