Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update to 2.0 stable

  • Loading branch information...
commit 78373033485ca2c2de37c1a898dea0201a7b8ecb 1 parent 6a8eec9
Darren Jeacocke daz authored

Showing 32 changed files with 1,209 additions and 850 deletions. Show diff stats Hide diff stats

  1. BIN  vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png
  2. BIN  vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png
  3. +5 4 vendor/toolkit/twitter/bootstrap/accordion.less
  4. +1 0  vendor/toolkit/twitter/bootstrap/alerts.less
  5. +10 8 vendor/toolkit/twitter/bootstrap/bootstrap.less
  6. +48 17 vendor/toolkit/twitter/bootstrap/button-groups.less
  7. +137 88 vendor/toolkit/twitter/bootstrap/buttons.less
  8. +12 5 vendor/toolkit/twitter/bootstrap/carousel.less
  9. +44 0 vendor/toolkit/twitter/bootstrap/code.less
  10. +23 2 vendor/toolkit/twitter/bootstrap/dropdowns.less
  11. +81 62 vendor/toolkit/twitter/bootstrap/forms.less
  12. +8 0 vendor/toolkit/twitter/bootstrap/grid.less
  13. +20 0 vendor/toolkit/twitter/bootstrap/hero-unit.less
  14. +4 4 vendor/toolkit/twitter/bootstrap/labels.less
  15. +17 0 vendor/toolkit/twitter/bootstrap/layouts.less
  16. +202 38 vendor/toolkit/twitter/bootstrap/mixins.less
  17. +9 2 vendor/toolkit/twitter/bootstrap/modals.less
  18. +71 30 vendor/toolkit/twitter/bootstrap/navbar.less
  19. +68 63 vendor/toolkit/twitter/bootstrap/navs.less
  20. +7 2 vendor/toolkit/twitter/bootstrap/pager.less
  21. +1 0  vendor/toolkit/twitter/bootstrap/pagination.less
  22. +0 17 vendor/toolkit/twitter/bootstrap/patterns.less
  23. +25 25 vendor/toolkit/twitter/bootstrap/popovers.less
  24. +14 18 vendor/toolkit/twitter/bootstrap/progress-bars.less
  25. +2 3 vendor/toolkit/twitter/bootstrap/reset.less
  26. +219 164 vendor/toolkit/twitter/bootstrap/responsive.less
  27. +6 89 vendor/toolkit/twitter/bootstrap/scaffolding.less
  28. +137 99 vendor/toolkit/twitter/bootstrap/sprites.less
  29. +1 54 vendor/toolkit/twitter/bootstrap/tables.less
  30. +2 0  vendor/toolkit/twitter/bootstrap/thumbnails.less
  31. +12 42 vendor/toolkit/twitter/bootstrap/type.less
  32. +23 14 vendor/toolkit/twitter/bootstrap/variables.less
BIN  vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png
BIN  vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png
9 vendor/toolkit/twitter/bootstrap/accordion.less
@@ -9,15 +9,16 @@
9 9
10 10 // Group == heading + body
11 11 .accordion-group {
12   - background-color: #f5f5f5;
  12 + margin-bottom: 2px;
  13 + border: 1px solid #e5e5e5;
13 14 .border-radius(4px);
14 15 }
15 16 .accordion-heading {
16   - padding: 8px 15px;
17 17 border-bottom: 0;
18 18 }
19   -.accordion-body {
20   - margin-bottom: 2px;
  19 +.accordion-heading .accordion-toggle {
  20 + display: block;
  21 + padding: 8px 15px;
21 22 }
22 23
23 24 // Inner needs the styles because you can't animate properly with any styles on the element
1  vendor/toolkit/twitter/bootstrap/alerts.less
@@ -18,6 +18,7 @@
18 18 // Adjust close link position
19 19 .alert .close {
20 20 position: relative;
  21 + top: -2px;
21 22 right: -21px;
22 23 line-height: 18px;
23 24 }
18 vendor/toolkit/twitter/bootstrap/bootstrap.less
... ... @@ -1,12 +1,11 @@
1 1 /*!
2   - * Bootstrap @VERSION
  2 + * Bootstrap v2.0.0
3 3 *
4 4 * Copyright 2012 Twitter, Inc
5 5 * Licensed under the Apache License v2.0
6 6 * http://www.apache.org/licenses/LICENSE-2.0
7 7 *
8 8 * Designed and built with all the love in the world @twitter by @mdo and @fat.
9   - * Date: @DATE
10 9 */
11 10
12 11 // CSS Reset
@@ -18,9 +17,12 @@
18 17
19 18 // Grid system and page structure
20 19 @import "scaffolding.less";
  20 +@import "grid.less";
  21 +@import "layouts.less";
21 22
22 23 // Base CSS
23 24 @import "type.less";
  25 +@import "code.less";
24 26 @import "forms.less";
25 27 @import "tables.less";
26 28
@@ -31,6 +33,11 @@
31 33 @import "component-animations.less";
32 34 @import "close.less";
33 35
  36 +// Components: Buttons & Alerts
  37 +@import "buttons.less";
  38 +@import "button-groups.less";
  39 +@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
  40 +
34 41 // Components: Nav
35 42 @import "navs.less";
36 43 @import "navbar.less";
@@ -43,18 +50,13 @@
43 50 @import "tooltip.less";
44 51 @import "popovers.less";
45 52
46   -// Components: Buttons & Alerts
47   -@import "buttons.less";
48   -@import "button-groups.less";
49   -@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
50   -
51 53 // Components: Misc
52 54 @import "thumbnails.less";
53 55 @import "labels.less";
54 56 @import "progress-bars.less";
55 57 @import "accordion.less";
56 58 @import "carousel.less";
57   -@import "responsive.less";
  59 +@import "hero-unit.less";
58 60
59 61 // Utility classes
60 62 @import "utilities.less"; // Has to be last to override when necessary
65 vendor/toolkit/twitter/bootstrap/button-groups.less
@@ -6,6 +6,7 @@
6 6 .btn-group {
7 7 position: relative;
8 8 .clearfix(); // clears the floated buttons
  9 + .ie7-restore-left-whitespace();
9 10 }
10 11
11 12 // Space out series of button groups
@@ -15,8 +16,11 @@
15 16
16 17 // Optional: Group multiple button groups together for a toolbar
17 18 .btn-toolbar {
  19 + margin-top: @baseLineHeight / 2;
  20 + margin-bottom: @baseLineHeight / 2;
18 21 .btn-group {
19 22 display: inline-block;
  23 + .ie7-inline-block();
20 24 }
21 25 }
22 26
@@ -69,10 +73,18 @@
69 73 // On hover/focus/active, bring the proper btn to front
70 74 .btn-group .btn:hover,
71 75 .btn-group .btn:focus,
72   -.btn-group .btn:active {
  76 +.btn-group .btn:active,
  77 +.btn-group .btn.active {
73 78 z-index: 2;
74 79 }
75 80
  81 +// On active and open, don't show outline
  82 +.btn-group .dropdown-toggle:active,
  83 +.btn-group.open .dropdown-toggle {
  84 + outline: 0;
  85 +}
  86 +
  87 +
76 88
77 89 // Split button dropdowns
78 90 // ----------------------
@@ -81,36 +93,55 @@
81 93 .btn-group .dropdown-toggle {
82 94 padding-left: 8px;
83 95 padding-right: 8px;
84   - @shadow: inset 1px 0 0 rgba(255,255,255,.125), 0 1px 2px rgba(0,0,0,.05);
  96 + @shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
85 97 .box-shadow(@shadow);
  98 + *padding-top: 5px;
  99 + *padding-bottom: 5px;
86 100 }
87 101
88   -// Reposition menu on open and round all corners
89   -.btn-group.open .dropdown-menu {
90   - display: block;
91   - margin-top: 1px;
92   - .border-radius(5px);
93   -}
94   -.btn-group.open .dropdown-toggle {
95   - background-image: none;
96   - @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
97   - .box-shadow(@shadow);
  102 +.btn-group.open {
  103 + // IE7's z-index only goes to the nearest positioned ancestor, which would
  104 + // make the menu appear below buttons that appeared later on the page
  105 + *z-index: @zindexDropdown;
  106 +
  107 + // Reposition menu on open and round all corners
  108 + .dropdown-menu {
  109 + display: block;
  110 + margin-top: 1px;
  111 + .border-radius(5px);
  112 + }
  113 +
  114 + .dropdown-toggle {
  115 + background-image: none;
  116 + @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
  117 + .box-shadow(@shadow);
  118 + }
98 119 }
99 120
100 121 // Reposition the caret
101 122 .btn .caret {
102   - margin-top: 6px;
  123 + margin-top: 7px;
103 124 margin-left: 0;
104 125 }
  126 +.btn:hover .caret,
  127 +.open.btn-group .caret {
  128 + .opacity(100);
  129 +}
  130 +
105 131
106 132 // Account for other colors
107   -.primary,
108   -.danger,
109   -.info,
110   -.success {
  133 +.btn-primary,
  134 +.btn-danger,
  135 +.btn-info,
  136 +.btn-success {
111 137 .caret {
112 138 border-top-color: @white;
113 139 .opacity(75);
114 140 }
115 141 }
116 142
  143 +// Small button dropdowns
  144 +.btn-small .caret {
  145 + margin-top: 4px;
  146 +}
  147 +
225 vendor/toolkit/twitter/bootstrap/buttons.less
... ... @@ -1,40 +1,18 @@
1 1 // BUTTON STYLES
2 2 // -------------
3 3
4   -// Shared colors for buttons and alerts
5   -.btn {
6   - // Set text color
7   - &.danger,
8   - &.danger:hover,
9   - &.success,
10   - &.success:hover,
11   - &.info,
12   - &.info:hover {
13   - text-shadow: 0 -1px 0 rgba(0,0,0,.25);
14   - color: @white
15   - }
16   - // Danger and error appear as red
17   - &.danger {
18   - .gradientBar(#ee5f5b, #c43c35);
19   - }
20   - // Success appears as green
21   - &.success {
22   - .gradientBar(#62c462, #57a957);
23   - }
24   - // Info appears as a neutral blue
25   - &.info {
26   - .gradientBar(#5bc0de, #339bb9);
27   - }
28   -}
29 4
30   -// Base .btn styles
  5 +// Base styles
  6 +// --------------------------------------------------
  7 +
  8 +// Core
31 9 .btn {
32   - // Button Base
33 10 display: inline-block;
34   - padding: 5px 10px 6px;
  11 + padding: 4px 10px 4px;
35 12 font-size: @baseFontSize;
36   - line-height: normal;
  13 + line-height: @baseLineHeight;
37 14 color: @grayDark;
  15 + text-align: center;
38 16 text-shadow: 0 1px 1px rgba(255,255,255,.75);
39 17 #gradient > .vertical-three-colors(@white, @white, 25%, darken(@white, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
40 18 border: 1px solid #ccc;
@@ -44,73 +22,144 @@
44 22 .box-shadow(@shadow);
45 23 cursor: pointer;
46 24
47   - &:hover {
48   - color: @grayDark;
49   - text-decoration: none;
50   - background-position: 0 -15px;
51   - }
  25 + // Give IE7 some love
  26 + .ie7-restore-left-whitespace();
  27 +}
52 28
53   - // Focus state for keyboard and accessibility
54   - &:focus {
55   - outline: 1px dotted #666;
56   - }
  29 +// Hover state
  30 +.btn:hover {
  31 + color: @grayDark;
  32 + text-decoration: none;
  33 + background-color: darken(@white, 10%);
  34 + background-position: 0 -15px;
57 35
58   - // Primary Button Type
59   - &.primary {
60   - color: @white;
61   - text-shadow: 0 -1px 0 rgba(0,0,0,.25);
62   - .gradientBar(@blue, @blueDark)
63   - }
  36 + // transition is only when going to hover, otherwise the background
  37 + // behind the gradient (there for IE<=9 fallback) gets mismatched
  38 + .transition(background-position .1s linear);
  39 +}
64 40
65   - // Transitions
66   - .transition(.1s linear all);
  41 +// Focus state for keyboard and accessibility
  42 +.btn:focus {
  43 + .tab-focus();
  44 +}
67 45
68   - // Active and Disabled states
69   - &.active,
70   - &:active {
71   - background-image: none;
72   - @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
73   - .box-shadow(@shadow);
74   - }
75   - &.disabled {
76   - cursor: default;
77   - background-image: none;
78   - .reset-filter();
79   - .opacity(65);
80   - .box-shadow(none);
81   - }
82   - &[disabled] {
83   - // disabled pseudo can't be included with .disabled
84   - // def because IE8 and below will drop it ;_;
85   - cursor: default;
86   - background-image: none;
87   - .reset-filter();
88   - .opacity(65);
89   - .box-shadow(none);
90   - }
  46 +// Active state
  47 +.btn.active,
  48 +.btn:active {
  49 + background-image: none;
  50 + @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
  51 + .box-shadow(@shadow);
  52 + background-color: darken(@white, 10%);
  53 + background-color: darken(@white, 15%) e("\9");
  54 + color: rgba(0,0,0,.5);
  55 + outline: 0;
  56 +}
91 57
92   - // Button Sizes
93   - &.large {
94   - padding: 9px 14px 9px;
95   - font-size: @baseFontSize + 2px;
96   - line-height: normal;
97   - .border-radius(5px);
98   - }
99   - &.small {
100   - padding: 7px 9px 7px;
101   - font-size: @baseFontSize - 2px;
102   - }
  58 +// Disabled state
  59 +.btn.disabled,
  60 +.btn[disabled] {
  61 + cursor: default;
  62 + background-image: none;
  63 + background-color: darken(@white, 10%);
  64 + .opacity(65);
  65 + .box-shadow(none);
103 66 }
104   -// Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons
105   -:root .btn {
106   - border-radius: 0 \0;
  67 +
  68 +
  69 +// Button Sizes
  70 +// --------------------------------------------------
  71 +
  72 +// Large
  73 +.btn-large {
  74 + padding: 9px 14px;
  75 + font-size: @baseFontSize + 2px;
  76 + line-height: normal;
  77 + .border-radius(5px);
107 78 }
  79 +.btn-large .icon {
  80 + margin-top: 1px;
  81 +}
  82 +
  83 +// Small
  84 +.btn-small {
  85 + padding: 5px 9px;
  86 + font-size: @baseFontSize - 2px;
  87 + line-height: @baseLineHeight - 2px;
  88 +}
  89 +.btn-small .icon {
  90 + margin-top: -1px;
  91 +}
  92 +
  93 +
  94 +// Alternate buttons
  95 +// --------------------------------------------------
  96 +
  97 +// Set text color
  98 +// -------------------------
  99 +.btn-primary,
  100 +.btn-primary:hover,
  101 +.btn-warning,
  102 +.btn-warning:hover,
  103 +.btn-danger,
  104 +.btn-danger:hover,
  105 +.btn-success,
  106 +.btn-success:hover,
  107 +.btn-info,
  108 +.btn-info:hover {
  109 + text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  110 + color: @white
  111 +}
  112 +// Provide *some* extra contrast for those who can get it
  113 +.btn-primary.active,
  114 +.btn-warning.active,
  115 +.btn-danger.active,
  116 +.btn-success.active,
  117 +.btn-info.active {
  118 + color: rgba(255,255,255,.75);
  119 +}
  120 +
  121 +// Set the backgrounds
  122 +// -------------------------
  123 +.btn-primary {
  124 + .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
  125 +}
  126 +// Warning appears are orange
  127 +.btn-warning {
  128 + .buttonBackground(lighten(@orange, 15%), @orange);
  129 +}
  130 +// Danger and error appear as red
  131 +.btn-danger {
  132 + .buttonBackground(#ee5f5b, #bd362f);
  133 +}
  134 +// Success appears as green
  135 +.btn-success {
  136 + .buttonBackground(#62c462, #51a351);
  137 +}
  138 +// Info appears as a neutral blue
  139 +.btn-info {
  140 + .buttonBackground(#5bc0de, #2f96b4);
  141 +}
  142 +
  143 +
  144 +// Cross-browser Jank
  145 +// --------------------------------------------------
108 146
109   -// Help Firefox not be a jerk about adding extra padding to buttons
110 147 button.btn,
111   -input[type=submit].btn {
  148 +input[type="submit"].btn {
112 149 &::-moz-focus-inner {
113   - padding: 0;
114   - border: 0;
  150 + padding: 0;
  151 + border: 0;
115 152 }
116   -}
  153 +
  154 + // IE7 has some default padding on button controls
  155 + *padding-top: 2px;
  156 + *padding-bottom: 2px;
  157 + &.large {
  158 + *padding-top: 7px;
  159 + *padding-bottom: 7px;
  160 + }
  161 + &.small {
  162 + *padding-top: 3px;
  163 + *padding-bottom: 3px;
  164 + }
  165 +}
17 vendor/toolkit/twitter/bootstrap/carousel.less
@@ -3,6 +3,7 @@
@@ -26,15 +27,15 @@
@@ -47,7 +48,7 @@
@@ -80,7 +81,13 @@
44 vendor/toolkit/twitter/bootstrap/code.less
... ... @@ -0,0 +1,44 @@
  1 +// Code.less
  2 +// Code typography styles for the <code> and <pre> elements
  3 +// --------------------------------------------------------
  4 +
  5 +// Inline and block code styles
  6 +code,
  7 +pre {
  8 + padding: 0 3px 2px;
  9 + #font > #family > .monospace;
  10 + font-size: @baseFontSize - 1;
  11 + color: @grayDark;
  12 + .border-radius(3px);
  13 +}
  14 +code {
  15 + padding: 3px 4px;
  16 + color: #d14;
  17 + background-color: #f7f7f9;
  18 + border: 1px solid #e1e1e8;
  19 +}
  20 +pre {
  21 + display: block;
  22 + padding: (@baseLineHeight - 1) / 2;
  23 + margin: 0 0 @baseLineHeight / 2;
  24 + font-size: 12px;
  25 + line-height: @baseLineHeight;
  26 + background-color: #f5f5f5;
  27 + border: 1px solid #ccc; // fallback for IE7-8
  28 + border: 1px solid rgba(0,0,0,.15);
  29 + .border-radius(4px);
  30 + white-space: pre;
  31 + white-space: pre-wrap;
  32 + word-break: break-all;
  33 +
  34 + // Make prettyprint styles more spaced out for readability
  35 + &.prettyprint {
  36 + margin-bottom: @baseLineHeight;
  37 + }
  38 +
  39 + // Account for some code outputs that place code tags in pre tags
  40 + code {
  41 + padding: 0;
  42 + background-color: transparent;
  43 + }
  44 +}
25 vendor/toolkit/twitter/bootstrap/dropdowns.less
@@ -5,12 +5,23 @@
5 5 .dropdown {
6 6 position: relative;
7 7 }
  8 +.dropdown-toggle {
  9 + // The caret makes the toggle a bit too tall in IE7
  10 + *margin-bottom: -3px;
  11 +}
  12 +.dropdown-toggle:active,
  13 +.open .dropdown-toggle {
  14 + outline: 0;
  15 +}
8 16 // Dropdown arrow/caret
9 17 .caret {
10 18 display: inline-block;
11 19 width: 0;
12 20 height: 0;
13 21 text-indent: -99999px;
  22 + // IE7 won't do the border trick if there's a text indent, but it doesn't
  23 + // do the content that text-indent is hiding, either, so we're ok.
  24 + *text-indent: 0;
14 25 vertical-align: top;
15 26 border-left: 4px solid transparent;
16 27 border-right: 4px solid transparent;
@@ -21,7 +32,6 @@
21 32 .dropdown .caret {
22 33 margin-top: 8px;
23 34 margin-left: 2px;
24   - *margin-top: 7px;
25 35 }
26 36 .dropdown:hover .caret,
27 37 .open.dropdown .caret {
@@ -31,6 +41,7 @@
31 41 .dropdown-menu {
32 42 position: absolute;
33 43 top: 100%;
  44 + left: 0;
34 45 z-index: @zindexDropdown;
35 46 float: left;
36 47 display: none; // none by default, but block on "open" of the menu
@@ -50,7 +61,6 @@
50 61 -webkit-background-clip: padding-box;
51 62 -moz-background-clip: padding;
52 63 background-clip: padding-box;
53   - zoom: 1; // do we need this?
54 64 *border-right-width: 2px;
55 65 *border-bottom-width: 2px;
56 66
@@ -68,6 +78,13 @@
68 78 overflow: hidden;
69 79 background-color: #e5e5e5;
70 80 border-bottom: 1px solid @white;
  81 +
  82 + // IE7 needs a set width since we gave a height. Restricting just
  83 + // to IE7 to keep the 1px left/right space in other browsers.
  84 + // It is unclear where IE is getting the extra space that we need
  85 + // to negative-margin away, but so it goes.
  86 + *width: 100%;
  87 + *margin: -5px 0 5px;
71 88 }
72 89
73 90 // Links within the dropdown menu
@@ -93,6 +110,10 @@
93 110
94 111 // Open state for the dropdown
95 112 .dropdown.open {
  113 + // IE7's z-index only goes to the nearest positioned ancestor, which would
  114 + // make the menu appear below buttons that appeared later on the page
  115 + *z-index: @zindexDropdown;
  116 +
96 117 .dropdown-toggle {
97 118 color: @white;
98 119 background: #ccc;
143 vendor/toolkit/twitter/bootstrap/forms.less
@@ -28,7 +28,6 @@ legend {
28 28 color: @grayDark;
29 29 border: 0;
30 30 border-bottom: 1px solid #eee;
31   - -webkit-margin-collapse: separate;
32 31 }
33 32
34 33 // Set font for forms
@@ -68,22 +67,30 @@ select,
68 67 height: auto;
69 68 }
70 69
  70 +// Inputs within a label
  71 +label input,
  72 +label textarea,
  73 +label select {
  74 + display: block;
  75 +}
  76 +
71 77 // Mini reset for unique input types
72   -input[type=image],
73   -input[type=checkbox],
74   -input[type=radio] {
  78 +input[type="image"],
  79 +input[type="checkbox"],
  80 +input[type="radio"] {
75 81 width: auto;
76 82 height: auto;
77 83 padding: 0;
78 84 margin: 3px 0;
79 85 *margin-top: 0; /* IE7 */
80 86 line-height: normal;
81   - border: none;
  87 + border: 0;
82 88 cursor: pointer;
  89 + border-radius: 0 e("\0/"); // Nuke border-radius for IE9 only
83 90 }
84 91
85 92 // Reset the file input to browser defaults
86   -input[type=file] {
  93 +input[type="file"] {
87 94 padding: initial;
88 95 line-height: initial;
89 96 border: initial;
@@ -93,16 +100,16 @@ input[type=file] {
93 100 }
94 101
95 102 // Help out input buttons
96   -input[type=button],
97   -input[type=reset],
98   -input[type=submit] {
  103 +input[type="button"],
  104 +input[type="reset"],
  105 +input[type="submit"] {
99 106 width: auto;
100 107 height: auto;
101 108 }
102 109
103 110 // Set the height of select and file controls to match text inputs
104 111 select,
105   -input[type=file] {
  112 +input[type="file"] {
106 113 height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
107 114 *margin-top: 4px; /* For IE7, add top margin to align select with labels */
108 115 line-height: 28px;
@@ -111,7 +118,6 @@ input[type=file] {
111 118 // Chrome on Linux and Mobile Safari need background-color
112 119 select {
113 120 width: 220px; // default input width + 10px of padding that doesn't get applied
114   - vertical-align: baseline;
115 121 background-color: @white;
116 122 }
117 123
@@ -122,14 +128,20 @@ select[size] {
122 128 }
123 129
124 130 // Remove shadow from image inputs
125   -input[type=image] {
  131 +input[type="image"] {
126 132 .box-shadow(none);
127 133 }
128 134
  135 +// Make textarea height behave
129 136 textarea {
130 137 height: auto;
131 138 }
132 139
  140 +// Hidden inputs
  141 +input[type="hidden"] {
  142 + display: none;
  143 +}
  144 +
133 145
134 146
135 147 // CHECKBOXES & RADIOS
@@ -140,8 +152,8 @@ textarea {
140 152 .checkbox {
141 153 padding-left: 18px;
142 154 }
143   -.radio input[type=radio],
144   -.checkbox input[type=checkbox] {
  155 +.radio input[type="radio"],
  156 +.checkbox input[type="checkbox"] {
145 157 float: left;
146 158 margin-left: -18px;
147 159 }
@@ -149,7 +161,7 @@ textarea {
149 161 // Move the options list down to align with labels
150 162 .controls > .radio:first-child,
151 163 .controls > .checkbox:first-child {
152   - padding-top: 6px; // has to be padding because margin collaspes
  164 + padding-top: 5px; // has to be padding because margin collaspes
153 165 }
154 166
155 167 // Radios and checkboxes on same line
@@ -157,11 +169,17 @@ textarea {
157 169 .checkbox.inline {
158 170 display: inline-block;
159 171 margin-bottom: 0;
  172 + vertical-align: middle;
160 173 }
161 174 .radio.inline + .radio.inline,
162 175 .checkbox.inline + .checkbox.inline {
163 176 margin-left: 10px; // space out consecutive inline controls
164 177 }
  178 +// But don't forget to remove their padding on first-child
  179 +.controls > .radio.inline:first-child,
  180 +.controls > .checkbox.inline:first-child {
  181 + padding-top: 0;
  182 +}
165 183
166 184
167 185
@@ -180,12 +198,13 @@ textarea:focus {
180 198 @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
181 199 .box-shadow(@shadow);
182 200 outline: 0;
  201 + outline: thin dotted \9; /* IE6-8 */
183 202 }
184   -input[type=file]:focus,
185   -input[type=checkbox]:focus,
  203 +input[type="file"]:focus,
  204 +input[type="checkbox"]:focus,
186 205 select:focus {
187 206 .box-shadow(none); // override for file inputs
188   - outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
  207 + .tab-focus();
189 208 }
190 209
191 210
@@ -210,45 +229,13 @@ textarea[class*="span"],
210 229 margin-left: 0;
211 230 }
212 231
213   -// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
214   -.inputColumns(@columnSpan: 1) {
215   - width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10;
216   -}
217   -input,
218   -textarea,
219   -.uneditable-input {
220   - // Default columns
221   - &.span1 { .inputColumns(1); }
222   - &.span2 { .inputColumns(2); }
223   - &.span3 { .inputColumns(3); }
224   - &.span4 { .inputColumns(4); }
225   - &.span5 { .inputColumns(5); }
226   - &.span6 { .inputColumns(6); }
227   - &.span7 { .inputColumns(7); }
228   - &.span8 { .inputColumns(8); }
229   - &.span9 { .inputColumns(9); }
230   - &.span10 { .inputColumns(10); }
231   - &.span11 { .inputColumns(11); }
232   - &.span12 { .inputColumns(12); }
233   -}
234   -
235   -.selectColumns(@columnSpan: 1) {
236   - width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) + 10;
237   -}
238   -select {
239   - &.span1 { .selectColumns(1); }
240   - &.span2 { .selectColumns(2); }
241   - &.span3 { .selectColumns(3); }
242   - &.span4 { .selectColumns(4); }
243   - &.span5 { .selectColumns(5); }
244   - &.span6 { .selectColumns(6); }
245   - &.span7 { .selectColumns(7); }
246   - &.span8 { .selectColumns(8); }
247   - &.span9 { .selectColumns(9); }
248   - &.span10 { .selectColumns(10); }
249   - &.span11 { .selectColumns(11); }
250   - &.span12 { .selectColumns(12); }
251   -}
  232 +
  233 +
  234 +// GRID SIZING FOR INPUTS
  235 +// ----------------------
  236 +
  237 +#inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
  238 +
252 239
253 240
254 241
@@ -363,9 +350,10 @@ select:focus:required:invalid {
363 350 }
364 351
365 352 .help-inline {
366   - *position: relative; /* IE6-7 */
367   - *top: -5px; /* IE6-7 */
368   - display: inline;
  353 + display: inline-block;
  354 + .ie7-inline-block();
  355 + margin-bottom: 9px;
  356 + vertical-align: middle;
369 357 padding-left: 5px;
370 358 }
371 359
@@ -382,6 +370,10 @@ select:focus:required:invalid {
382 370 input,
383 371 .uneditable-input {
384 372 .border-radius(0 3px 3px 0);
  373 + &:focus {
  374 + position: relative;
  375 + z-index: 2;
  376 + }
385 377 }
386 378 .uneditable-input {
387 379 border-left-color: #ccc;
@@ -393,7 +385,7 @@ select:focus:required:invalid {
393 385 min-width: 16px;
394 386 height: @baseLineHeight;
395 387 margin-right: -1px;
396   - padding: 4px 4px 4px 5px;
  388 + padding: 4px 5px;
397 389 font-weight: normal;
398 390 line-height: @baseLineHeight;
399 391 color: @grayLight;
@@ -427,6 +419,15 @@ select:focus:required:invalid {
427 419 margin-left: -1px;
428 420 .border-radius(0 3px 3px 0);
429 421 }
  422 + input:first-child {
  423 + // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
  424 + // inherit the sum of its ancestors' margins.
  425 + *margin-left: -160px;
  426 +
  427 + &+.add-on {
  428 + *margin-left: -21px;
  429 + }
  430 + }
430 431 }
431 432
432 433
@@ -455,15 +456,27 @@ select:focus:required:invalid {
455 456 input,
456 457 textarea,
457 458 select,
  459 + .help-inline,
458 460 .uneditable-input {
459 461 display: inline-block;
460 462 margin-bottom: 0;
461 463 }
462 464 }
463 465 .form-search label,
464   -.form-inline label {
  466 +.form-inline label,
  467 +.form-search .input-append,
  468 +.form-inline .input-append,
  469 +.form-search .input-prepend,
  470 +.form-inline .input-prepend {
465 471 display: inline-block;
466 472 }
  473 +// Make the prepend and append add-on vertical-align: middle;
  474 +.form-search .input-append .add-on,
  475 +.form-inline .input-prepend .add-on,
  476 +.form-search .input-append .add-on,
  477 +.form-inline .input-prepend .add-on {
  478 + vertical-align: middle;
  479 +}
467 480
468 481 // Margin to space out fieldsets
469 482 .control-group {
@@ -474,9 +487,15 @@ select:focus:required:invalid {
474 487 // --------------------------
475 488
476 489 .form-horizontal {
  490 + // Legend collapses margin, so we're relegated to padding
  491 + legend + .control-group {
  492 + margin-top: @baseLineHeight;
  493 + -webkit-margin-top-collapse: separate;
  494 + }
477 495 // Increase spacing between groups
478 496 .control-group {
479 497 margin-bottom: @baseLineHeight;
  498 + .clearfix();
480 499 }
481 500 // Float the labels left
482 501 .control-group > label {
8 vendor/toolkit/twitter/bootstrap/grid.less
... ... @@ -0,0 +1,8 @@
  1 +// GRID SYSTEM
  2 +// -----------
  3 +
  4 +// Fixed (940px)
  5 +#gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
  6 +
  7 +// Fluid (940px)
  8 +#fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth);
20 vendor/toolkit/twitter/bootstrap/hero-unit.less
... ... @@ -0,0 +1,20 @@
  1 +// HERO UNIT
  2 +// ---------
  3 +
  4 +.hero-unit {
  5 + padding: 60px;
  6 + margin-bottom: 30px;
  7 + background-color: #f5f5f5;
  8 + .border-radius(6px);
  9 + h1 {
  10 + margin-bottom: 0;
  11 + font-size: 60px;
  12 + line-height: 1;
  13 + letter-spacing: -1px;
  14 + }
  15 + p {
  16 + font-size: 18px;
  17 + font-weight: 200;
  18 + line-height: @baseLineHeight * 1.5;
  19 + }
  20 +}
8 vendor/toolkit/twitter/bootstrap/labels.less
@@ -9,8 +9,8 @@
9 9 text-transform: uppercase;
10 10 background-color: @grayLight;
11 11 .border-radius(3px);
12   - &.important { background-color: #c43c35; }
13   - &.warning { background-color: @orange; }
14   - &.success { background-color: @green; }
15   - &.notice { background-color: lighten(@blue, 25%); }
16 12 }
  13 +.label-important { background-color: @errorText; }
  14 +.label-warning { background-color: @orange; }
  15 +.label-success { background-color: @successText; }
  16 +.label-info { background-color: @infoText; }
17 vendor/toolkit/twitter/bootstrap/layouts.less
... ... @@ -0,0 +1,17 @@
  1 +//
  2 +// Layouts
  3 +// Fixed-width and fluid (with sidebar) layouts
  4 +// --------------------------------------------
  5 +
  6 +
  7 +// Container (centered, fixed-width layouts)
  8 +.container {
  9 + .container-fixed();
  10 +}
  11 +
  12 +// Fluid layouts (left aligned, with sidebar, min- & max-width content)
  13 +.container-fluid {
  14 + padding-left: @gridGutterWidth;
  15 + padding-right: @gridGutterWidth;
  16 + .clearfix();
  17 +}
240 vendor/toolkit/twitter/bootstrap/mixins.less
@@ -7,7 +7,7 @@
7 7 // --------------------------------------------------
8 8
9 9 // Clearfix
10   -// -------------------------
  10 +// --------
11 11 // For clearing floats like a boss h5bp.com/q
12 12 .clearfix() {
13 13 *zoom: 1;
@@ -21,8 +21,18 @@
21 21 }
22 22 }
23 23
  24 +// Webkit-style focus
  25 +// ------------------
  26 +.tab-focus() {
  27 + // Default
  28 + outline: thin dotted;
  29 + // Webkit
  30 + outline: 5px auto -webkit-focus-ring-color;
  31 + outline-offset: -2px;
  32 +}
  33 +
24 34 // Center-align a block level element
25   -// -------------------------
  35 +// ----------------------------------
26 36 .center-block() {
27 37 display: block;
28 38 margin-left: auto;
@@ -30,12 +40,34 @@
30 40 }
31 41
32 42 // IE7 inline-block
33   -// -------------------------
  43 +// ----------------
34 44 .ie7-inline-block() {
35 45 *display: inline; /* IE7 inline-block hack */
36 46 *zoom: 1;
37 47 }
38 48
  49 +// IE7 likes to collapse whitespace on either side of the inline-block elements.
  50 +// Ems because we're attempting to match the width of a space character. Left
  51 +// version is for form buttons, which typically come after other elements, and
  52 +// right version is for icons, which come before. Applying both is ok, but it will
  53 +// mean that space between those elements will be .6em (~2 space characters) in IE7,
  54 +// instead of the 1 space in other browsers.
  55 +.ie7-restore-left-whitespace() {
  56 + *margin-left: .3em;
  57 +
  58 + &:first-child {
  59 + *margin-left: 0;
  60 + }
  61 +}
  62 +
  63 +.ie7-restore-right-whitespace() {
  64 + *margin-right: .3em;
  65 +
  66 + &:last-child {
  67 + *margin-left: 0;
  68 + }
  69 +}
  70 +
39 71 // Sizing shortcuts
40 72 // -------------------------
41 73 .size(@height: 5px, @width: 5px) {
@@ -101,29 +133,134 @@
101 133 // Site container
102 134 // -------------------------
103 135 .container-fixed() {
104   - width: @siteWidth;
  136 + width: @gridRowWidth;
105 137 margin-left: auto;
106 138 margin-right: auto;
107 139 .clearfix();
108 140 }
109 141
110   -// Columns and offseting
  142 +// Le grid system
111 143 // -------------------------
112   -.columns(@columns: 1) {
113   - width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
114   -}
115   -.offset(@columns: 1) {
116   - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);