diff --git a/docs/_includes/colophon.html b/docs/_includes/colophon.html index 5018113b41..fa7958ef8f 100644 --- a/docs/_includes/colophon.html +++ b/docs/_includes/colophon.html @@ -1,35 +1,16 @@ - diff --git a/docs/_includes/docs-nav.html b/docs/_includes/docs-nav.html deleted file mode 100644 index 2c001a3f4c..0000000000 --- a/docs/_includes/docs-nav.html +++ /dev/null @@ -1,226 +0,0 @@ -
- -
diff --git a/docs/_includes/nav-components.html b/docs/_includes/nav-components.html new file mode 100644 index 0000000000..8c7728bc8f --- /dev/null +++ b/docs/_includes/nav-components.html @@ -0,0 +1,121 @@ +
  • + Glyphicons + +
  • +
  • + Dropdowns + +
  • +
  • + Button groups + +
  • +
  • + Button dropdowns + +
  • +
  • + Navs + +
  • +
  • + Navbar + +
  • +
  • Breadcrumbs
  • +
  • + Pagination + +
  • +
  • Labels
  • +
  • Badges
  • +
  • + Typography + +
  • +
  • Thumbnails
  • +
  • + Alerts + +
  • +
  • + Progress bars + +
  • +
  • Media object
  • +
  • + List group + +
  • +
  • + Panels + +
  • +
  • Wells
  • diff --git a/docs/_includes/nav-css.html b/docs/_includes/nav-css.html new file mode 100644 index 0000000000..f1596f7efa --- /dev/null +++ b/docs/_includes/nav-css.html @@ -0,0 +1,72 @@ +
  • + Overview + +
  • +
  • + Grid system + +
  • +
  • + Typography + +
  • +
  • Code
  • +
  • + Tables + +
  • +
  • + Forms + +
  • +
  • + Buttons + +
  • +
  • Images
  • +
  • Helper classes
  • +
  • Responsive utilities
  • diff --git a/docs/_includes/nav-getting-started.html b/docs/_includes/nav-getting-started.html new file mode 100644 index 0000000000..fd6f8c98b0 --- /dev/null +++ b/docs/_includes/nav-getting-started.html @@ -0,0 +1,20 @@ +
  • + Download Bootstrap + +
  • +
  • + What's included +
  • +
  • + Templates and examples + +
  • +
  • + Customizing Bootstrap +
  • \ No newline at end of file diff --git a/docs/_includes/nav-javascript.html b/docs/_includes/nav-javascript.html new file mode 100644 index 0000000000..9422b27fb5 --- /dev/null +++ b/docs/_includes/nav-javascript.html @@ -0,0 +1,28 @@ +
  • + Overview + +
  • +
  • Transitions
  • +
  • + Modal + +
  • +
  • Dropdown
  • +
  • Scrollspy
  • +
  • Tab
  • +
  • Tooltip
  • +
  • Popover
  • +
  • Alert
  • +
  • Button
  • +
  • Collapse
  • +
  • Carousel
  • +
  • Affix
  • diff --git a/docs/_includes/nav-main.html b/docs/_includes/nav-main.html new file mode 100644 index 0000000000..fceeb7a869 --- /dev/null +++ b/docs/_includes/nav-main.html @@ -0,0 +1,29 @@ + diff --git a/docs/_includes/social-buttons.html b/docs/_includes/social-buttons.html new file mode 100644 index 0000000000..5cef71a19d --- /dev/null +++ b/docs/_includes/social-buttons.html @@ -0,0 +1,16 @@ +
    + +
    diff --git a/docs/_layouts/customize.html b/docs/_layouts/customize.html new file mode 100644 index 0000000000..f01f4f86ed --- /dev/null +++ b/docs/_layouts/customize.html @@ -0,0 +1,25 @@ + + + + + {% include header.html %} + + + + + + {% include nav-main.html %} + + +
    + {{ content }} + + + {% include colophon.html %} +
    + + + {% include footer.html %} + + + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 8015c1587c..249088b995 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -5,13 +5,47 @@ {% include header.html %} - + - - {% include docs-nav.html %} + + {% include nav-main.html %} - - {{ content }} + +
    +
    +

    {{ page.title }}

    +

    {{ page.lead }}

    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + {{ content }} +
    +
    + + + + Back to top + + +
    {% include colophon.html %} diff --git a/docs/_layouts/home.html b/docs/_layouts/home.html index 184936f38f..9230184dc7 100644 --- a/docs/_layouts/home.html +++ b/docs/_layouts/home.html @@ -7,6 +7,9 @@ + + {% include nav-main.html %} + {{ content }} diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 633543fd99..209aed4967 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -251,7 +251,7 @@ table { max-width: 100% !important; } @page { - margin: 0.5cm; + margin: 2cm .5cm; } p, h2, @@ -263,7 +263,7 @@ table { h3 { page-break-after: avoid; } - .navbar-toggle { + .navbar { display: none; } } @@ -280,17 +280,10 @@ html { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -@media screen and (max-device-width: 480px) { - html { - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - } -} - body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; - line-height: 20px; + line-height: 1.428571429; color: #333333; background-color: #ffffff; } @@ -422,9 +415,8 @@ h6, .h4, .h5, .h6 { - font-family: inherit; font-weight: 500; - line-height: 20px; + line-height: 1.1; } h1 small, @@ -449,11 +441,6 @@ h2, h3 { margin-top: 20px; margin-bottom: 10px; - line-height: 40px; -} - -h3 { - line-height: 30px; } h4, @@ -465,22 +452,22 @@ h6 { h1, .h1 { - font-size: 38.5px; + font-size: 38px; } h2, .h2 { - font-size: 31.5px; + font-size: 32px; } h3, .h3 { - font-size: 24.5px; + font-size: 24px; } h4, .h4 { - font-size: 17.5px; + font-size: 18px; } h5, @@ -490,24 +477,21 @@ h5, h6, .h6 { - font-size: 11.9px; + font-size: 12px; } h1 small, .h1 small { - font-size: 24.5px; + font-size: 24px; } h2 small, .h2 small { - font-size: 17.5px; + font-size: 18px; } h3 small, -.h3 small { - font-size: 14px; -} - +.h3 small, h4 small, .h4 small { font-size: 14px; @@ -533,7 +517,7 @@ ol ul { } li { - line-height: 20px; + line-height: 1.428571429; } .list-unstyled { @@ -558,7 +542,7 @@ dl { dt, dd { - line-height: 20px; + line-height: 1.428571429; } dt { @@ -640,7 +624,7 @@ blockquote p:last-child { blockquote small { display: block; - line-height: 20px; + line-height: 1.428571429; color: #999999; } @@ -680,7 +664,7 @@ address { display: block; margin-bottom: 20px; font-style: normal; - line-height: 20px; + line-height: 1.428571429; } code, @@ -705,7 +689,7 @@ pre { padding: 9.5px; margin: 0 0 10px; font-size: 13px; - line-height: 20px; + line-height: 1.428571429; word-break: break-all; word-wrap: break-word; white-space: pre; @@ -1033,7 +1017,7 @@ th { .table thead > tr > td, .table tbody > tr > td { padding: 8px; - line-height: 20px; + line-height: 1.428571429; vertical-align: top; border-top: 1px solid #dddddd; } @@ -1221,7 +1205,7 @@ legend { padding: 0; margin-bottom: 20px; font-size: 21px; - line-height: 40px; + line-height: inherit; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; @@ -1250,11 +1234,10 @@ input[type="search"], input[type="tel"], input[type="color"] { display: block; - min-height: 34px; - padding: 6px 9px; - margin-bottom: 10px; + min-height: 36px; + padding: 8px 12px; font-size: 14px; - line-height: 20px; + line-height: 1.428571429; color: #555555; vertical-align: middle; background-color: #ffffff; @@ -1262,10 +1245,32 @@ input[type="color"] { border-radius: 4px; -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 linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border-color linear 0.2s, box-shadow linear 0.2s; - -o-transition: border-color linear 0.2s, box-shadow linear 0.2s; - transition: border-color linear 0.2s, box-shadow linear 0.2s; + -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; +} + +select:focus, +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); } input, @@ -1294,30 +1299,6 @@ textarea { height: auto; } -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: 0 0 8px rgba(82, 168, 236, 0.6); -} - input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; @@ -1329,10 +1310,10 @@ input[type="checkbox"] { select, input[type="file"] { - height: 34px; + height: 36px; /* In IE7, the height of the select element cannot be changed by height, only font-size. TODO: Check if this is still needed when dropping IE7 support */ - line-height: 34px; + line-height: 36px; } select[multiple], @@ -1340,7 +1321,6 @@ select[size] { height: auto; } -select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { @@ -1374,6 +1354,7 @@ textarea::-webkit-input-placeholder { display: block; min-height: 20px; padding-left: 20px; + margin-top: 10px; margin-bottom: 10px; vertical-align: middle; } @@ -1439,8 +1420,8 @@ input[type="url"].input-large, input[type="search"].input-large, input[type="tel"].input-large, input[type="color"].input-large { - padding: 11px 14px; - font-size: 17.5px; + padding: 14px 16px; + font-size: 18px; border-radius: 6px; } @@ -1460,31 +1441,12 @@ input[type="url"].input-small, input[type="search"].input-small, input[type="tel"].input-small, input[type="color"].input-small { - min-height: 26px; - padding: 2px 10px; - font-size: 11.9px; + min-height: 30px; + padding: 5px 10px; + font-size: 12px; border-radius: 3px; } -input[class*="span"], -select[class*="span"], -textarea[class*="span"] { - float: none; - margin-right: 0; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-prepend input[class*="span"] { - display: inline-block; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"] { - height: 34px; -} - input[disabled], select[disabled], textarea[disabled], @@ -1574,7 +1536,7 @@ select:focus:invalid:focus { } .form-actions { - padding: 19px 20px 20px; + padding: 20px 20px; margin-top: 20px; margin-bottom: 20px; background-color: #f5f5f5; @@ -1601,20 +1563,11 @@ select:focus:invalid:focus { clear: both; } -.help-block, -.help-inline { - color: #737373; -} - .help-block { display: block; + margin-top: 5px; margin-bottom: 10px; -} - -.help-inline { - display: inline-block; - padding-left: 5px; - vertical-align: middle; + color: #737373; } .input-group { @@ -1637,20 +1590,11 @@ select:focus:invalid:focus { .input-group-btn, .input-group input { display: table-cell; - /*margin: 0;*/ - - border-radius: 0; } -.input-group-addon.input-small, -.input-group-btn.input-small, -.input-group input.input-small { - border-radius: 0; -} - -.input-group-addon.input-large, -.input-group-btn.input-large, -.input-group input.input-large { +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group input:not(:first-child):not(:last-child) { border-radius: 0; } @@ -1664,42 +1608,36 @@ select:focus:invalid:focus { padding: 6px 8px; font-size: 14px; font-weight: normal; - line-height: 20px; + line-height: 1.428571429; text-align: center; text-shadow: 0 1px 0 #fff; background-color: #eeeeee; border: 1px solid #ccc; + border-radius: 4px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .input-group-addon.input-small { - padding: 2px 10px; - font-size: 11.9px; + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; } .input-group-addon.input-large { - padding: 11px 14px; - font-size: 17.5px; + padding: 14px 16px; + font-size: 18px; + border-radius: 6px; } .input-group input:first-child, -.input-group-addon:first-child { - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; -} - -.input-group input:first-child.input-small, -.input-group-addon:first-child.input-small { - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; -} - -.input-group input:first-child.input-large, -.input-group-addon:first-child.input-large { - border-bottom-left-radius: 6px; - border-top-left-radius: 6px; +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; } .input-group-addon:first-child { @@ -1707,21 +1645,12 @@ select:focus:invalid:focus { } .input-group input:last-child, -.input-group-addon:last-child { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.input-group input:last-child.input-small, -.input-group-addon:last-child.input-small { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - -.input-group input:last-child.input-large, -.input-group-addon:last-child.input-large { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } .input-group-addon:last-child { @@ -1736,7 +1665,6 @@ select:focus:invalid:focus { .input-group-btn > .btn { position: relative; float: left; - border-radius: 0; } .input-group-btn > .btn + .btn { @@ -1748,98 +1676,41 @@ select:focus:invalid:focus { z-index: 2; } -.input-group-btn:first-child > .btn:first-child, -.input-group-btn:first-child > .dropdown-toggle:first-child { - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; -} - -.input-group-btn:first-child > .btn:first-child.btn-large, -.input-group-btn:first-child > .dropdown-toggle:first-child.btn-large { - border-bottom-left-radius: 6px; - border-top-left-radius: 6px; -} - -.input-group-btn:first-child > .btn:first-child.btn-small, -.input-group-btn:first-child > .dropdown-toggle:first-child.btn-small { - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; -} - -.input-group-btn:last-child > .btn:last-child, -.input-group-btn:last-child > .dropdown-toggle { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.input-group-btn:last-child > .btn:last-child.btn-large, -.input-group-btn:last-child > .dropdown-toggle.btn-large { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} - -.input-group-btn:last-child > .btn:last-child.btn-small, -.input-group-btn:last-child > .dropdown-toggle.btn-small { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - .form-inline input, .form-inline select, .form-inline textarea, .form-inline .radio, .form-inline .checkbox { display: inline-block; +} + +.form-inline .radio, +.form-inline .checkbox { + margin-top: 0; margin-bottom: 0; } -@media screen and (min-width: 768px) { - .form-horizontal .control-group { - position: relative; - margin-bottom: 20px; - } - .form-horizontal .control-group:before, - .form-horizontal .control-group:after { - display: table; - content: " "; - } - .form-horizontal .control-group:after { - clear: both; - } - .form-horizontal .control-group:before, - .form-horizontal .control-group:after { - display: table; - content: " "; - } - .form-horizontal .control-group:after { - clear: both; - } - .form-horizontal .control-group input, - .form-horizontal .control-group select, - .form-horizontal .control-group textarea { - margin-bottom: 0; - } - .form-horizontal .control-group > .control-label { - float: left; - width: 160px; - padding-top: 6px; +.form-horizontal .row + .row { + margin-top: 15px; +} + +.form-horizontal .row-label { + padding-top: 6px; +} + +@media (min-width: 768px) { + .form-horizontal .row-label { text-align: right; } - .form-horizontal .control-group > .controls { - margin-left: 180px; - } - .form-horizontal .form-actions { - padding-left: 180px; - } } .btn { display: inline-block; - padding: 6px 12px; + padding: 8px 12px; margin-bottom: 0; font-size: 14px; font-weight: 500; - line-height: 20px; + line-height: 1.428571429; text-align: center; white-space: nowrap; vertical-align: middle; @@ -2099,20 +1970,15 @@ fieldset[disabled] .btn-link:focus { } .btn-large { - padding: 11px 14px; - font-size: 17.5px; + padding: 14px 16px; + font-size: 18px; border-radius: 6px; } .btn-small { - padding: 2px 10px; - font-size: 11.9px; - border-radius: 3px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; border-radius: 3px; } @@ -2177,6 +2043,7 @@ input[type="button"].btn-block { .glyphicon:before { font-family: 'Glyphicons Halflings'; + -webkit-font-smoothing: antialiased; font-style: normal; font-weight: normal; line-height: 1; @@ -2822,32 +2689,18 @@ input[type="button"].btn-block { content: "\e160"; } -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - .caret { display: inline-block; width: 0; height: 0; - vertical-align: top; + margin-left: 2px; + vertical-align: middle; border-top: 4px solid #000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; } -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - .dropdown-menu { position: absolute; top: 100%; @@ -2888,7 +2741,7 @@ input[type="button"].btn-block { padding: 3px 20px; clear: both; font-weight: normal; - line-height: 20px; + line-height: 1.428571429; color: #333333; white-space: nowrap; } @@ -2942,6 +2795,10 @@ input[type="button"].btn-block { display: block; } +.open > a { + outline: 0; +} + .pull-right > .dropdown-menu { right: 0; left: auto; @@ -3120,6 +2977,15 @@ a.list-group-item.active .list-group-item-text { border-top-left-radius: 3px; } +.panel-footer { + padding: 10px 15px; + margin: 15px -15px -15px; + background-color: #f5f5f5; + border-top: 1px solid #dddddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} + .panel-primary { border-color: #428bca; } @@ -3269,6 +3135,7 @@ button.close { } .nav > li { + position: relative; display: block; } @@ -3300,11 +3167,26 @@ button.close { margin-top: 9px; } +.nav.open > a, +.nav.open > a:hover, +.nav.open > a:focus { + color: #fff; + background-color: #428bca; + border-color: #428bca; +} + +.nav.open > a .caret, +.nav.open > a:hover .caret, +.nav.open > a:focus .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + .nav > .pull-right { float: right; } -.nav .divider { +.nav .nav-divider { height: 2px; margin: 9px 0; overflow: hidden; @@ -3323,7 +3205,7 @@ button.close { .nav-tabs > li > a { margin-right: 2px; - line-height: 20px; + line-height: 1.428571429; border: 1px solid transparent; border-radius: 4px 4px 0 0; } @@ -3411,9 +3293,9 @@ button.close { .nav-header { display: block; padding: 3px 15px; - font-size: 10.5px; + font-size: 11px; font-weight: bold; - line-height: 20px; + line-height: 1.428571429; color: #999999; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; @@ -3449,75 +3331,22 @@ button.close { display: block; } -/* -// Prevent IE8 from misplacing imgs -// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 -.nav > li > a > img { - max-width: none; +.nav .caret { + border-top-color: #428bca; + border-bottom-color: #428bca; } -// Dropdowns -// ------------------------- +.nav a:hover .caret { + border-top-color: #2a6496; + border-bottom-color: #2a6496; +} .nav-tabs .dropdown-menu { - // Remove the top rounded corners here since there is a hard edge above the menu - .border-top-radius(0); + margin-top: -1px; + border-top-right-radius: 0; + border-top-left-radius: 0; } -// Default dropdown links -// ------------------------- -// Make carets use linkColor to start -.nav .dropdown-toggle .caret { - border-top-color: @link-color; - border-bottom-color: @link-color; - margin-top: 8px; -} -.nav .dropdown-toggle:hover .caret { - border-top-color: @link-hover-color; - border-bottom-color: @link-hover-color; -} - -// Active dropdown links -// ------------------------- -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: @gray; - border-bottom-color: @gray; -} - -// Active:hover dropdown links -// ------------------------- -.nav > .dropdown.active > a:hover { - cursor: pointer; -} - -// Open dropdowns -// ------------------------- -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover { - color: #fff; - background-color: @gray-light; - border-color: @gray-light; -} -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret { - border-top-color: #fff; - border-bottom-color: #fff; - .opacity(1); -} - -// Dropdowns in stacked tabs -.tabs-stacked .open > a:hover { - border-color: @gray-light; -} - -*/ - .navbar { position: relative; padding-right: 15px; @@ -3548,7 +3377,8 @@ button.close { } .navbar-nav { - margin: 10px -15px 0; + margin-top: 10px; + margin-bottom: 15px; } .navbar-nav > li > a { @@ -3556,6 +3386,7 @@ button.close { padding-bottom: 15px; line-height: 20px; color: #777777; + border-radius: 4px; } .navbar-nav > li > a:hover, @@ -3606,7 +3437,7 @@ button.close { padding: 15px; margin-right: auto; margin-left: auto; - font-size: 17.5px; + font-size: 18px; font-weight: 500; line-height: 20px; color: #777777; @@ -3652,6 +3483,20 @@ button.close { margin-bottom: 8px; } +.navbar-form input, +.navbar-form select, +.navbar-form textarea, +.navbar-form .radio, +.navbar-form .checkbox { + display: inline-block; +} + +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 0; + margin-bottom: 0; +} + .navbar-nav > li > .dropdown-menu { margin-top: 0; border-top-right-radius: 0; @@ -3663,27 +3508,27 @@ button.close { border-bottom-left-radius: 0; } -.navbar-nav li.dropdown > a:hover .caret, -.navbar-nav li.dropdown > a:focus .caret { +.navbar-nav > .dropdown > a:hover .caret, +.navbar-nav > .dropdown > a:focus .caret { border-top-color: #333333; border-bottom-color: #333333; } -.navbar-nav li.dropdown.open > .dropdown-toggle, -.navbar-nav li.dropdown.active > .dropdown-toggle, -.navbar-nav li.dropdown.open.active > .dropdown-toggle { +.navbar-nav > .open > a, +.navbar-nav > .open > a:hover, +.navbar-nav > .open > a:focus { color: #555555; background-color: #d5d5d5; } -.navbar-nav li.dropdown > .dropdown-toggle .caret { +.navbar-nav > .dropdown > a .caret { border-top-color: #777777; border-bottom-color: #777777; } -.navbar-nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-nav li.dropdown.open.active > .dropdown-toggle .caret { +.navbar-nav > .open > a .caret, +.navbar-nav > .open > a:hover .caret, +.navbar-nav > .open > a:focus .caret { border-top-color: #555555; border-bottom-color: #555555; } @@ -3749,26 +3594,26 @@ button.close { background-color: #fff; } -.navbar-inverse .navbar-nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .navbar-nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .navbar-nav li.dropdown.open.active > .dropdown-toggle { +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { color: #ffffff; background-color: #080808; } -.navbar-inverse .navbar-nav li.dropdown > a:hover .caret { +.navbar-inverse .navbar-nav > .dropdown > a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } -.navbar-inverse .navbar-nav li.dropdown > .dropdown-toggle .caret { +.navbar-inverse .navbar-nav > .dropdown > a .caret { border-top-color: #999999; border-bottom-color: #999999; } -.navbar-inverse .navbar-nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .navbar-nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .navbar-nav li.dropdown.open.active > .dropdown-toggle .caret { +.navbar-inverse .navbar-nav > .open > a .caret, +.navbar-inverse .navbar-nav > .open > a:hover .caret, +.navbar-inverse .navbar-nav > .open > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } @@ -3782,10 +3627,14 @@ button.close { .navbar .nav { float: left; margin-top: 0; + margin-bottom: 0; } .navbar .nav > li { float: left; } + .navbar .nav > li > a { + border-radius: 0; + } .navbar .nav.pull-right { float: right; } @@ -3802,7 +3651,12 @@ button.close { } .navbar-btn { - margin-top: 8px; + margin-top: 7px; +} + +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; } .navbar-link { @@ -3829,24 +3683,28 @@ button.close { border-bottom-color: #ffffff; } -.btn-group { +.btn-group, +.btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } -.btn-group > .btn { +.btn-group > .btn, +.btn-group-vertical > .btn { position: relative; float: left; } -.btn-group > .btn + btn { - margin-left: -1px; +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active { + z-index: 2; } -.btn-group > .btn:hover, -.btn-group > .btn:active { - z-index: 2; +.btn-group .btn + .btn { + margin-left: -1px; } .btn-toolbar:before, @@ -3880,52 +3738,42 @@ button.close { margin-left: 5px; } -.btn-group > .btn { - position: relative; +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; } -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; } -.btn-group > .btn.large:first-child { - margin-left: 0; - border-bottom-left-radius: 6px; - border-top-left-radius: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } .btn-group > .btn-group { float: left; } -.btn-group > .btn-group > .btn { +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group > .btn-group:last-child > .btn { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; } -.btn-group > .btn-group:first-child > .btn { - margin-left: 0; - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; +.btn-group > .btn-group:last-child > .btn:first-child { + border-bottom-left-radius: 0; + border-top-left-radius: 0; } .btn-group .dropdown-toggle:active, @@ -3954,7 +3802,6 @@ button.close { } .btn .caret { - margin-top: 8px; margin-left: 0; } @@ -3973,26 +3820,22 @@ button.close { max-width: 100%; } -.btn-group-vertical .btn:first-child { +.btn-group-vertical > .btn + .btn { + margin-top: -1px; +} + +.btn-group-vertical .btn:not(:first-child):not(:last-child) { border-radius: 0; - border-top-right-radius: 4px; - border-top-left-radius: 4px; +} + +.btn-group-vertical .btn:first-child { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } .btn-group-vertical .btn:last-child { - border-radius: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -.btn-group-vertical .btn-large:first-child { - border-top-right-radius: 6px; - border-top-left-radius: 6px; -} - -.btn-group-vertical .btn-large:last-child { - border-bottom-right-radius: 6px; - border-bottom-left-radius: 6px; + border-top-right-radius: 0; + border-top-left-radius: 0; } .btn-group-justified { @@ -4053,7 +3896,7 @@ button.close { .pagination > li > span { float: left; padding: 4px 12px; - line-height: 20px; + line-height: 1.428571429; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; @@ -4097,8 +3940,8 @@ button.close { .pagination-large > li > a, .pagination-large > li > span { - padding: 11px 14px; - font-size: 17.5px; + padding: 14px 16px; + font-size: 18px; } .pagination-large > li:first-child > a, @@ -4113,34 +3956,24 @@ button.close { border-bottom-right-radius: 6px; } -.pagination-mini > li:first-child > a, +.pagination-small > li > a, +.pagination-small > li > span { + padding: 5px 10px; + font-size: 12px; +} + .pagination-small > li:first-child > a, -.pagination-mini > li:first-child > span, .pagination-small > li:first-child > span { border-bottom-left-radius: 3px; border-top-left-radius: 3px; } -.pagination-mini > li:last-child > a, .pagination-small > li:last-child > a, -.pagination-mini > li:last-child > span, .pagination-small > li:last-child > span { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } -.pagination-small > li > a, -.pagination-small > li > span { - padding: 2px 10px; - font-size: 11.9px; -} - -.pagination-mini > li > a, -.pagination-mini > li > span { - padding: 0 6px; - font-size: 10.5px; -} - .pager { margin: 20px 0; text-align: center; @@ -4279,7 +4112,7 @@ button.close { } .modal-header { - min-height: 35px; + min-height: 16.428571429px; padding: 15px; border-bottom: 1px solid #e5e5e5; } @@ -4290,7 +4123,7 @@ button.close { .modal-title { margin: 0; - line-height: 20px; + line-height: 1.428571429; } .modal-body { @@ -4357,7 +4190,7 @@ button.close { position: absolute; z-index: 1030; display: block; - font-size: 10.5px; + font-size: 11px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); @@ -4579,7 +4412,7 @@ button.close { } .alert { - padding: 8px 35px 8px 14px; + padding: 10px 35px 10px 15px; margin-bottom: 20px; color: #c09853; background-color: #fcf8e3; @@ -4655,8 +4488,8 @@ button.close { } .alert-block { - padding-top: 14px; - padding-bottom: 14px; + padding-top: 15px; + padding-bottom: 15px; } .alert-block > p, @@ -4671,7 +4504,7 @@ button.close { .thumbnail, .img-thumbnail { padding: 4px; - line-height: 20px; + line-height: 1.428571429; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 4px; @@ -4804,7 +4637,7 @@ a.thumbnail:focus { display: inline-block; min-width: 10px; padding: 3px 7px; - font-size: 11.9px; + font-size: 12px; font-weight: bold; line-height: 1; color: #fff; @@ -4904,7 +4737,7 @@ a.list-group-item.active > .badge, float: left; width: 0; height: 100%; - font-size: 11.9px; + font-size: 12px; color: #fff; text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); @@ -4915,9 +4748,6 @@ a.list-group-item.active > .badge, -moz-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; } .progress-striped .progress-bar { @@ -5201,7 +5031,7 @@ a.list-group-item.active > .badge, margin-bottom: 30px; font-size: 21px; font-weight: 200; - line-height: 30px; + line-height: 2.1428571435; color: inherit; background-color: #eeeeee; } @@ -5282,68 +5112,68 @@ a.list-group-item.active > .badge, visibility: hidden; } -.visible-phone { +.visible-sm { display: inherit !important; } -.visible-tablet { +.visible-md { display: none !important; } -.visible-desktop { +.visible-lg { display: none !important; } -.hidden-phone { +.hidden-sm { display: none !important; } -.hidden-tablet { +.hidden-md { display: inherit !important; } -.hidden-desktop { +.hidden-lg { display: inherit !important; } @media (min-width: 768px) and (max-width: 991px) { - .visible-phone { + .visible-sm { display: none !important; } - .visible-tablet { + .visible-md { display: inherit !important; } - .visible-desktop { + .visible-lg { display: none !important; } - .hidden-phone { + .hidden-sm { display: inherit !important; } - .hidden-tablet { + .hidden-md { display: none !important; } - .hidden-desktop { + .hidden-lg { display: inherit !important; } } @media (min-width: 992px) { - .visible-phone { + .visible-sm { display: none !important; } - .visible-tablet { + .visible-md { display: none !important; } - .visible-desktop { + .visible-lg { display: inherit !important; } - .hidden-phone { + .hidden-sm { display: inherit !important; } - .hidden-tablet { + .hidden-md { display: inherit !important; } - .hidden-desktop { + .hidden-lg { display: none !important; } } diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index aca8df2136..3cc4d97ecc 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -10,94 +10,60 @@ body { position: relative; /* For scrollyspy */ - /* We add the padding to the body for >768px only */ -} - -hr { - margin-top: 30px; - margin-bottom: 30px; -} - -.bs-docs-dl-options h4 { - margin-top: 15px; - margin-bottom: 5px; -} - -.bs-docs-container, -.bs-home-container { - padding-left: 15px; - padding-right: 15px; -} -.bs-docs-container { - max-width: 860px; -} -.bs-docs-container .row { - margin-left: -15px; - margin-right: -15px; -} - -/* Side notes for calling out things */ -.bs-docs-sidenote { - margin: 20px 0; - padding: 15px 30px 15px 15px; - background-color: #fcf2f2; - border-left: 5px solid #df7c7b; -} -.bs-docs-sidenote h4 { - margin-top: 0; -} -.bs-docs-sidenote p:last-child { - margin-bottom: 0; -} -.bs-docs-sidenote code, -.bs-docs-sidenote .highlight { - background-color: #fff; + padding-top: 50px; /* Account for fixed navbar */ } -/* Sections + +/* Top nav and header -------------------------------------------------- */ -/* Padding for in-page bookmarks */ -section, -.bs-docs-section { - padding-top: 30px; +.bs-docs-nav { + background-color: #b94a48; } - -/* Few stylistic typography tweaks */ -section > .page-header, -section > .lead { - color: #5a5a5a; +.bs-docs-nav .navbar-brand { + color: #fff; } -section > ul li { - margin-bottom: 5px; +.bs-docs-nav .navbar-nav > li > a { + color: #dfc9c8; +} +.bs-docs-nav .navbar-nav > li > a:hover { + color: #fff; +} +.bs-docs-nav .navbar-nav > .active > a, +.bs-docs-nav .navbar-nav > .active > a:hover { + color: #fff; + background-color: #993c3a; +} +.bs-docs-nav .navbar-toggle { + border-color: #b94a48; +} +.bs-docs-nav .navbar-toggle:hover { + background-color: #993c3a; + border-color: #993c3a; } -/* Jumbotrons +/* Homepage masthead -------------------------------------------------- */ -.bs-docs-section-header { - padding-top: 60px; - color: #b94a48; - border-bottom: 5px solid #b94a48; -} - -/* Base class */ -.bs-docs-jumbotron { +.bs-masthead { position: relative; margin-bottom: 20px; padding: 30px 15px; text-align: center; } -.bs-docs-jumbotron h1 { +.bs-masthead h1 { font-size: 50px; line-height: 1; } +.bs-masthead .bs-social { + margin-top: 80px; +} /* Download button */ -.bs-docs-jumbotron .btn { +.bs-masthead .btn { margin-top: 5px; margin-bottom: 5px; padding: 18px 24px; @@ -106,28 +72,132 @@ section > ul li { background-color: #fff; border-color: #e5e5e5; } -.bs-docs-jumbotron .btn:hover, -.bs-docs-jumbotron .btn:active { +.bs-masthead .btn:hover, +.bs-masthead .btn:active { color: #fff; /* redeclare to override the `.jumbotron a` */ background-color: #b94a48; border-color: #b94a48; } -/* Textual links in masthead */ -.masthead-links { +/* Textual links */ +.bs-masthead-links { margin: 20px 0; list-style: none; } -.masthead-links li { +.bs-masthead-links li { display: inline; color: #999; } -.masthead-links li + li { +.bs-masthead-links li + li { margin-left: 20px; } +/* Docs pages and sections +-------------------------------------------------- */ + +/* Page headers */ +.bs-header { + padding: 30px 30px 40px; + font-size: 16px; + color: #5a5a5a; + text-align: center; + border-bottom: 1px solid #ddd; +} +.bs-header h1 { + color: #b94a48; +} +.bs-header p { + font-weight: 300; + line-height: 1.5; +} + +/* Padding for in-page bookmarks */ +.bs-docs-section { + padding-top: 30px; +} + + + +/* Docs sidebar +-------------------------------------------------- */ + +/* By default it's not affixed in mobile views, so undo that */ +.bs-sidebar.affix { + position: static; +} + +/* First level of nav */ +.bs-sidenav { + margin-top: 30px; + margin-bottom: 30px; + padding-top: 15px; + padding-bottom: 15px; + text-shadow: 0 1px 0 #fff; + background-color: #f5f5f5; + border-radius: 5px; +} + +/* All levels of nav */ +.bs-sidebar .nav > li > a { + display: block; + color: #666; + padding: 4px 20px; +} +.bs-sidebar .nav > li > a:hover, +.bs-sidebar .nav > li > a:focus { + text-decoration: none; + border-right: 1px solid #d5d5d5; +} +.bs-sidebar .nav > .active > a, +.bs-sidebar .nav > .active:hover > a, +.bs-sidebar .nav > .active:focus > a { + font-weight: 500; + color: #b94a48; + background-color: transparent; + border-right: 1px solid #b94a48; +} + +/* Nav: second level (shown on .active) */ +.bs-sidebar .nav .nav { + display: none; + margin-bottom: 5px; +} +.bs-sidebar .nav > .active > ul { + display: block; +} +.bs-sidebar .nav .nav > li > a { + padding-top: 2px; + padding-bottom: 2px; + padding-left: 30px; + font-size: 90%; +} + + + +/* Side notes for calling out things +-------------------------------------------------- */ + +.bs-callout { + margin: 20px 0; + padding: 15px 30px 15px 15px; + background-color: #fcf2f2; + border-left: 5px solid #df7c7b; +} +.bs-callout h4 { + margin-top: 0; +} +.bs-callout p:last-child { + margin-bottom: 0; +} +.bs-callout code, +.bs-callout .highlight { + background-color: #fff; +} + + + /* Special grid styles -------------------------------------------------- */ @@ -146,96 +216,11 @@ section > ul li { -/* Sidenav --------------------------------------------------- */ - -.bs-docs-sidebar { - display: none; - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 240px; - overflow-y: scroll; - text-shadow: 0 1px 0 #fff; - background-color: #f5f5f5; - box-shadow: inset -1px 0 0 #e5e5e5; -} - -/* Nav: first level */ -.bs-docs-sidebar > .nav { - margin: 0 0 25px 0; -} -.bs-docs-sidebar .nav > li > a { - display: block; - color: #666; - padding: 4px 25px; -} -.bs-docs-sidebar .nav > li > a:hover, -.bs-docs-sidebar .nav > li > a:focus { - text-decoration: none; - border-right: 1px solid #d5d5d5; -} -.bs-docs-sidebar .nav > .active > a, -.bs-docs-sidebar .nav > .active:hover > a, -.bs-docs-sidebar .nav > .active:focus > a { - font-weight: 500; - color: #b94a48; - background-color: transparent; - border-right: 1px solid #b94a48; -} - -/* Nav: second level (shown on .active) */ -.bs-docs-sidebar .nav .nav { - display: none; - margin-bottom: 5px; -} -.bs-docs-sidebar .nav > .active > ul { - display: block; -} -.bs-docs-sidebar .nav .nav > li > a { - padding-top: 2px; - padding-bottom: 2px; - padding-left: 40px; - font-size: 90%; -} - -.bs-docs-sidenav-heading { - margin: 0 0 25px; -} -.bs-docs-sidenav-heading a { - display: block; - padding: 15px 25px; - color: #b94a48; - border-bottom: 1px solid #e5e5e5; - box-shadow: 0 1px 0 #fff; -} -.bs-docs-sidenav-heading a:hover { - color: #a3403e; - text-decoration: none; -} - -/* Section headings for groups of links */ -.bs-docs-sidenav > li > .nav-header { - margin-top: 20px; - margin-bottom: 5px; - font-size: 14px; - font-weight: 500; - color: #333; -} -.bs-docs-sidenav > .active > .nav-header, -.bs-docs-sidenav > .active > .nav-header:hover { - color: #333; - border-color: #333; -} - - - /* Bootstrap code examples -------------------------------------------------- */ /* Base class */ -.bs-docs-example { +.bs-example { position: relative; padding: 39px 14px 14px; margin-bottom: -1px; @@ -244,7 +229,7 @@ section > ul li { border-top-right-radius: 4px; } /* Echo out a label for the example */ -.bs-docs-example:after { +.bs-example:after { content: "Example"; position: absolute; top: -1px; @@ -260,56 +245,70 @@ section > ul li { } /* Tweak display of the examples */ -.bs-docs-example + .prettyprint, -.bs-docs-example + .highlight { +.bs-example + .prettyprint, +.bs-example + .highlight { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; } /* Tweak content of examples for optimum awesome */ -.bs-docs-example > p:last-child, -.bs-docs-example > ul:last-child, -.bs-docs-example > ol:last-child, -.bs-docs-example > blockquote:last-child, -.bs-docs-example > input:last-child, -.bs-docs-example > select:last-child, -.bs-docs-example > textarea:last-child, -.bs-docs-example > .table:last-child, -.bs-docs-example > .jumbotron:last-child, -.bs-docs-example > .alert:last-child, -.bs-docs-example > .panel:last-child, -.bs-docs-example > .list-group:last-child, -.bs-docs-example > .well:last-child { +.bs-example > p:last-child, +.bs-example > ul:last-child, +.bs-example > ol:last-child, +.bs-example > blockquote:last-child, +.bs-example > input:last-child, +.bs-example > select:last-child, +.bs-example > textarea:last-child, +.bs-example > .table:last-child, +.bs-example > .navbar:last-child +.bs-example > .jumbotron:last-child, +.bs-example > .alert:last-child, +.bs-example > .panel:last-child, +.bs-example > .list-group:last-child, +.bs-example > .well:last-child { margin-bottom: 0; } +.bs-example > .close { + float: none; +} /* Typography */ -.bs-docs-example-type .table td { +.bs-example-type .table td { color: #999; vertical-align: middle; border-color: ; } -.bs-docs-example-type .table td, -.bs-docs-example-type .table th { +.bs-example-type .table td, +.bs-example-type .table th { padding: 15px 0; border-color: #eee; } -.bs-docs-example-type .table tr:first-child td, -.bs-docs-example-type .table tr:first-child th { +.bs-example-type .table tr:first-child td, +.bs-example-type .table tr:first-child th { border-top: 0; } -.bs-docs-example-type h1, -.bs-docs-example-type h2, -.bs-docs-example-type h3, -.bs-docs-example-type h4, -.bs-docs-example-type h5, -.bs-docs-example-type h6 { +.bs-example-type h1, +.bs-example-type h2, +.bs-example-type h3, +.bs-example-type h4, +.bs-example-type h5, +.bs-example-type h6 { margin: 0; } +/* Forms */ +.bs-example.form-inline select, +.bs-example.form-inline input[type="text"], +.bs-example.form-inline input[type="password"] { + width: 180px; +} +.bs-example-control-sizing input[type="text"] + input[type="text"] { + margin-top: 10px; +} + /* List groups */ -.bs-docs-example > .list-group { +.bs-example > .list-group { max-width: 400px; } @@ -355,10 +354,10 @@ section > ul li { } /* Example modals */ -.bs-docs-example-modal { +.bs-example-modal { background-color: #f5f5f5; } -.bs-docs-example-modal .modal { +.bs-example-modal .modal { position: relative; top: auto; right: auto; @@ -367,49 +366,49 @@ section > ul li { z-index: 1; display: block; } -.bs-docs-example-modal .modal-dialog { +.bs-example-modal .modal-dialog { left: auto; margin-left: auto; margin-right: auto; } /* Example dropdowns */ -.bs-docs-example > .dropdown > .dropdown-menu, -.bs-docs-example-submenu > .pull-left > .dropup > .dropdown-menu, -.bs-docs-example-submenu > .pull-left > .dropdown > .dropdown-menu { +.bs-example > .dropdown > .dropdown-menu, +.bs-example-submenu > .pull-left > .dropup > .dropdown-menu, +.bs-example-submenu > .pull-left > .dropdown > .dropdown-menu { position: static; display: block; margin-bottom: 5px; } -.bs-docs-example-submenu { +.bs-example-submenu { min-height: 230px; } -.bs-docs-example-submenu > .pull-left + .pull-left { +.bs-example-submenu > .pull-left + .pull-left { margin-left: 20px; } /* Example tabbable tabs */ -.bs-docs-example-tabs .nav-tabs { +.bs-example-tabs .nav-tabs { margin-bottom: 15px; } /* Tooltips */ -.bs-docs-tooltip-examples { +.bs-example-tooltips { text-align: center; margin: 0 0 10px; list-style: none; } -.bs-docs-tooltip-examples li { +.bs-example-tooltips li { display: inline; padding: 0 10px; } /* Popovers */ -.bs-docs-example-popover { +.bs-example-popover { padding-bottom: 24px; background-color: #f9f9f9; } -.bs-docs-example-popover .popover { +.bs-example-popover .popover { position: relative; display: block; float: left; @@ -418,13 +417,14 @@ section > ul li { } + /* Example templates -------------------------------------------------- */ -.bs-docs-examples h4 { +.bs-examples h4 { margin-bottom: 5px; } -.bs-docs-examples p { +.bs-examples p { margin-bottom: 20px; } @@ -545,13 +545,14 @@ section > ul li { /* Footer -------------------------------------------------- */ -.bs-docs-footer { - padding-top: 30px; +.bs-footer { + padding-top: 40px; padding-bottom: 30px; margin-top: 100px; + text-align: center; border-top: 1px solid #e5e5e5; } -.bs-docs-footer p { +.bs-footer p { margin-bottom: 0; color: #777; } @@ -567,27 +568,25 @@ section > ul li { } /* Social proof buttons from GitHub & Twitter */ -.bs-docs-social { - margin-top: 80px; +.bs-social { margin-bottom: 20px; } -/* Quick links on Home */ -.bs-docs-social-buttons { +.bs-social-buttons { display: inline-block; margin: 0; list-style: none; } -.bs-docs-social-buttons li { +.bs-social-buttons li { display: inline-block; line-height: 1; } -.bs-docs-social-buttons li + li { +.bs-social-buttons li + li { margin-left: 15px; } -.bs-docs-social-buttons .twitter-follow-button { +.bs-social-buttons .twitter-follow-button { width: 225px !important; } -.bs-docs-social-buttons .twitter-share-button { +.bs-social-buttons .twitter-share-button { width: 98px !important; } @@ -622,6 +621,7 @@ input.focused { } .highlight pre { padding: 0; + margin-top: 0; margin-bottom: 0; background-color: transparent; border: 0; @@ -640,23 +640,20 @@ input.focused { color: #bebec5; } - - -/* Docs gallery --------------------------------------------------- */ - -.bs-docs-gallery .thumbnail { - max-width: 400px; - margin: 0 auto 20px; +/* Better spacing on download options in getting started */ +.bs-docs-dl-options h4 { + margin-top: 15px; + margin-bottom: 5px; } + /* Responsive variations -------------------------------------------------- */ /* Hide code snippets on mobile devices */ @media screen and (max-width: 480px) { - .bs-docs-example { + .bs-example { border-radius: 4px; } .highlight { @@ -667,8 +664,15 @@ input.focused { /* Tablets and up */ @media screen and (min-width: 768px) { + /* Reaffix the fixed sidebar */ + .bs-sidebar.affix { + position: fixed; /* Undo the static from mobile-first approach */ + top: 50px; + width: 160px; + } + /* Back to top link */ - .bs-docs-top { + .bs-top { float: left; padding: 7px 15px; font-weight: 500; @@ -676,57 +680,44 @@ input.focused { background-color: #eee; border-radius: 4px; } - .bs-docs-top:hover { + .bs-top:hover { color: #fff; text-decoration: none; background-color: #999; } - .bs-docs-top.affix { + .bs-top.affix { position: fixed; right: 15px; bottom: 15px; } - .bs-docs-section-header h1 { - font-size: 80px; - font-size: 8rem; + .bs-header { + font-size: 21px; + text-align: left; + } + .bs-header h1 { + font-size: 60px; line-height: 1; } - /* Account for fixed navbar (which is static to start) */ - .bs-docs-docs { - padding-left: 260px; - } - - /* Undo custom padding */ - .bs-docs-container { - padding-left: 0; - padding-right: 0; - } - /* Show the docs nav */ - .bs-docs-sidebar { + .bs-sidebar { display: block; } /* Tweak display of docs jumbotrons */ - .masthead { + .bs-masthead { padding-top: 100px; padding-bottom: 100px; } - .masthead h1 { + .bs-masthead h1 { font-size: 100px; } - .masthead p { + .bs-masthead p { margin-left: 15%; margin-right: 15%; font-size: 30px; } - .subhead { - padding-top: 60px; - padding-bottom: 60px; - text-align: left; - } .bs-navbar-top-example .navbar-fixed-top, .bs-navbar-bottom-example .navbar-fixed-bottom { @@ -738,8 +729,9 @@ input.focused { /* Tablets/desktops and up */ @media screen and (min-width: 992px) { - .bs-docs-docs { - padding-left: 280px; + /* Widen the fixed sidebar */ + .bs-sidebar.affix { + width: 213px; } /* Icons */ @@ -751,8 +743,10 @@ input.focused { /* Large desktops and up */ @media screen and (min-width: 1200px) { - .bs-docs-docs { - padding-left: 300px; + + /* Widen the fixed sidebar again */ + .bs-sidebar.affix { + width: 270px; } } diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 170a1953de..9467ea84c8 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -14,17 +14,17 @@ }) // back to top - // setTimeout(function () { - // $('.bs-docs-sidenav').affix({ - // offset: { - // top: function () { return $window.width() <= 980 ? 290 : 210 } - // , bottom: 270 - // } - // }) - // }, 100) + setTimeout(function () { + $('.bs-sidebar').affix({ + offset: { + top: function () { return $window.width() <= 980 ? 290 : 210 } + , bottom: 270 + } + }) + }, 100) setTimeout(function () { - $('.bs-docs-top').affix() + $('.bs-top').affix() }, 100) // make code pretty diff --git a/docs/components.html b/docs/components.html new file mode 100644 index 0000000000..ea87a7e22d --- /dev/null +++ b/docs/components.html @@ -0,0 +1,2508 @@ +--- +layout: default +title: Components +slug: components +lead: "Dozens of reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more." +--- + + + +
    + + +

    Included glyphs

    +

    Bootstrap comes with all 160 of Glyphicons Halflings set, all available in font formats for easy coloring, sizing, and placement.

    + + + +

    Glyphicons attribution

    +

    Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.

    + + +

    How to use

    +

    Add the appropriate class to any inline element. All icon classes are prefixed with glyphicon- for easy styling. To use, place the following code just about anywhere:

    +{% highlight html %} + +{% endhighlight %} +

    Want to change the icon color? Just change the color of the parent element.

    +

    When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.

    + + +

    Icon examples

    +

    Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

    + +

    Buttons

    + +
    Button group in a button toolbar
    +
    +
    +
    + + + + +
    +
    +
    +{% highlight html %} +
    +
    + + + + +
    +
    +{% endhighlight %} + +
    +

    Accessibility

    +

    Keep in mind that using icons without any additional content means the icons are not represented to screen reader users.

    +
    + +
    Dropdown in a button group
    +
    +
    + User + + +
    +
    +{% highlight html %} +
    + User + + +
    +{% endhighlight %} + +
    Large button
    +
    + Star +
    +{% highlight html %} + Star +{% endhighlight %} + +
    Small button
    +
    + +
    +{% highlight html %} + +{% endhighlight %} + + +

    Navigation

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Form fields

    +
    +
    + +
    +
    + + +
    +
    +
    +
    +{% highlight html %} +
    + +
    +
    + + +
    +
    +
    +{% endhighlight %} + +
    + + + + + + + + + +
    + +

    Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.

    + +

    Basic button group

    +

    Wrap a series of buttons with .btn in .btn-group.

    +
    +
    + + + +
    +
    +{% highlight html %} +
    + + + +
    +{% endhighlight %} + +

    Multiple button groups

    +

    Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.

    +
    +
    +
    + + + + +
    +
    + + + +
    +
    + +
    +
    +
    +{% highlight html %} +
    +
    ...
    +
    ...
    +
    ...
    +
    +{% endhighlight %} + +

    Nested button groups

    +

    Place buttons groups within button groups when you want dropdown menus mixed with a series of buttons.

    +
    +
    + + + + +
    + + +
    +
    +
    + +

    Vertical button groups

    +

    Make a set of buttons appear vertically stacked rather than horizontally.

    +
    +
    + + + + +
    +
    +{% highlight html %} +
    + ... +
    +{% endhighlight %} + +

    Justified button groups

    +

    Make a group of buttons stretch at the same size to span the entire width of its parent. This only works with <a> elements as the <button> doesn't pick up these styles.

    +
    +
    + Left + Right + Middle +
    +
    +{% highlight html %} +
    + ... +
    +{% endhighlight %} + +
    + + + + +
    + +

    Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.

    + +
    +

    Plugin dependency

    +

    Button dropdowns require the dropdown plugin to be included in your version of Bootstrap.

    +
    + +

    Single button dropdowns

    +

    Turn a button into dropdown toggle with some basic markup changes.

    +
    + +
    +{% highlight html %} + +
    + + +
    +{% endhighlight %} + +

    Split button dropdowns

    +

    Similarly, create split button dropdowns with the same markup changes, only with a separate button.

    +
    + +
    +{% highlight html %} + +
    + + + +
    +{% endhighlight %} + +

    Works with all button sizes

    +

    Button dropdowns work with buttons of all sizes.

    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +{% highlight html %} + +
    + + +
    + + +
    + + +
    +
    +{% endhighlight %} + +

    Dropup buttons

    +

    Trigger dropdown menus above elements by adding .dropup to the parent.

    +
    +
    + +
    + + + +
    +
    +
    +{% highlight html %} +
    + + + +
    +{% endhighlight %} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    + +

    Example

    +
    +

    Example heading New

    +

    Example heading New

    +

    Example heading New

    +

    Example heading New

    +
    Example heading New
    +
    Example heading New
    +
    +{% highlight html %} +

    Example heading New

    +{% endhighlight %} + +

    Available variations

    +

    Add any of the below mentioned modifier classes to change the appearance of a label.

    +
    + Default + Success + Warning + Danger + Info +
    +{% highlight html %} +Default +Success +Warning +Danger +Info +{% endhighlight %} + +
    + + + + +
    + +

    Easily highlight new or unread items by adding a <span class="badge"> to links, Bootstrap navs, and more.

    + +
    + Inbox 42 +
    +{% highlight html %} +Inbox 42 +{% endhighlight %} + +

    Self collapsing

    +

    When there are no new or unread items, badges will simply collapse (via CSS's :empty selector) provided no content exists within.

    + +
    +

    Cross-browser compatibility

    +

    Badges won't self collapse in Internet Explorer 8 because it lacks support for the :empty selector.

    +
    + +

    Adapts to active nav states

    +

    Built-in styles are included for placing badges in active states in pill and list navigations.

    +
    + +
    + +
    +{% highlight html %} + +{% endhighlight %} +
    + + + + +
    + + +

    Jumbotron

    +

    A lightweight, flexible component to showcase key content on your site. It works well on marketing and content-heavy sites.

    +
    +
    +

    Hello, world!

    +

    This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

    +

    Learn more

    +
    +
    +{% highlight html %} +
    +

    Hello, world!

    +

    ...

    +

    Learn more

    +
    +{% endhighlight %} + +

    Page header

    +

    A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small element, as well as most other components (with additional styles).

    +
    + +
    +{% highlight html %} + +{% endhighlight %} +
    + + + + +
    + +

    Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.

    + +

    Default thumbnails

    +

    By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    +{% highlight html %} +
    +
    + + + +
    + ... +
    +{% endhighlight %} + +

    Custom content thumbnails

    +

    With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

    +
    +
    +
    +
    + +
    +

    Thumbnail label

    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    Action Action

    +
    +
    +
    +
    +
    + +
    +

    Thumbnail label

    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    Action Action

    +
    +
    +
    +
    +
    + +
    +

    Thumbnail label

    +

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    +

    Action Action

    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    + +
    +

    Thumbnail label

    +

    ...

    +

    Action Action

    +
    +
    +
    +
    +{% endhighlight %} +
    + + + + + +
    + +

    Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.

    + +

    Default alert

    +

    Wrap any text and an optional dismiss button in .alert for a basic warning alert message. To ensure proper behavior across all devices, be sure to use <button> element with the data-dismiss="alert" data attribute.

    +
    +
    + + Warning! Best check yo self, you're not looking too good. +
    +
    +{% highlight html %} +
    + + Warning! Best check yo self, you're not looking too good. +
    +{% endhighlight %} + +

    Block alerts

    +

    For longer messages, increase the padding on the top and bottom of the alert wrapper by adding .alert-block.

    +
    +
    + +

    Warning!

    +

    Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

    +
    +
    +{% highlight html %} +
    + +

    Warning!

    +

    ...

    +
    +{% endhighlight %} + +

    Contextual alternatives

    +

    Add optional classes to change an alert's connotation.

    +
    +
    + + Oh snap! Change a few things up and try submitting again. +
    +
    + + Well done! You successfully read this important alert message. +
    +
    + + Heads up! This alert needs your attention, but it's not super important. +
    +
    +{% highlight html %} +
    ...
    +
    ...
    +
    ...
    +{% endhighlight %} +
    + + + + + +
    + +

    Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

    + +
    +

    Cross-browser compatibility

    +

    Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.

    +
    + +

    Basic

    +

    Default progress bar with a vertical gradient.

    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    +{% endhighlight %} + +

    Contextual alternatives

    +

    Progress bars use some of the same button and alert classes for consistent styles.

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% endhighlight %} + +

    Striped

    +

    Uses a gradient to create a striped effect. Not available in IE8.

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% endhighlight %} + +

    Animated

    +

    Add .active to .progress-striped to animate the stripes right to left. Not available in all versions of IE.

    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    +{% endhighlight %} + +

    Stacked

    +

    Place multiple bars into the same .progress to stack them.

    +
    +
    +
    +
    +
    +
    +
    +{% highlight html %} +
    +
    +
    +
    +
    +{% endhighlight %} +
    + + + + + +
    + +

    Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.

    + +

    Default example

    +

    The default media allow to float a media object (images, video, audio) to the left or right of a content block.

    +
    +
    + + + +
    +

    Media heading

    + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +
    +
    +
    + + + +
    +

    Media heading

    + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +
    + + + +
    +

    Media heading

    + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +
    +
    +
    +
    +
    +{% highlight html %} +
    + + + +
    +

    Media heading

    + ... +
    +
    +{% endhighlight %} + +

    Media list

    +

    With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).

    +
    + +
    +{% highlight html %} + +{% endhighlight %} +
    + + + + + + +
    + +

    List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.

    + +

    Basic list group

    +

    The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    With chevrons

    +

    Add Glyphicon chevrons that are automatically moved to the right.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    With badges

    +

    Add the badges component to any list group item and it will automatically be positioned on the right.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    With badges and chevrons

    +

    Why not both?

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Linked list group

    +

    Linkify list group items by using anchor tags instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element.

    +
    + +
    +{% highlight html %} +
    + + Cras justo odio + + + Dapibus ac facilisis in + + + Morbi leo risus + + + Porta ac consectetur ac + + + Vestibulum at eros + + +
    +{% endhighlight %} + +

    Custom content

    +

    Add nearly any HTML within, even for linked list groups like the one below.

    +
    + +
    +{% highlight html %} +
    + +

    List group item heading

    +

    ...

    +
    +
    +{% endhighlight %} +
    + + + + + +
    + +

    While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.

    + +

    Basic panel

    +

    By default, all the .panel does is apply some basic border and padding to contain some content.

    +
    +
    + Basic panel example +
    +
    +{% highlight html %} +
    + Basic panel example +
    +{% endhighlight %} + +

    Panel with heading

    +

    Easily add a heading to your panel with .panel-heading. Use it on a <div> or any heading element (e.g., <h3>).

    +
    +
    +
    Panel heading
    + Panel content +
    +
    +{% highlight html %} +
    +
    Panel heading
    + Panel content +
    +{% endhighlight %} + + +

    Wrap buttons or secondary text in .panel-footer.

    +
    +
    + Panel content + +
    +
    +{% highlight html %} +
    + Panel content + +
    +{% endhighlight %} + +

    Contextual alternatives

    +

    Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.

    +
    +
    +
    Panel heading
    + Panel content +
    +
    +
    Panel heading
    + Panel content +
    +
    +
    Panel heading
    + Panel content +
    +
    +
    Panel heading
    + Panel content +
    +
    +
    Panel heading
    + Panel content +
    +
    +{% highlight html %} +
    ...
    +
    ...
    +
    ...
    +
    ...
    +
    ...
    +{% endhighlight %} + +

    With list groups

    +

    Easily include full-width list groups within any panel.

    +
    +
    + +
    Panel heading
    +

    Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.

    + + +
      +
    • Cras justo odio
    • +
    • Dapibus ac facilisis in
    • +
    • Morbi leo risus
    • +
    • Porta ac consectetur ac
    • +
    • Vestibulum at eros
    • +
    +
    +
    +{% highlight html %} +
    + +
    Panel heading
    +

    ...

    + + + +
    +{% endhighlight %} + +
    + + + + + + +
    + + +

    Default well

    +

    Use the well as a simple effect on an element to give it an inset effect.

    +
    +
    + Look, I'm in a well! +
    +
    +{% highlight html %} +
    ...
    +{% endhighlight %} +

    Optional classes

    +

    Control padding and rounded corners with two optional modifier classes.

    +
    +
    + Look, I'm in a well! +
    +
    +{% highlight html %} +
    ...
    +{% endhighlight %} + +
    +
    + Look, I'm in a well! +
    +
    +{% highlight html %} +
    ...
    +{% endhighlight %} +
    diff --git a/docs/css.html b/docs/css.html new file mode 100644 index 0000000000..36b5208e6e --- /dev/null +++ b/docs/css.html @@ -0,0 +1,2034 @@ +--- +layout: default +title: CSS +slug: css +lead: "Fundamental HTML elements styled and enhanced with extensible classes." +--- + + + +
    + +

    Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

    + +

    HTML5 doctype required

    +

    Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

    +{% highlight html %} + + + ... + +{% endhighlight %} + +

    Mobile first

    +

    With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

    +

    To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

    +{% highlight html %} + +{% endhighlight %} + +

    Responsive images

    +

    We automatically attempt to scale images to appropriate sizes with a global max-width: 100%; on all <img> elements. If you run into problems (e.g., with Google Maps), be sure to disable this property on a per-case basis.

    + + +

    Bootstrap sets basic global display, typography, and link styles. Specifically, we:

    + +

    These styles can be found within scaffolding.less.

    + +

    Normalize reset

    +

    For improved cross-browser rendering, we use Normalize, a project by Nicolas Gallagher and Jonathan Neal.

    + +

    Centering with container

    +

    Easily center a page's contents by wrapping its contents in a container. Containers set `max-width` at various media query breakpoints to match our grid system.

    +{% highlight html %} +
    + ... +
    +{% endhighlight %} +
    + + + + +
    + +

    Bootstrap includes a responsive, percent-based grid system that appropriately scales up to 12 columns as the device or viewport size increases—in other words, it's mobile first. It includes predefined classes for this, as well as powerful mixins for generating semantic layouts.

    + +

    Grid example

    +

    On mobile devices, the grid starts out stacked. Above 768px, it becomes horizontal as media queries kick in to apply floats and widths. To create a basic grid layout, wrap a series of .col-lg-* elements within a .row. As this is a 12-column grid, each .col-lg-* spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent), even at mobile resolutions.

    +
    +
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    +
    +
    4
    +
    4
    +
    4
    +
    +
    +
    6
    +
    6
    +
    +
    +{% highlight html %} +
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    1
    +
    +
    +
    4
    +
    4
    +
    4
    +
    +
    +
    6
    +
    6
    +
    +{% endhighlight %} + +

    Offsetting columns

    +

    Move columns to the right using .col-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-offset-4 moves .col col-lg-4 over four columns.

    +
    +
    +
    4
    +
    4 offset 4
    +
    +
    +
    3 offset 3
    +
    3 offset 3
    +
    +
    +
    6 offset 3
    +
    +
    +{% highlight html %} +
    +
    ...
    +
    ...
    +
    +
    +
    3 offset 3
    +
    3 offset 3
    +
    +
    +
    ...
    +
    +{% endhighlight %} + + +

    Nesting columns

    +

    To nest your content with the default grid, add a new .row and set of .col-lg-* columns within an existing .col-lg-* column. Nested rows should include a set of columns that add up to 12.

    +
    +
    + Level 1: 9 columns +
    +
    + Level 2: 6 columns +
    +
    + Level 2: 6 columns +
    +
    +
    +
    +{% highlight html %} +
    +
    + Level 1: 9 columns +
    +
    + Level 2: 6 columns +
    +
    + Level 2: 6 columns +
    +
    +
    +
    +{% endhighlight %} + +

    Column ordering

    +

    Easily change the order of our built-in grid columns with .col-push-* and .col-pull-* modifier classes.

    +
    +
    9
    +
    3
    +
    + +{% highlight html %} +
    +
    9
    +
    3
    +
    +{% endhighlight %} + +

    Small device grid

    +

    Use the small device grid classes, like .col-sm-6, to create columned layouts on phone and tablet devices (anything under 768px). Offsets, pushes, and pulls are not available with the small grid at this time.

    +
    +
    4 cols, 6 small cols
    +
    4 cols, 6 small cols
    +
    4 cols, 12 small cols
    +
    +{% highlight html %} +
    +
    4 cols, 6 small cols
    +
    4 cols, 6 small cols
    +
    4 cols, 12 small cols
    +
    +{% endhighlight %} + +

    LESS mixins and variables

    +

    In addition to prebuilt grid classes for fast layouts, Bootstrap includes LESS variables and mixins for quickly generating your own simple, semantic layouts.

    + +

    Variables

    +

    Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.

    +{% highlight css %} +@grid-columns: 12; +@grid-gutter-width: 30px; +@grid-float-breakpoint: 768px; +{% endhighlight %} + +

    Mixins

    +

    Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.

    +{% highlight css %} +// Creates a wrapper for a series of columns +.make-row() { + // Negative margin the row out to align the content of columns + margin-left: (@grid-gutter-width / -2); + margin-right: (@grid-gutter-width / -2); + // Then clear the floated columns + .clearfix(); +} + +// Generate the columns +.make-column(@columns) { + @media (min-width: @grid-float-breakpoint) { + float: left; + // Calculate width based on number of columns available + width: percentage(@columns / @grid-columns); + } + // Prevent columns from collapsing when empty + min-height: 1px; + // Set inner padding as gutters instead of margin + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); +} + +// Generate the column offsets +.make-column-offset(@columns) { + @media (min-width: @grid-float-breakpoint) { + margin-left: percentage((@columns / @grid-columns)); + } +} +{% endhighlight %} + +

    Example usage

    +

    You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.

    +{% highlight css %} +.wrapper { + .make-row(); +} +.content-main { + .make-column(8); +} +.content-secondary { + .make-column(3); + .make-column-offset(1); +} +{% endhighlight %} +{% highlight html %} +
    +
    ...
    +
    ...
    +
    +{% endhighlight %} + +
    + + + + + +
    + + + +

    Headings

    +

    All HTML headings, <h1> through <h6> are available.

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Bootstrap heading

    Semibold 38px

    Bootstrap heading

    Semibold 32px

    Bootstrap heading

    Semibold 24px

    Bootstrap heading

    Semibold 18px
    Bootstrap heading
    Semibold 16px
    Bootstrap heading
    Semibold 12px
    +
    +{% highlight html %} +

    ...

    +

    ...

    +

    ...

    +

    ...

    +
    ...
    +
    ...
    +{% endhighlight %} + + +

    Body copy

    +

    Bootstrap's global default font-size is 14px, with a line-height of 1.428. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).

    +
    +

    Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

    +

    Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

    +

    Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    +
    +{% highlight html %} +

    ...

    +{% endhighlight %} + + +

    Lead body copy

    +

    Make a paragraph stand out by adding .lead.

    +
    +

    Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

    +
    +{% highlight html %} +

    ...

    +{% endhighlight %} + + +

    Built with Less

    +

    The typographic scale is based on two LESS variables in variables.less: @font-size-base and @line-height-base. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.

    + + + +

    Emphasis

    +

    Make use of HTML's default emphasis tags with lightweight styles.

    + +

    Small text

    +

    For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

    +
    +

    This line of text is meant to be treated as fine print.

    +
    +{% highlight html %} +This line of text is meant to be treated as fine print. +{% endhighlight %} + + +

    Bold

    +

    For emphasizing a snippet of text with a heavier font-weight.

    +
    +

    The following snippet of text is rendered as bold text.

    +
    +{% highlight html %} +rendered as bold text +{% endhighlight %} + +

    Italics

    +

    For emphasizing a snippet of text with italics.

    +
    +

    The following snippet of text is rendered as italicized text.

    +
    +{% highlight html %} +rendered as italicized text +{% endhighlight %} + +

    Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

    + +

    Alignment classes

    +

    Easily realign text to components with text alignment classes.

    +
    +

    Left aligned text.

    +

    Center aligned text.

    +

    Right aligned text.

    +
    +{% highlight html %} +

    Left aligned text.

    +

    Center aligned text.

    +

    Right aligned text.

    +{% endhighlight %} + +

    Emphasis classes

    +

    Convey meaning through color with a handful of emphasis utility classes.

    +
    +

    Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

    +

    Etiam porta sem malesuada magna mollis euismod.

    +

    Donec ullamcorper nulla non metus auctor fringilla.

    +

    Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

    +
    +{% highlight html %} +

    ...

    +

    ...

    +

    ...

    +

    ...

    +{% endhighlight %} + + + +

    Abbreviations

    +

    Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

    + +

    Basic abbreviation

    +

    For expanded text on long hover of an abbreviation, include the title attribute with the <abbr> element.

    +
    +

    An abbreviation of the word attribute is attr.

    +
    +{% highlight html %} +attr +{% endhighlight %} + +

    Initialism

    +

    Add .initialism to an abbreviation for a slightly smaller font-size.

    +
    +

    HTML is the best thing since sliced bread.

    +
    +{% highlight html %} +HTML +{% endhighlight %} + + + +

    Addresses

    +

    Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <br>.

    +
    +
    + Twitter, Inc.
    + 795 Folsom Ave, Suite 600
    + San Francisco, CA 94107
    + P: (123) 456-7890 +
    +
    + Full Name
    + first.last@example.com +
    +
    +{% highlight html %} +
    + Twitter, Inc.
    + 795 Folsom Ave, Suite 600
    + San Francisco, CA 94107
    + P: (123) 456-7890 +
    + +
    + Full Name
    + first.last@example.com +
    +{% endhighlight %} + + + +

    Blockquotes

    +

    For quoting blocks of content from another source within your document.

    + +

    Default blockquote

    +

    Wrap <blockquote> around any HTML as the quote. For straight quotes we recommend a <p>.

    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    +
    +
    +{% highlight html %} +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    +
    +{% endhighlight %} + +

    Blockquote options

    +

    Style and content changes for simple variations on a standard blockquote.

    + +

    Naming a source

    +

    Add <small> tag for identifying the source. Wrap the name of the source work in <cite>.

    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    + Someone famous in Source Title +
    +
    +{% highlight html %} +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    + Someone famous Source Title +
    +{% endhighlight %} + +

    Alternate displays

    +

    Use .pull-right for a floated, right-aligned blockquote.

    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    + Someone famous in Source Title +
    +
    +{% highlight html %} +
    + ... +
    +{% endhighlight %} + + + +

    Lists

    + +

    Unordered

    +

    A list of items in which the order does not explicitly matter.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Ordered

    +

    A list of items in which the order does explicitly matter.

    +
    +
      +
    1. Lorem ipsum dolor sit amet
    2. +
    3. Consectetur adipiscing elit
    4. +
    5. Integer molestie lorem at massa
    6. +
    7. Facilisis in pretium nisl aliquet
    8. +
    9. Nulla volutpat aliquam velit
    10. +
    11. Faucibus porta lacus fringilla vel
    12. +
    13. Aenean sit amet erat nunc
    14. +
    15. Eget porttitor lorem
    16. +
    +
    +{% highlight html %} +
      +
    1. ...
    2. +
    +{% endhighlight %} + +

    Unstyled

    +

    Remove the default list-style and left margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Inline

    +

    Place all list items on a single line with inline-block and some light padding.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Description

    +

    A list of terms with their associated descriptions.

    +
    +
    +
    Description lists
    +
    A description list is perfect for defining terms.
    +
    Euismod
    +
    Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
    +
    Donec id elit non mi porta gravida at eget metus.
    +
    Malesuada porta
    +
    Etiam porta sem malesuada magna mollis euismod.
    +
    +
    +{% highlight html %} +
    +
    ...
    +
    ...
    +
    +{% endhighlight %} + +

    Horizontal description

    +

    Make terms and descriptions in <dl> line up side-by-side.

    +
    +
    +
    Description lists
    +
    A description list is perfect for defining terms.
    +
    Euismod
    +
    Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
    +
    Donec id elit non mi porta gravida at eget metus.
    +
    Malesuada porta
    +
    Etiam porta sem malesuada magna mollis euismod.
    +
    Felis euismod semper eget lacinia
    +
    Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
    +
    +
    +{% highlight html %} +
    +
    ...
    +
    ...
    +
    +{% endhighlight %} + +
    Auto-truncating
    +

    + Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout. +

    +
    + + + +
    + + +

    Inline

    +

    Wrap inline snippets of code with <code>.

    +
    + For example, <section> should be wrapped as inline. +
    +{% highlight html %} +For example, <section> should be wrapped as inline. +{% endhighlight %} + +

    Basic block

    +

    Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.

    +
    +
    <p>Sample text here...</p>
    +
    +{% highlight html %} +
    <p>Sample text here...</p>
    +{% endhighlight %} + +

    You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.

    +
    + + + + +
    + + +

    Basic example

    +

    For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    +
    +{% highlight html %} + + ... +
    +{% endhighlight %} + + +

    Optional classes

    +

    Add any of the following classes to the .table base class.

    + +

    Striped

    +

    Use .table-striped to add zebra-striping to any table row within the <tbody>.

    +
    +

    Cross-browser compatibility

    +

    Striped tables are styled via the :nth-child CSS selector, which is not available in IE8.

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    +
    +{% highlight html %} + + ... +
    +{% endhighlight %} + +

    Bordered

    +

    Add .table-bordered for borders and rounded corners.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    MarkOtto@TwBootstrap
    2JacobThornton@fat
    3Larry the Bird@twitter
    +
    +{% highlight html %} + + ... +
    +{% endhighlight %} + +

    Hover rows

    +

    Add .table-hover to enable a hover state on table rows within a <tbody>.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larry the Bird@twitter
    +
    +{% highlight html %} + + ... +
    +{% endhighlight %} + + +

    Condensed

    +

    Add .table-condensed to make tables more compact by cutting cell padding in half.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larry the Bird@twitter
    +
    +{% highlight html %} + + ... +
    +{% endhighlight %} + + + +

    Optional row classes

    +

    Use contextual classes to color table rows.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ClassDescription
    + .success + Indicates a successful or positive action.
    + .danger + Indicates a dangerous or potentially negative action.
    + .warning + Indicates a warning that might need attention.
    + .info + Used as an alternative to the default styles.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #ProductPayment TakenStatus
    1TB - Monthly01/04/2012Approved
    2TB - Monthly02/04/2012Declined
    3TB - Monthly03/04/2012Pending
    +
    +{% highlight html %} +... + + 1 + TB - Monthly + 01/04/2012 + Approved + +... +{% endhighlight %} + +
    + + + + +
    + + +

    Basic example

    +

    Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements are set to width: 100%; by default.

    +
    +
    + Legend + + +

    Example block-level help text here.

    +
    + +
    + +
    +
    +{% highlight html %} +
    +
    + Legend + + +

    Example block-level help text here.

    +
    + +
    + +
    +
    +{% endhighlight %} + + +

    Optional layouts

    +

    Included with Bootstrap are optional form layouts for common use cases.

    + +

    Inline form

    +

    Add .form-inline for left-aligned and inline-block controls for a compact layout.

    +
    +

    Requires custom widths

    +

    Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.

    +
    +
    + + +
    + +
    + +
    +{% highlight html %} +
    + + +
    + +
    + +
    +{% endhighlight %} + +

    Horizontal form

    +

    Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout.

    +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +{% highlight html %} +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +{% endhighlight %} + + +

    Supported form controls

    +

    Examples of standard form controls supported in an example form layout.

    + +

    Inputs

    +

    Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

    +
    +

    Type declaration required

    +

    Inputs will only be fully styled if their type is properly declared.

    +
    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Textarea

    +

    Form control which supports multiple lines of text. Change rows attribute as necessary.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Checkboxes and radios

    +

    Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

    +

    Default (stacked)

    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +{% highlight html %} +
    + +
    + +
    + +
    +{% endhighlight %} + +

    Inline checkboxes

    +

    Use .checkbox-inline or .radio-inline class to a series of checkboxes or radios for controls appear on the same line.

    +
    + + + +
    +{% highlight html %} + + + +{% endhighlight %} + +

    Selects

    +

    Use the default option or specify a multiple="multiple" to show multiple options at once.

    +
    + +
    + +
    +{% highlight html %} + + + +{% endhighlight %} + + + +

    Form control states

    +

    Provide feedback to users or visitors with basic feedback states on form controls and labels.

    + +

    Input focus

    +

    We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Invalid inputs

    +

    Style inputs via default browser functionality. Specify a type, add the required attribute if the field is not optional, and (if applicable) specify a pattern.

    + +
    +

    Cross-browser compatibility

    +

    Invalid inputs are styled via the :invalid CSS selector, which is not supported by Internet Explorer 9 and below.

    +
    + +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Disabled inputs

    +

    Add the disabled attribute on an input to prevent user input and trigger a slightly different look.

    +
    + +
    +{% highlight html %} + +{% endhighlight %} + +

    Disabled fieldsets

    +

    Add the disabled attribute to a <fieldset> to disable all the controls within the <fieldset> at once.

    + +
    +

    Link functionality of <a> not impacted

    +

    This class will only change the appearance of <a class="btn btn-default"> buttons, not their functionality. Use custom JavaScript to disable links here.

    +
    + +
    +

    Cross-browser compatibility

    +

    While Bootstrap will apply these styles in all browsers, IE and Safari don't actually support the <disabled> attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

    +
    + +
    +
    + + +
    + +
    + +
    +
    +{% highlight html %} +
    +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +{% endhighlight %} + +

    Validation states

    +

    Bootstrap includes validation styles for error, warning, info, and success messages. To use:

    + +

    Validation styles are applied on a per-input basis. With horizontal forms, the <label class="control-label"> will always be styled.

    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +{% highlight html %} +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +{% endhighlight %} + + + +

    Extending form controls

    +

    Adding on top of existing browser controls, Bootstrap includes other useful form components.

    + +

    Input groups

    +

    Add text or buttons before, after, or on both sides of any text-based input. Use .input-group with a .add-on to prepend or append elements to an <input>.

    + +
    +

    Cross-browser compatibility

    +

    Avoid using <select> elements here as they cannot be fully styled in WebKit browsers.

    +
    + +
    +
    + @ + +
    +
    +
    + + .00 +
    +
    +
    + $ + + .00 +
    +
    +{% highlight html %} +
    + @ + +
    + +
    + + .00 +
    + +
    + $ + + .00 +
    +{% endhighlight %} + +

    Optional sizes

    +

    Add the relative form sizing classes to the `.input-group-addon`.

    +
    +
    + @ + +
    +
    +
    + @ + +
    +
    +
    + @ + +
    +
    +{% highlight html %} +
    + @ + +
    + +
    + @ + +
    + +
    + @ + +
    +{% endhighlight %} + +

    Buttons instead of text

    +

    Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon, you'll need to use .input-group-btn to wrap the buttons. This is required due to default browser styles that cannot be overridden.

    +
    +
    + + + + +
    +
    +
    + + + + +
    +
    +{% highlight html %} +
    + + + + +
    + +
    + + + + +
    +{% endhighlight %} + +

    Button dropdowns

    +

    +
    +
    + + +
    +
    +
    + + +
    +
    +{% highlight html %} +
    + + +
    + +
    + + +
    +{% endhighlight %} + +

    Segmented dropdown groups

    +
    +
    +
    + + + +
    + +
    + +
    + +
    + +
    + + + +
    +
    +
    +{% highlight html %} +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +{% endhighlight %} + +

    Control sizing

    +

    Use relative sizing classes like .input-large or match your inputs to the grid column sizes using .col-lg-* classes.

    + +

    Relative sizing

    +

    Create larger or smaller form controls that match button sizes.

    +
    +
    + + + +
    +
    +{% highlight html %} + + + +{% endhighlight %} + +

    Column sizing

    +

    Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +{% highlight html %} +
    +
    + +
    +
    + +
    +
    + +
    +
    +{% endhighlight %} + +

    Form actions

    +

    End a form with a group of actions (buttons). When placed within a .form-horizontal, the buttons will automatically indent to line up with the form controls.

    +
    +
    + + +
    +
    +{% highlight html %} +
    + + +
    +{% endhighlight %} + +

    Help text

    +

    Block level help text for form controls.

    +
    + + A longer block of help text that breaks onto a new line and may extend beyond one line. +
    +{% highlight html %} +A longer block of help text that breaks onto a new line and may extend beyond one line. +{% endhighlight %} + +
    + + + + +
    + + +

    Button options

    +

    Use any of the available button classes to quickly create a styled button.

    +
    + + + + + + + +
    +{% highlight html %} + + + + + + + + + + + + + + + + + + + + +{% endhighlight %} + +

    Button sizes

    +

    Fancy larger or smaller buttons? Add .btn-large or .btn-small for additional sizes.

    +
    +

    + + +

    +

    + + +

    +

    + + +

    +
    +{% highlight html %} +

    + + +

    +

    + + +

    +

    + + +

    +{% endhighlight %} + +

    Create block level buttons—those that span the full width of a parent— by adding .btn-block.

    +
    +
    + + +
    +
    +{% highlight html %} + + +{% endhighlight %} + + +

    Disabled state

    +

    Make buttons look unclickable by fading them back 50%.

    + +

    Button element

    +

    Add the disabled attribute to <button> buttons.

    +

    + + +

    +{% highlight html %} + + +{% endhighlight %} + +
    +

    Cross-browser compatibility

    +

    If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.

    +
    + +

    Anchor element

    +

    Add the .disabled class to <a> buttons.

    +

    + Primary link + Link +

    +{% highlight html %} +Primary link +Link +{% endhighlight %} +

    + We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. +

    +
    +

    Link functionality not impacted

    +

    This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links here.

    +
    + + +

    Using multiple tags

    +

    Use the button classes on an <a>, <button>, or <input> element.

    +
    + Link + + + +
    +{% highlight html %} +Link + + + +{% endhighlight %} + +
    +

    Cross-browser rendering

    +

    As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

    +
    + +
    + + + + +
    + + +

    Add classes to an <img> element to easily style images in any project.

    +
    +

    Cross-browser compatibility

    +

    Keep in mind that Internet Explorer 8 lacks support for rounded corners.

    +
    +
    + + + +
    +{% highlight html %} + + + +{% endhighlight %} + +
    + + + +
    + + +

    Close icon

    +

    Use the generic close icon for dismissing content like modals and alerts.

    +
    +

    +
    +{% highlight html %} + +{% endhighlight %} + +

    .pull-left

    +

    Float an element left

    +{% highlight html %} +
    ...
    +{% endhighlight %} +{% highlight css %} +.pull-left { + float: left; +} +{% endhighlight %} + +

    .pull-right

    +

    Float an element right

    +{% highlight html %} +
    ...
    +{% endhighlight %} +{% highlight css %} +.pull-right { + float: right; +} +{% endhighlight %} + +

    .clearfix

    +

    Clear the float on any element. Utilizes the micro clearfix as popularized by Nicolas Gallagher.

    +{% highlight html %} +
    ...
    +{% endhighlight %} +{% highlight css %} +// Mixin +.clearfix { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} + +// Usage +.element { + .clearfix(); +} +{% endhighlight %} +
    + + +
    + +

    For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.

    + +

    Responsive classes

    + + +

    Print classes

    + + + + + + + + + + + + + + + + + + + + +
    ClassBrowserPrint
    .visible-printVisible
    .hidden-printVisible
    + +

    When to use

    +

    Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities should not be used with tables, and as such are not supported.

    + +

    Test case

    +

    Resize your browser or load on different devices to test the above classes.

    +

    Visible on...

    +

    Green checkmarks indicate that class is visible in your current viewport.

    + +

    Hidden on...

    +

    Here, green checkmarks indicate that class is hidden in your current viewport.

    + + +
    diff --git a/docs/customize.html b/docs/customize.html index 20020a31cc..32a00b441e 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -1,11 +1,11 @@ --- -layout: default +layout: customize title: Customize and download +slug: customize ---
    -
    Customize and download
    -
    -
    - -
    -
    - -
    -
    -

    Scaffolding

    - - - - - -

    Base CSS

    - - - - - - - -
    -
    -

    Components

    - - - - - - - - - - - -

    JS Components

    - - - - - - -
    -
    -

    Miscellaneous

    - - - - -

    Responsive

    - - - - - -
    -
    -
    + + +
    + +
    +
    +

    Scaffolding

    + + + + + +

    Base CSS

    + + + + + + + +
    +
    +

    Components

    + + + + + + + + + + + +

    JS Components

    + + + + + + +
    +
    +

    Miscellaneous

    + + + + +

    Responsive

    + + + + + +
    +
    +
    -
    - -
    -
    - - - - - - - -
    -
    - - - - - - -
    -
    -

    Heads up!

    -

    All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of jQuery to be included.

    -
    -
    -
    +
    + +
    +
    + + + + + + + +
    +
    + + + + + + +
    +
    +

    Heads up!

    +

    All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of jQuery to be included.

    +
    +
    +
    -
    - -
    -
    -

    Scaffolding

    - - - - +
    + +
    +
    +

    Scaffolding

    + + + + -

    Links

    - - - - +

    Links

    + + + + -

    Grid system

    - - - - - - - - - - - - - - +

    Grid system

    + + + + + + + + + + + + + + -
    -
    +
    +
    -

    Typography

    - - - - - - +

    Typography

    + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + -

    Tables

    - - - - - - - - +

    Tables

    + + + + + + + + -

    Forms

    - - - - - - - - - - - - - - - - +

    Forms

    + + + + + + + + + + + + + + + + -
    -
    +
    +
    -

    Form states & alerts

    - - - - - - - - - - - - - - - - +

    Form states & alerts

    + + + + + + + + + + + + + + + + -

    Navbar

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

    Navbar

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + -

    Dropdowns

    - - - - - - - - - - -
    -
    -
    +

    Dropdowns

    + + + + + + + + + + +
    +
    +
    -
    - -
    - Customize and Download -

    What's included?

    -

    Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.

    -
    -
    -
    - - -
    +
    + +
    + Customize and Download +

    What's included?

    +

    Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.

    +
    +
    + diff --git a/docs/examples/carousel.html b/docs/examples/carousel.html index cd6855aab5..75e0838e39 100644 --- a/docs/examples/carousel.html +++ b/docs/examples/carousel.html @@ -327,19 +327,19 @@ body {

    Heading

    Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.

    -

    View details »

    +

    View details »

    Heading

    Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.

    -

    View details »

    +

    View details »

    Heading

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    -

    View details »

    +

    View details »

    diff --git a/docs/examples/jumbotron.html b/docs/examples/jumbotron.html index 3982a34d99..3627f7ef43 100644 --- a/docs/examples/jumbotron.html +++ b/docs/examples/jumbotron.html @@ -63,7 +63,7 @@ title: Jumbotron template -