diff --git a/bootstrap.css b/bootstrap.css index ca2bfe0b19..2795e42513 100644 --- a/bootstrap.css +++ b/bootstrap.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Sun Oct 30 20:12:53 PDT 2011 + * Date: Mon Oct 31 19:36:50 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -927,17 +927,10 @@ textarea[readonly] { * ---------------------------------------- */ table { width: 100%; - margin-bottom: 18px; padding: 0; - border-collapse: separate; - *border-collapse: collapse; - /* IE7, collapse table to remove spacing */ - + margin-bottom: 18px; font-size: 13px; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; + border-collapse: collapse; } table th, table td { padding: 10px 10px 9px; @@ -948,47 +941,109 @@ table th { padding-top: 9px; font-weight: bold; vertical-align: middle; - border-bottom: 1px solid #ddd; } table td { vertical-align: top; -} -table th + th, table td + td { - border-left: 1px solid #ddd; -} -table tr + tr td { border-top: 1px solid #ddd; } -table tbody tr:first-child td:first-child { +table tbody th { + border-top: 1px solid #ddd; + vertical-align: top; +} +.condensed-table th, .condensed-table td { + padding: 5px 5px 4px; +} +.bordered-table { + border: 1px solid #ddd; + border-collapse: separate; + *border-collapse: collapse; + /* IE7, collapse table to remove spacing */ + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.bordered-table th + th, .bordered-table td + td, .bordered-table th + td { + border-left: 1px solid #ddd; +} +.bordered-table thead:first-child tr:first-child th:first-child, .bordered-table tbody:first-child tr:first-child td:first-child { -webkit-border-radius: 4px 0 0 0; -moz-border-radius: 4px 0 0 0; border-radius: 4px 0 0 0; } -table tbody tr:first-child td:last-child { +.bordered-table thead:first-child tr:first-child th:last-child, .bordered-table tbody:first-child tr:first-child td:last-child { -webkit-border-radius: 0 4px 0 0; -moz-border-radius: 0 4px 0 0; border-radius: 0 4px 0 0; } -table tbody tr:last-child td:first-child { +.bordered-table tbody tr:last-child td:first-child { -webkit-border-radius: 0 0 0 4px; -moz-border-radius: 0 0 0 4px; border-radius: 0 0 0 4px; } -table tbody tr:last-child td:last-child { +.bordered-table tbody tr:last-child td:last-child { -webkit-border-radius: 0 0 4px 0; -moz-border-radius: 0 0 4px 0; border-radius: 0 0 4px 0; } -.zebra-striped tbody tr:nth-child(odd) td { +table .span1 { + width: 40px; +} +table .span2 { + width: 120px; +} +table .span3 { + width: 200px; +} +table .span4 { + width: 280px; +} +table .span5 { + width: 360px; +} +table .span6 { + width: 440px; +} +table .span7 { + width: 520px; +} +table .span8 { + width: 600px; +} +table .span9 { + width: 680px; +} +table .span10 { + width: 760px; +} +table .span11 { + width: 840px; +} +table .span12 { + width: 920px; +} +table .span13 { + width: 1000px; +} +table .span14 { + width: 1080px; +} +table .span15 { + width: 1160px; +} +table .span16 { + width: 1240px; +} +.striped-table tbody tr:nth-child(odd) td, .striped-table tbody tr:nth-child(odd) th { background-color: #f9f9f9; } -.zebra-striped tbody tr:hover td { +.striped-table tbody tr:hover td, .striped-table tbody tr:hover th { background-color: #f5f5f5; } -.zebra-striped .header { +table .header { cursor: pointer; } -.zebra-striped .header:after { +table .header:after { content: ""; float: right; margin-top: 7px; @@ -997,21 +1052,21 @@ table tbody tr:last-child td:last-child { border-color: #000 transparent; visibility: hidden; } -.zebra-striped .headerSortUp, .zebra-striped .headerSortDown { +table .headerSortUp, table .headerSortDown { background-color: rgba(141, 192, 219, 0.25); text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); } -.zebra-striped .header:hover:after { +table .header:hover:after { visibility: visible; } -.zebra-striped .headerSortDown:after, .zebra-striped .headerSortDown:hover:after { +table .headerSortDown:after, table .headerSortDown:hover:after { visibility: visible; filter: alpha(opacity=60); -khtml-opacity: 0.6; -moz-opacity: 0.6; opacity: 0.6; } -.zebra-striped .headerSortUp:after { +table .headerSortUp:after { border-bottom: none; border-left: 4px solid transparent; border-right: 4px solid transparent; diff --git a/bootstrap.min.css b/bootstrap.min.css index 776cb6e7bb..35f8a9bcd7 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -154,22 +154,39 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado .form-horizontal .controls{margin-left:150px;} .form-horizontal .control-list{padding-top:6px;} .form-horizontal .form-actions{padding-left:150px;} -table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} -table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;} -table td{vertical-align:top;} -table th+th,table td+td{border-left:1px solid #ddd;} -table tr+tr td{border-top:1px solid #ddd;} -table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} -table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} -table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} -table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} -.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;} -.zebra-striped tbody tr:hover td{background-color:#f5f5f5;} -.zebra-striped .header{cursor:pointer;}.zebra-striped .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} -.zebra-striped .headerSortUp,.zebra-striped .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} -.zebra-striped .header:hover:after{visibility:visible;} -.zebra-striped .headerSortDown:after,.zebra-striped .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} -.zebra-striped .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table{width:100%;padding:0;margin-bottom:18px;font-size:13px;border-collapse:collapse;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} +table th{padding-top:9px;font-weight:bold;vertical-align:middle;} +table td{vertical-align:top;border-top:1px solid #ddd;} +table tbody th{border-top:1px solid #ddd;vertical-align:top;} +.condensed-table th,.condensed-table td{padding:5px 5px 4px;} +.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;} +.bordered-table thead:first-child tr:first-child th:first-child,.bordered-table tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} +.bordered-table thead:first-child tr:first-child th:last-child,.bordered-table tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} +.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} +.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} +table .span1{width:40px;} +table .span2{width:120px;} +table .span3{width:200px;} +table .span4{width:280px;} +table .span5{width:360px;} +table .span6{width:440px;} +table .span7{width:520px;} +table .span8{width:600px;} +table .span9{width:680px;} +table .span10{width:760px;} +table .span11{width:840px;} +table .span12{width:920px;} +table .span13{width:1000px;} +table .span14{width:1080px;} +table .span15{width:1160px;} +table .span16{width:1240px;} +.striped-table tbody tr:nth-child(odd) td,.striped-table tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.striped-table tbody tr:hover td,.striped-table tbody tr:hover th{background-color:#f5f5f5;} +table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} +table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} +table .header:hover:after{visibility:visible;} +table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} table .blue{color:#049cdb;border-bottom-color:#049cdb;} table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;} table .green{color:#46a546;border-bottom-color:#46a546;} diff --git a/docs/base-css.html b/docs/base-css.html index 2872fbb997..6d3d92a171 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -88,7 +88,7 @@
Element | @@ -175,7 +175,7 @@
---|
Element | @@ -321,7 +321,7 @@
---|
Element | @@ -363,7 +363,7 @@
---|
Labels | @@ -428,7 +428,7 @@
---|
Tag | @@ -517,7 +517,7 @@
---|
Name | @@ -592,9 +592,9 @@ <table> ... </table> -
---|
# | @@ -626,12 +626,12 @@
---|
Note: Zebra-striping is a progressive enhancement not available for older browsers like IE8 and below.
-<table class="zebra-striped"> +<table class="striped-table"> ... </table>-
Taking the previous example, we improve the usefulness of our tables by providing sorting functionality via jQuery and the Tablesorter plugin. Click any column’s header to change the sort.
-# | @@ -668,7 +668,7 @@ $("table#sortTableExample").tablesorter({ sortList: [[1,0]] }); }); </script> -<table class="zebra-striped"> +<table class="striped-table"> ... </table> @@ -682,19 +682,49 @@
---|
Name | +Class | +Description | +
---|---|---|
Vertical (default) | +.vertical-form (not required) |
+ Stacked, left-aligned labels over controls | +
Horiztonal | +.horizontal-form |
+ Float left, right-aligned labels on same line as controls | +
Inline | +.inline-form |
+ Left-aligned label and inline-block controls for compact style | +
Search | +.search-form |
+ Extra-rounded text input for a typical search aesthetic | +
With 2.0, we now have four types of forms to choose from:
-With Bootstrap 2, we completely recoded our forms to allow for simple base styles and improved namespacing on labels and controls. To address the many uses of forms, we've included some base styles to help get you started.
Our default form styles are now vertical, not horizontal. This makes it easier to customize bare-bones forms, as well as forms in tricker situations like sign-up, modals, etc. They share the same exact markup; just swap the class.
As a convention, buttons are used for actions while links are used for objects. For instance, "Download" could be a button and "recent activity" could be a link.
-All buttons default to a light gray style, but a number of functional classes can be applied for different color styles. These classes include a blue .primary
class, a light-blue .info
class, a green .success
class, and a red .danger
class.
Button styles can be applied to anything with the .btn
applied. Typically you’ll want to apply these to only <a>
, <button>
, and select <input>
elements. Here’s how it looks:
Fancy larger or smaller buttons? Have at it!
-For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s .disabled
for links and :disabled
for <button>
elements.
Name | +Preview | +Class | +Description | +
---|---|---|---|
Default | +Button | +.btn |
+ Standard gray button with gradient | +
Primary | +Button | +.primary |
+ Makes button blue for more visual weight to indicate the primary action in a set of buttons | +
Info | +Button | +.info |
+ Used as an alternate to the default styles | +
Success | +Button | +.success |
+ Used to indicate a successful or positive action will be taken | +
Danger | +Button | +.danger |
+ Used to indicate a dangerous or potentially negative action will be taken | +
As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.
Button styles can be applied to anything with the .btn
applied. However, typically you’ll want to apply these to only <a>
and <button>
elements.
Note: All buttons must include the .btn
class. Button styles should be applied to <button>
and <a>
elements for consistency.
Fancy larger or smaller buttons? Have at it!
++ Primary action + Action +
++ Primary action + Action +
+For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s .disabled
for links and :disabled
for <button>
elements.
+ Primary action + Action +
++ +
+Bring some of Bootstrap's primary components to life with new custom plugins that work with jQuery and Ender. We encourage you to extend and modify them to fit your specific development needs.
-File | @@ -151,7 +151,7 @@
---|
Name | @@ -209,7 +209,7 @@ $('#my-modal').modal({
---|
Event | @@ -457,7 +457,7 @@ $('#my-modal').bind('hidden', function () {
---|
Name | @@ -574,7 +574,7 @@ $('#my-modal').bind('hidden', function () {
---|
Name | diff --git a/docs/less.html b/docs/less.html index d5a467bfa2..4fa0f0bdd2 100644 --- a/docs/less.html +++ b/docs/less.html @@ -166,7 +166,7 @@
---|
Method | diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 4a5aa9a0b0..de50caf8d8 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -161,7 +161,7 @@
---|
Variable | @@ -273,7 +273,7 @@
---|
Label | diff --git a/lib/tables.less b/lib/tables.less index 8a786ffd2a..b02087fbd2 100644 --- a/lib/tables.less +++ b/lib/tables.less @@ -9,14 +9,12 @@ table { width: 100%; - margin-bottom: @baseLineHeight; padding: 0; - border-collapse: separate; // Done so we can round those corners! - *border-collapse: collapse; /* IE7, collapse table to remove spacing */ + margin-bottom: @baseLineHeight; font-size: @baseFontSize; - border: 1px solid #ddd; - .border-radius(4px); - th, td { + border-collapse: collapse; + th, + td { padding: 10px 10px 9px; line-height: @baseLineHeight; text-align: left; @@ -25,22 +23,49 @@ table { padding-top: 9px; font-weight: bold; vertical-align: middle; - border-bottom: 1px solid #ddd; } td { vertical-align: top; - } - th + th, - td + td { - border-left: 1px solid #ddd; - } - tr + tr td { border-top: 1px solid #ddd; } - tbody tr:first-child td:first-child { + // When scoped to row, fix th in tbody + tbody th { + border-top: 1px solid #ddd; + vertical-align: top; + } +} + + +// CONDENSED VERSION +// ----------------- + +.condensed-table { + th, + td { + padding: 5px 5px 4px; + } +} + + +// BORDERED VERSION +// ---------------- + +.bordered-table { + border: 1px solid #ddd; + border-collapse: separate; // Done so we can round those corners! + *border-collapse: collapse; /* IE7, collapse table to remove spacing */ + .border-radius(4px); + th + th, + td + td, + th + td { + border-left: 1px solid #ddd; + } + thead:first-child tr:first-child th:first-child, + tbody:first-child tr:first-child td:first-child { .border-radius(4px 0 0 0); } - tbody tr:first-child td:last-child { + thead:first-child tr:first-child th:last-child, + tbody:first-child tr:first-child td:last-child { .border-radius(0 4px 0 0); } tbody tr:last-child td:first-child { @@ -52,20 +77,55 @@ table { } +// ---------------- + +// This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border +.tableColumns(@columnSpan: 1) { + width: ((@gridColumnWidth - 20) * @columnSpan) + ((@gridColumnWidth - 20) * (@columnSpan - 1)); +} +table { + // Default columns + .span1 { .tableColumns(1); } + .span2 { .tableColumns(2); } + .span3 { .tableColumns(3); } + .span4 { .tableColumns(4); } + .span5 { .tableColumns(5); } + .span6 { .tableColumns(6); } + .span7 { .tableColumns(7); } + .span8 { .tableColumns(8); } + .span9 { .tableColumns(9); } + .span10 { .tableColumns(10); } + .span11 { .tableColumns(11); } + .span12 { .tableColumns(12); } + .span13 { .tableColumns(13); } + .span14 { .tableColumns(14); } + .span15 { .tableColumns(15); } + .span16 { .tableColumns(16); } +} + + // ZEBRA-STRIPING // -------------- // Default zebra-stripe styles (alternating gray and transparent backgrounds) -.zebra-striped { +.striped-table { tbody { - tr:nth-child(odd) td { + tr:nth-child(odd) td, + tr:nth-child(odd) th { background-color: #f9f9f9; } - tr:hover td { + tr:hover td, + tr:hover th { background-color: #f5f5f5; } } +} + +// TABLESORTER +// ----------- + +table { // Tablesorting styles w/ jQuery plugin .header { cursor: pointer; @@ -111,9 +171,6 @@ table { .opacity(60); } } -} - -table { // Blue Table Headings .blue { color: @blue;
---|