bootstrap-generators 2.3.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +12 -2
  3. data/{LICENSE.txt → MIT-LICENSE} +1 -3
  4. data/README.md +19 -64
  5. data/Rakefile +24 -22
  6. data/bootstrap-generators.gemspec +3 -1
  7. data/lib/bootstrap-generators.rb +12 -1
  8. data/lib/bootstrap/generators/version.rb +1 -1
  9. data/lib/generators/bootstrap/install/install_generator.rb +9 -24
  10. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +498 -179
  11. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +620 -0
  12. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css → starter.css} +6 -6
  13. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.less → starter.less} +7 -7
  14. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.scss → starter.scss} +7 -8
  15. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +11 -9
  16. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +9 -8
  17. data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +50 -0
  18. data/lib/generators/bootstrap/install/templates/layouts/{hero.html.haml → starter.html.haml} +0 -0
  19. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +3 -3
  20. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +25 -25
  21. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +2 -2
  22. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +5 -5
  23. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +3 -3
  24. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +20 -19
  25. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +2 -2
  26. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +5 -5
  27. data/readme-template.md.erb +5 -48
  28. data/test/lib/generators/bootstrap/install_generator_test.rb +3 -33
  29. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  30. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +228 -0
  31. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  32. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  33. data/vendor/assets/javascripts/bootstrap-ie.js +2 -0
  34. data/vendor/assets/javascripts/bootstrap-ie/html5shiv.js +8 -0
  35. data/vendor/assets/javascripts/bootstrap-ie/respond.min.js +6 -0
  36. data/vendor/assets/javascripts/bootstrap.js +12 -13
  37. data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
  38. data/vendor/assets/javascripts/{bootstrap-alert.js → bootstrap/alert.js} +35 -36
  39. data/vendor/assets/javascripts/bootstrap/button.js +109 -0
  40. data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
  41. data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
  42. data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
  43. data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
  44. data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
  45. data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
  46. data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
  47. data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
  48. data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
  49. data/vendor/assets/stylesheets/bootstrap.css +4638 -4000
  50. data/vendor/twitter/bootstrap/less/alerts.less +46 -58
  51. data/vendor/twitter/bootstrap/less/badges.less +51 -0
  52. data/vendor/twitter/bootstrap/less/bootstrap.less +27 -31
  53. data/vendor/twitter/bootstrap/less/breadcrumbs.less +7 -8
  54. data/vendor/twitter/bootstrap/less/button-groups.less +173 -154
  55. data/vendor/twitter/bootstrap/less/buttons.less +97 -165
  56. data/vendor/twitter/bootstrap/less/carousel.less +115 -64
  57. data/vendor/twitter/bootstrap/less/close.less +20 -19
  58. data/vendor/twitter/bootstrap/less/code.less +17 -22
  59. data/vendor/twitter/bootstrap/less/component-animations.less +10 -3
  60. data/vendor/twitter/bootstrap/less/dropdowns.less +92 -147
  61. data/vendor/twitter/bootstrap/less/forms.less +224 -561
  62. data/vendor/twitter/bootstrap/less/glyphicons.less +232 -0
  63. data/vendor/twitter/bootstrap/less/grid.less +336 -11
  64. data/vendor/twitter/bootstrap/less/input-groups.less +127 -0
  65. data/vendor/twitter/bootstrap/less/jumbotron.less +40 -0
  66. data/vendor/twitter/bootstrap/less/labels.less +58 -0
  67. data/vendor/twitter/bootstrap/less/list-group.less +88 -0
  68. data/vendor/twitter/bootstrap/less/media.less +8 -7
  69. data/vendor/twitter/bootstrap/less/mixins.less +487 -466
  70. data/vendor/twitter/bootstrap/less/modals.less +98 -52
  71. data/vendor/twitter/bootstrap/less/navbar.less +507 -383
  72. data/vendor/twitter/bootstrap/less/navs.less +169 -349
  73. data/vendor/twitter/bootstrap/less/normalize.less +396 -0
  74. data/vendor/twitter/bootstrap/less/pager.less +45 -33
  75. data/vendor/twitter/bootstrap/less/pagination.less +65 -105
  76. data/vendor/twitter/bootstrap/less/panels.less +148 -0
  77. data/vendor/twitter/bootstrap/less/popovers.less +51 -51
  78. data/vendor/twitter/bootstrap/less/print.less +100 -0
  79. data/vendor/twitter/bootstrap/less/progress-bars.less +28 -55
  80. data/vendor/twitter/bootstrap/less/responsive-utilities.less +195 -34
  81. data/vendor/twitter/bootstrap/less/scaffolding.less +101 -24
  82. data/vendor/twitter/bootstrap/less/tables.less +170 -178
  83. data/vendor/twitter/bootstrap/less/theme.less +232 -0
  84. data/vendor/twitter/bootstrap/less/thumbnails.less +11 -33
  85. data/vendor/twitter/bootstrap/less/tooltip.less +45 -20
  86. data/vendor/twitter/bootstrap/less/type.less +100 -109
  87. data/vendor/twitter/bootstrap/less/utilities.less +19 -7
  88. data/vendor/twitter/bootstrap/less/variables.less +498 -179
  89. data/vendor/twitter/bootstrap/less/wells.less +7 -7
  90. data/vendor/twitter/bootstrap/sass/_alerts.scss +46 -58
  91. data/vendor/twitter/bootstrap/sass/_badges.scss +51 -0
  92. data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +8 -9
  93. data/vendor/twitter/bootstrap/sass/_button-groups.scss +173 -154
  94. data/vendor/twitter/bootstrap/sass/_buttons.scss +97 -165
  95. data/vendor/twitter/bootstrap/sass/_carousel.scss +116 -65
  96. data/vendor/twitter/bootstrap/sass/_close.scss +9 -8
  97. data/vendor/twitter/bootstrap/sass/_code.scss +16 -21
  98. data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -3
  99. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +94 -148
  100. data/vendor/twitter/bootstrap/sass/_forms.scss +220 -559
  101. data/vendor/twitter/bootstrap/sass/_glyphicons.scss +232 -0
  102. data/vendor/twitter/bootstrap/sass/_grid.scss +336 -11
  103. data/vendor/twitter/bootstrap/sass/_input-groups.scss +127 -0
  104. data/vendor/twitter/bootstrap/sass/_jumbotron.scss +40 -0
  105. data/vendor/twitter/bootstrap/sass/_labels.scss +58 -0
  106. data/vendor/twitter/bootstrap/sass/_list-group.scss +88 -0
  107. data/vendor/twitter/bootstrap/sass/_media.scss +8 -7
  108. data/vendor/twitter/bootstrap/sass/_mixins.scss +465 -433
  109. data/vendor/twitter/bootstrap/sass/_modals.scss +102 -52
  110. data/vendor/twitter/bootstrap/sass/_navbar.scss +511 -383
  111. data/vendor/twitter/bootstrap/sass/_navs.scss +169 -349
  112. data/vendor/twitter/bootstrap/sass/_normalize.scss +396 -0
  113. data/vendor/twitter/bootstrap/sass/_pager.scss +45 -33
  114. data/vendor/twitter/bootstrap/sass/_pagination.scss +65 -105
  115. data/vendor/twitter/bootstrap/sass/_panels.scss +148 -0
  116. data/vendor/twitter/bootstrap/sass/_popovers.scss +51 -51
  117. data/vendor/twitter/bootstrap/sass/_print.scss +100 -0
  118. data/vendor/twitter/bootstrap/sass/_progress-bars.scss +28 -55
  119. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +180 -45
  120. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +101 -24
  121. data/vendor/twitter/bootstrap/sass/_tables.scss +169 -168
  122. data/vendor/twitter/bootstrap/sass/_theme.scss +232 -0
  123. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +11 -33
  124. data/vendor/twitter/bootstrap/sass/_tooltip.scss +45 -20
  125. data/vendor/twitter/bootstrap/sass/_type.scss +101 -110
  126. data/vendor/twitter/bootstrap/sass/_utilities.scss +19 -22
  127. data/vendor/twitter/bootstrap/sass/_variables.scss +498 -179
  128. data/vendor/twitter/bootstrap/sass/_wells.scss +7 -7
  129. data/vendor/twitter/bootstrap/sass/bootstrap.scss +29 -33
  130. metadata +47 -56
  131. data/lib/bootstrap/generators/engine.rb +0 -14
  132. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +0 -301
  133. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -18
  134. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +0 -19
  135. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -19
  136. data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +0 -176
  137. data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +0 -24
  138. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +0 -13
  139. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +0 -10
  140. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +0 -80
  141. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +0 -94
  142. data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +0 -53
  143. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  144. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  145. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  146. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  147. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  148. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  149. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
  150. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  151. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  152. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  153. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  154. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  155. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  156. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  157. data/vendor/assets/stylesheets/bootstrap-responsive.css +0 -1109
  158. data/vendor/twitter/bootstrap/less/accordion.less +0 -34
  159. data/vendor/twitter/bootstrap/less/hero-unit.less +0 -25
  160. data/vendor/twitter/bootstrap/less/labels-badges.less +0 -84
  161. data/vendor/twitter/bootstrap/less/layouts.less +0 -16
  162. data/vendor/twitter/bootstrap/less/reset.less +0 -216
  163. data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +0 -28
  164. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +0 -193
  165. data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +0 -19
  166. data/vendor/twitter/bootstrap/less/responsive-navbar.less +0 -189
  167. data/vendor/twitter/bootstrap/less/responsive.less +0 -48
  168. data/vendor/twitter/bootstrap/less/sprites.less +0 -197
  169. data/vendor/twitter/bootstrap/sass/_accordion.scss +0 -34
  170. data/vendor/twitter/bootstrap/sass/_hero-unit.scss +0 -25
  171. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +0 -83
  172. data/vendor/twitter/bootstrap/sass/_layouts.scss +0 -16
  173. data/vendor/twitter/bootstrap/sass/_reset.scss +0 -216
  174. data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +0 -28
  175. data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +0 -193
  176. data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +0 -19
  177. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +0 -189
  178. data/vendor/twitter/bootstrap/sass/_sprites.scss +0 -197
  179. data/vendor/twitter/bootstrap/sass/responsive.scss +0 -48
@@ -0,0 +1,127 @@
1
+ //
2
+ // Input groups
3
+ // --------------------------------------------------
4
+
5
+ // Base styles
6
+ // -------------------------
7
+ .input-group {
8
+ position: relative; // For dropdowns
9
+ display: table;
10
+ border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11
+
12
+ // Undo padding and float of grid classes
13
+ &.col {
14
+ float: none;
15
+ padding-left: 0;
16
+ padding-right: 0;
17
+ }
18
+
19
+ .form-control {
20
+ width: 100%;
21
+ margin-bottom: 0;
22
+ }
23
+ }
24
+
25
+ // Sizing options
26
+ //
27
+ // Remix the default form control sizing classes into new ones for easier
28
+ // manipulation.
29
+
30
+ .input-group-lg > .form-control,
31
+ .input-group-lg > .input-group-addon,
32
+ .input-group-lg > .input-group-btn > .btn { @extend .input-lg; }
33
+ .input-group-sm > .form-control,
34
+ .input-group-sm > .input-group-addon,
35
+ .input-group-sm > .input-group-btn > .btn { @extend .input-sm; }
36
+
37
+
38
+ // Display as table-cell
39
+ // -------------------------
40
+ .input-group-addon,
41
+ .input-group-btn,
42
+ .input-group .form-control {
43
+ display: table-cell;
44
+
45
+ &:not(:first-child):not(:last-child) {
46
+ border-radius: 0;
47
+ }
48
+ }
49
+ // Addon and addon wrapper for buttons
50
+ .input-group-addon,
51
+ .input-group-btn {
52
+ width: 1%;
53
+ white-space: nowrap;
54
+ vertical-align: middle; // Match the inputs
55
+ }
56
+
57
+ // Text input groups
58
+ // -------------------------
59
+ .input-group-addon {
60
+ padding: $padding-base-vertical $padding-base-horizontal;
61
+ font-size: $font-size-base;
62
+ font-weight: normal;
63
+ line-height: 1;
64
+ text-align: center;
65
+ background-color: $input-group-addon-bg;
66
+ border: 1px solid $input-group-addon-border-color;
67
+ border-radius: $border-radius-base;
68
+
69
+ // Sizing
70
+ &.input-sm {
71
+ padding: $padding-small-vertical $padding-small-horizontal;
72
+ font-size: $font-size-small;
73
+ border-radius: $border-radius-small;
74
+ }
75
+ &.input-lg {
76
+ padding: $padding-large-vertical $padding-large-horizontal;
77
+ font-size: $font-size-large;
78
+ border-radius: $border-radius-large;
79
+ }
80
+
81
+ // Nuke default margins from checkboxes and radios to vertically center within.
82
+ input[type="radio"],
83
+ input[type="checkbox"] {
84
+ margin-top: 0;
85
+ }
86
+ }
87
+
88
+ // Reset rounded corners
89
+ .input-group .form-control:first-child,
90
+ .input-group-addon:first-child,
91
+ .input-group-btn:first-child > .btn,
92
+ .input-group-btn:first-child > .dropdown-toggle,
93
+ .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
94
+ @include border-right-radius(0);
95
+ }
96
+ .input-group-addon:first-child {
97
+ border-right: 0;
98
+ }
99
+ .input-group .form-control:last-child,
100
+ .input-group-addon:last-child,
101
+ .input-group-btn:last-child > .btn,
102
+ .input-group-btn:last-child > .dropdown-toggle,
103
+ .input-group-btn:first-child > .btn:not(:first-child) {
104
+ @include border-left-radius(0);
105
+ }
106
+ .input-group-addon:last-child {
107
+ border-left: 0;
108
+ }
109
+
110
+ // Button input groups
111
+ // -------------------------
112
+ .input-group-btn {
113
+ position: relative;
114
+ white-space: nowrap;
115
+ }
116
+ .input-group-btn > .btn {
117
+ position: relative;
118
+ // Jankily prevent input button groups from wrapping
119
+ + .btn {
120
+ margin-left: -4px;
121
+ }
122
+ // Bring the "active" button to the front
123
+ &:hover,
124
+ &:active {
125
+ z-index: 2;
126
+ }
127
+ }
@@ -0,0 +1,40 @@
1
+ //
2
+ // Jumbotron
3
+ // --------------------------------------------------
4
+
5
+
6
+ .jumbotron {
7
+ padding: $jumbotron-padding;
8
+ margin-bottom: $jumbotron-padding;
9
+ font-size: ($font-size-base * 1.5);
10
+ font-weight: 200;
11
+ line-height: ($line-height-base * 1.5);
12
+ color: $jumbotron-color;
13
+ background-color: $jumbotron-bg;
14
+
15
+ h1 {
16
+ line-height: 1;
17
+ color: $jumbotron-heading-color;
18
+ }
19
+ p {
20
+ line-height: 1.4;
21
+ }
22
+
23
+ .container & {
24
+ border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
25
+ }
26
+
27
+ @media screen and (min-width: $screen-tablet) {
28
+ padding-top: ($jumbotron-padding * 1.6);
29
+ padding-bottom: ($jumbotron-padding * 1.6);
30
+
31
+ .container & {
32
+ padding-left: ($jumbotron-padding * 2);
33
+ padding-right: ($jumbotron-padding * 2);
34
+ }
35
+
36
+ h1 {
37
+ font-size: ($font-size-base * 4.5);
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,58 @@
1
+ //
2
+ // Labels
3
+ // --------------------------------------------------
4
+
5
+ .label {
6
+ display: inline;
7
+ padding: .2em .6em .3em;
8
+ font-size: 75%;
9
+ font-weight: bold;
10
+ line-height: 1;
11
+ color: $label-color;
12
+ text-align: center;
13
+ white-space: nowrap;
14
+ vertical-align: baseline;
15
+ border-radius: .25em;
16
+
17
+ // Add hover effects, but only for links
18
+ &[href] {
19
+ &:hover,
20
+ &:focus {
21
+ color: $label-link-hover-color;
22
+ text-decoration: none;
23
+ cursor: pointer;
24
+ }
25
+ }
26
+
27
+ // Empty labels collapse automatically (not available in IE8)
28
+ &:empty {
29
+ display: none;
30
+ }
31
+ }
32
+
33
+ // Colors
34
+ // Contextual variations (linked labels get darker on :hover)
35
+
36
+ .label-default {
37
+ @include label-variant($label-default-bg);
38
+ }
39
+
40
+ .label-primary {
41
+ @include label-variant($label-primary-bg);
42
+ }
43
+
44
+ .label-success {
45
+ @include label-variant($label-success-bg);
46
+ }
47
+
48
+ .label-info {
49
+ @include label-variant($label-info-bg);
50
+ }
51
+
52
+ .label-warning {
53
+ @include label-variant($label-warning-bg);
54
+ }
55
+
56
+ .label-danger {
57
+ @include label-variant($label-danger-bg);
58
+ }
@@ -0,0 +1,88 @@
1
+ //
2
+ // List groups
3
+ // --------------------------------------------------
4
+
5
+ // Base class
6
+ //
7
+ // Easily usable on <ul>, <ol>, or <div>.
8
+ .list-group {
9
+ // No need to set list-style: none; since .list-group-item is block level
10
+ margin-bottom: 20px;
11
+ padding-left: 0; // reset padding because ul and ol
12
+ }
13
+
14
+ // Individual list items
15
+ // -------------------------
16
+
17
+ .list-group-item {
18
+ position: relative;
19
+ display: block;
20
+ padding: 10px 15px;
21
+ // Place the border on the list items and negative margin up for better styling
22
+ margin-bottom: -1px;
23
+ background-color: $list-group-bg;
24
+ border: 1px solid $list-group-border;
25
+
26
+ // Round the first and last items
27
+ &:first-child {
28
+ @include border-top-radius($list-group-border-radius);
29
+ }
30
+ &:last-child {
31
+ margin-bottom: 0;
32
+ @include border-bottom-radius($list-group-border-radius);
33
+ }
34
+
35
+ // Align badges within list items
36
+ > .badge {
37
+ float: right;
38
+ }
39
+ > .badge + .badge {
40
+ margin-right: 5px;
41
+ }
42
+
43
+ // Active class on item itself, not parent
44
+ &.active,
45
+ &.active:hover,
46
+ &.active:focus {
47
+ z-index: 2; // Place active items above their siblings for proper border styling
48
+ color: $list-group-active-color;
49
+ background-color: $list-group-active-bg;
50
+ border-color: $list-group-active-border;
51
+
52
+ // Force color to inherit for custom content
53
+ .list-group-item-heading {
54
+ color: inherit;
55
+ }
56
+ .list-group-item-text {
57
+ color: lighten($list-group-active-bg, 40%);
58
+ }
59
+ }
60
+ }
61
+
62
+ // Linked list items
63
+ a.list-group-item {
64
+ color: $list-group-link-color;
65
+
66
+ .list-group-item-heading {
67
+ color: $list-group-link-heading-color;
68
+ }
69
+
70
+ // Hover state
71
+ &:hover,
72
+ &:focus {
73
+ text-decoration: none;
74
+ background-color: $list-group-hover-bg;
75
+ }
76
+ }
77
+
78
+ // Custom content options
79
+ // -------------------------
80
+
81
+ .list-group-item-heading {
82
+ margin-top: 0;
83
+ margin-bottom: 5px;
84
+ }
85
+ .list-group-item-text {
86
+ margin-bottom: 0;
87
+ line-height: 1.3;
88
+ }
@@ -10,7 +10,6 @@
10
10
  .media,
11
11
  .media-body {
12
12
  overflow: hidden;
13
- *overflow: visible;
14
13
  zoom: 1;
15
14
  }
16
15
 
@@ -37,11 +36,13 @@
37
36
  // Media image alignment
38
37
  // -------------------------
39
38
 
40
- .media > .pull-left {
41
- margin-right: 10px;
42
- }
43
- .media > .pull-right {
44
- margin-left: 10px;
39
+ .media {
40
+ > .pull-left {
41
+ margin-right: 10px;
42
+ }
43
+ > .pull-right {
44
+ margin-left: 10px;
45
+ }
45
46
  }
46
47
 
47
48
 
@@ -50,6 +51,6 @@
50
51
 
51
52
  // Undo default ul/ol styles
52
53
  .media-list {
53
- margin-left: 0;
54
+ padding-left: 0;
54
55
  list-style: none;
55
56
  }
@@ -3,21 +3,24 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // UTILITY MIXINS
7
- // --------------------------------------------------
6
+ // Utilities
7
+ // -------------------------
8
8
 
9
9
  // Clearfix
10
- // --------
11
- // For clearing floats like a boss h5bp.com/q
12
- @mixin clearfix {
13
- *zoom: 1;
10
+ // Source: http://nicolasgallagher.com/micro-clearfix-hack/
11
+ //
12
+ // For modern browsers
13
+ // 1. The space content is one way to avoid an Opera bug when the
14
+ // contenteditable attribute is included anywhere else in the document.
15
+ // Otherwise it causes space to appear at the top and bottom of elements
16
+ // that are clearfixed.
17
+ // 2. The use of `table` rather than `block` is only necessary if using
18
+ // `:before` to contain the top-margins of child elements.
19
+ @mixin clearfix() {
14
20
  &:before,
15
21
  &:after {
16
- display: table;
17
- content: "";
18
- // Fixes Opera/contenteditable bug:
19
- // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
20
- line-height: 0;
22
+ content: " "; /* 1 */
23
+ display: table; /* 2 */
21
24
  }
22
25
  &:after {
23
26
  clear: both;
@@ -25,7 +28,6 @@
25
28
  }
26
29
 
27
30
  // Webkit-style focus
28
- // ------------------
29
31
  @mixin tab-focus() {
30
32
  // Default
31
33
  outline: thin dotted #333;
@@ -35,41 +37,14 @@
35
37
  }
36
38
 
37
39
  // Center-align a block level element
38
- // ----------------------------------
39
40
  @mixin center-block() {
40
41
  display: block;
41
42
  margin-left: auto;
42
43
  margin-right: auto;
43
44
  }
44
45
 
45
- // IE7 inline-block
46
- // ----------------
47
- @mixin ie7-inline-block() {
48
- *display: inline; /* IE7 inline-block hack */
49
- *zoom: 1;
50
- }
51
-
52
- // IE7 likes to collapse whitespace on either side of the inline-block elements.
53
- // Ems because we're attempting to match the width of a space character. Left
54
- // version is for form buttons, which typically come after other elements, and
55
- // right version is for icons, which come before. Applying both is ok, but it will
56
- // mean that space between those elements will be .6em (~2 space characters) in IE7,
57
- // instead of the 1 space in other browsers.
58
- @mixin ie7-restore-left-whitespace() {
59
- *margin-left: .3em;
60
-
61
- &:first-child {
62
- *margin-left: 0;
63
- }
64
- }
65
-
66
- @mixin ie7-restore-right-whitespace() {
67
- *margin-right: .3em;
68
- }
69
-
70
46
  // Sizing shortcuts
71
- // -------------------------
72
- @mixin size($height, $width) {
47
+ @mixin size($width, $height) {
73
48
  width: $width;
74
49
  height: $height;
75
50
  }
@@ -78,21 +53,14 @@
78
53
  }
79
54
 
80
55
  // Placeholder text
81
- // -------------------------
82
- @mixin placeholder($color: $placeholderText) {
83
- &:-moz-placeholder {
84
- color: $color;
85
- }
86
- &:-ms-input-placeholder {
87
- color: $color;
88
- }
89
- &::-webkit-input-placeholder {
90
- color: $color;
91
- }
56
+ @mixin placeholder($color: $input-color-placeholder) {
57
+ &:-moz-placeholder { color: $color; } // Firefox 4-18
58
+ &::-moz-placeholder { color: $color; } // Firefox 19+
59
+ &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
60
+ &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
92
61
  }
93
62
 
94
63
  // Text overflow
95
- // -------------------------
96
64
  // Requires inline-block or block for proper styling
97
65
  @mixin text-overflow() {
98
66
  overflow: hidden;
@@ -101,9 +69,8 @@
101
69
  }
102
70
 
103
71
  // CSS image replacement
104
- // -------------------------
105
72
  // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
106
- @mixin hide-text {
73
+ @mixin hide-text() {
107
74
  font: 0/0 a;
108
75
  color: transparent;
109
76
  text-shadow: none;
@@ -112,204 +79,83 @@
112
79
  }
113
80
 
114
81
 
115
- // FONTS
116
- // --------------------------------------------------
117
-
118
- @mixin font-family-serif() {
119
- font-family: $serifFontFamily;
120
- }
121
- @mixin font-family-sans-serif() {
122
- font-family: $sansFontFamily;
123
- }
124
- @mixin font-family-monospace() {
125
- font-family: $monoFontFamily;
126
- }
127
- @mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
128
- font-size: $size;
129
- font-weight: $weight;
130
- line-height: $lineHeight;
131
- }
132
- @mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
133
- @include font-family-serif();
134
- @include font-shorthand($size, $weight, $lineHeight);
135
- }
136
- @mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
137
- @include font-family-sans-serif();
138
- @include font-shorthand($size, $weight, $lineHeight);
139
- }
140
- @mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
141
- @include font-family-monospace();
142
- @include font-shorthand($size, $weight, $lineHeight);
143
- }
144
-
145
-
146
- // FORMS
147
- // --------------------------------------------------
148
-
149
- // Block level inputs
150
- @mixin input-block-level {
151
- display: block;
152
- width: 100%;
153
- min-height: $inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
154
- @include box-sizing(border-box); // Makes inputs behave like true block-level elements
155
- }
156
-
157
-
158
-
159
- // Mixin for form field states
160
- @mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
161
- // Set the text color
162
- .control-label,
163
- .help-block,
164
- .help-inline {
165
- color: $textColor;
166
- }
167
- // Style inputs accordingly
168
- .checkbox,
169
- .radio,
170
- input,
171
- select,
172
- textarea {
173
- color: $textColor;
174
- }
175
- input,
176
- select,
177
- textarea {
178
- border-color: $borderColor;
179
- @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
180
- &:focus {
181
- border-color: darken($borderColor, 10%);
182
- @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($borderColor, 20%));
183
- }
184
- }
185
- // Give a small background color for input-prepend/-append
186
- .input-prepend .add-on,
187
- .input-append .add-on {
188
- color: $textColor;
189
- background-color: $backgroundColor;
190
- border-color: $textColor;
191
- }
192
- }
193
-
194
-
195
82
 
196
83
  // CSS3 PROPERTIES
197
84
  // --------------------------------------------------
198
85
 
199
- // Border Radius
200
- @mixin border-radius($radius) {
201
- -webkit-border-radius: $radius;
202
- -moz-border-radius: $radius;
203
- border-radius: $radius;
204
- }
205
-
206
- // Single Corner Border Radius
207
- @mixin border-top-left-radius($radius) {
208
- -webkit-border-top-left-radius: $radius;
209
- -moz-border-radius-topleft: $radius;
210
- border-top-left-radius: $radius;
211
- }
212
- @mixin border-top-right-radius($radius) {
213
- -webkit-border-top-right-radius: $radius;
214
- -moz-border-radius-topright: $radius;
215
- border-top-right-radius: $radius;
216
- }
217
- @mixin border-bottom-right-radius($radius) {
218
- -webkit-border-bottom-right-radius: $radius;
219
- -moz-border-radius-bottomright: $radius;
220
- border-bottom-right-radius: $radius;
221
- }
222
- @mixin border-bottom-left-radius($radius) {
223
- -webkit-border-bottom-left-radius: $radius;
224
- -moz-border-radius-bottomleft: $radius;
225
- border-bottom-left-radius: $radius;
226
- }
227
-
228
- // Single Side Border Radius
86
+ // Single side border-radius
229
87
  @mixin border-top-radius($radius) {
230
- @include border-top-right-radius($radius);
231
- @include border-top-left-radius($radius);
88
+ border-top-right-radius: $radius;
89
+ border-top-left-radius: $radius;
232
90
  }
233
91
  @mixin border-right-radius($radius) {
234
- @include border-top-right-radius($radius);
235
- @include border-bottom-right-radius($radius);
92
+ border-bottom-right-radius: $radius;
93
+ border-top-right-radius: $radius;
236
94
  }
237
95
  @mixin border-bottom-radius($radius) {
238
- @include border-bottom-right-radius($radius);
239
- @include border-bottom-left-radius($radius);
96
+ border-bottom-right-radius: $radius;
97
+ border-bottom-left-radius: $radius;
240
98
  }
241
99
  @mixin border-left-radius($radius) {
242
- @include border-top-left-radius($radius);
243
- @include border-bottom-left-radius($radius);
100
+ border-bottom-left-radius: $radius;
101
+ border-top-left-radius: $radius;
244
102
  }
245
103
 
246
104
  // Drop shadows
247
105
  @mixin box-shadow($shadow...) {
248
- -webkit-box-shadow: $shadow;
249
- -moz-box-shadow: $shadow;
106
+ -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
250
107
  box-shadow: $shadow;
251
108
  }
252
109
 
253
110
  // Transitions
254
111
  @mixin transition($transition...) {
255
112
  -webkit-transition: $transition;
256
- -moz-transition: $transition;
257
- -o-transition: $transition;
258
113
  transition: $transition;
259
114
  }
260
115
  @mixin transition-delay($transition-delay) {
261
116
  -webkit-transition-delay: $transition-delay;
262
- -moz-transition-delay: $transition-delay;
263
- -o-transition-delay: $transition-delay;
264
117
  transition-delay: $transition-delay;
265
118
  }
266
119
  @mixin transition-duration($transition-duration) {
267
120
  -webkit-transition-duration: $transition-duration;
268
- -moz-transition-duration: $transition-duration;
269
- -o-transition-duration: $transition-duration;
270
121
  transition-duration: $transition-duration;
271
122
  }
123
+ @mixin transition-transform($transition...) {
124
+ -webkit-transition: -webkit-transform $transition;
125
+ -moz-transition: -moz-transform $transition;
126
+ -o-transition: -o-transform $transition;
127
+ transition: transform $transition;
128
+ }
272
129
 
273
130
  // Transformations
274
131
  @mixin rotate($degrees) {
275
132
  -webkit-transform: rotate($degrees);
276
- -moz-transform: rotate($degrees);
277
- -ms-transform: rotate($degrees);
278
- -o-transform: rotate($degrees);
133
+ -ms-transform: rotate($degrees); // IE9+
279
134
  transform: rotate($degrees);
280
135
  }
281
136
  @mixin scale($ratio) {
282
137
  -webkit-transform: scale($ratio);
283
- -moz-transform: scale($ratio);
284
- -ms-transform: scale($ratio);
285
- -o-transform: scale($ratio);
138
+ -ms-transform: scale($ratio); // IE9+
286
139
  transform: scale($ratio);
287
140
  }
288
141
  @mixin translate($x, $y) {
289
142
  -webkit-transform: translate($x, $y);
290
- -moz-transform: translate($x, $y);
291
- -ms-transform: translate($x, $y);
292
- -o-transform: translate($x, $y);
143
+ -ms-transform: translate($x, $y); // IE9+
293
144
  transform: translate($x, $y);
294
145
  }
295
146
  @mixin skew($x, $y) {
296
147
  -webkit-transform: skew($x, $y);
297
- -moz-transform: skew($x, $y);
298
- -ms-transform: skewX($x) skewY($y); // See https://github.com/twitter/bootstrap/issues/4885
299
- -o-transform: skew($x, $y);
148
+ -ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
300
149
  transform: skew($x, $y);
301
- -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319
302
150
  }
303
151
  @mixin translate3d($x, $y, $z) {
304
152
  -webkit-transform: translate3d($x, $y, $z);
305
- -moz-transform: translate3d($x, $y, $z);
306
- -o-transform: translate3d($x, $y, $z);
307
153
  transform: translate3d($x, $y, $z);
308
154
  }
309
155
 
310
156
  // Backface visibility
311
157
  // Prevent browsers from flickering when using CSS 3D transforms.
312
- // Default value is `visible`, but can be changed to `hidden
158
+ // Default value is `visible`, but can be changed to `hidden`
313
159
  // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
314
160
  @mixin backface-visibility($visibility){
315
161
  -webkit-backface-visibility: $visibility;
@@ -317,23 +163,6 @@
317
163
  backface-visibility: $visibility;
318
164
  }
319
165
 
320
- // Background clipping
321
- // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
322
- @mixin background-clip($clip) {
323
- -webkit-background-clip: $clip;
324
- -moz-background-clip: $clip;
325
- background-clip: $clip;
326
- }
327
-
328
- // Background sizing
329
- @mixin background-size($size) {
330
- -webkit-background-size: $size;
331
- -moz-background-size: $size;
332
- -o-background-size: $size;
333
- background-size: $size;
334
- }
335
-
336
-
337
166
  // Box sizing
338
167
  @mixin box-sizing($boxmodel) {
339
168
  -webkit-box-sizing: $boxmodel;
@@ -346,7 +175,7 @@
346
175
  @mixin user-select($select) {
347
176
  -webkit-user-select: $select;
348
177
  -moz-user-select: $select;
349
- -ms-user-select: $select;
178
+ -ms-user-select: $select; // IE10+
350
179
  -o-user-select: $select;
351
180
  user-select: $select;
352
181
  }
@@ -358,13 +187,13 @@
358
187
  }
359
188
 
360
189
  // CSS3 Content Columns
361
- @mixin content-columns($columnCount, $columnGap: $gridGutterWidth) {
362
- -webkit-column-count: $columnCount;
363
- -moz-column-count: $columnCount;
364
- column-count: $columnCount;
365
- -webkit-column-gap: $columnGap;
366
- -moz-column-gap: $columnGap;
367
- column-gap: $columnGap;
190
+ @mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
191
+ -webkit-column-count: $column-count;
192
+ -moz-column-count: $column-count;
193
+ column-count: $column-count;
194
+ -webkit-column-gap: $column-gap;
195
+ -moz-column-gap: $column-gap;
196
+ column-gap: $column-gap;
368
197
  }
369
198
 
370
199
  // Optional hyphenation
@@ -372,166 +201,327 @@
372
201
  word-wrap: break-word;
373
202
  -webkit-hyphens: $mode;
374
203
  -moz-hyphens: $mode;
375
- -ms-hyphens: $mode;
204
+ -ms-hyphens: $mode; // IE10+
376
205
  -o-hyphens: $mode;
377
206
  hyphens: $mode;
378
207
  }
379
208
 
380
209
  // Opacity
381
210
  @mixin opacity($opacity) {
382
- opacity: $opacity / 100;
383
- filter: alpha(opacity=$opacity);
211
+ opacity: $opacity;
212
+ // IE8 filter
213
+ $opacity-ie: ($opacity * 100);
214
+ filter: alpha(opacity=$opacity-ie);
384
215
  }
385
216
 
386
217
 
387
218
 
388
- // BACKGROUNDS
219
+ // GRADIENTS
389
220
  // --------------------------------------------------
390
221
 
391
- // Add an alphatransparency value to any background or border color (via Elyse Holladay)
392
- @mixin translucent-background($color: $white, $alpha: 1) {
393
- background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
394
- }
395
222
 
396
- @mixin translucent-border($color: $white, $alpha: 1) {
397
- border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
398
- @include background-clip(padding-box);
399
- }
400
223
 
401
- // Gradient Bar Colors for buttons and alerts
402
- @mixin gradientBar($primaryColor, $secondaryColor, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
403
- color: $textColor;
404
- text-shadow: $textShadow;
405
- @include gradient-vertical($primaryColor, $secondaryColor);
406
- border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
407
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fade-in(rgba(0,0,0,.1), 0.15);
224
+ // Horizontal gradient, from left to right
225
+ //
226
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
227
+ // Color stops are not available in IE9 and below.
228
+ @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
229
+ background-image: -webkit-gradient(linear, $start-percent top, $end-percent top, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
230
+ background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1+, Chrome 10+
231
+ background-image: -moz-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // FF 3.6+
232
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
233
+ background-repeat: repeat-x;
234
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
408
235
  }
409
236
 
410
- // Gradients
411
- @mixin gradient-horizontal($startColor: #555, $endColor: #333) {
412
- background-color: $endColor;
413
- background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
414
- background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
415
- background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
416
- background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
417
- background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
418
- background-repeat: repeat-x;
419
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=1); // IE9 and down
420
- }
421
- @mixin gradient-vertical($startColor: #555, $endColor: #333) {
422
- background-color: mix($startColor, $endColor, 60%);
423
- background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
424
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
425
- background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
426
- background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
427
- background-image: linear-gradient(to bottom, $startColor, $endColor); // Standard, IE10
237
+ // Vertical gradient, from top to bottom
238
+ //
239
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
240
+ // Color stops are not available in IE9 and below.
241
+ @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
242
+ background-image: -webkit-gradient(linear, left $start-percent, left $end-percent, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
243
+ background-image: -webkit-linear-gradient(top, $start-color, $start-percent, $end-color, $end-percent); // Safari 5.1+, Chrome 10+
244
+ background-image: -moz-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // FF 3.6+
245
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
428
246
  background-repeat: repeat-x;
429
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down
247
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
430
248
  }
431
- @mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
432
- background-color: $endColor;
249
+
250
+ @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
433
251
  background-repeat: repeat-x;
434
- background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
435
- background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
436
- background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
437
- background-image: linear-gradient($deg, $startColor, $endColor); // Standard, IE10
438
- }
439
- @mixin gradient-horizontal-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
440
- background-color: mix($midColor, $endColor, 80%);
441
- background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
442
- background-image: -webkit-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
443
- background-image: -moz-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
444
- background-image: -o-linear-gradient(left, $startColor, $midColor $colorStop, $endColor);
445
- background-image: linear-gradient(to right, $startColor, $midColor $colorStop, $endColor);
252
+ background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1+, Chrome 10+
253
+ background-image: -moz-linear-gradient($deg, $start-color, $end-color); // FF 3.6+
254
+ background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10
255
+ }
256
+ @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
257
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color));
258
+ background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
259
+ background-image: -moz-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
260
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
446
261
  background-repeat: no-repeat;
447
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
262
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
448
263
  }
449
-
450
- @mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
451
- background-color: mix($midColor, $endColor, 80%);
452
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
453
- background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
454
- background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
455
- background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
456
- background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
264
+ @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
265
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color));
266
+ background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
267
+ background-image: -moz-linear-gradient(top, $start-color, $mid-color $color-stop, $end-color);
268
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
457
269
  background-repeat: no-repeat;
458
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
459
- }
460
- @mixin gradient-radial($innerColor: #555, $outerColor: #333) {
461
- background-color: $outerColor;
462
- background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
463
- background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
464
- background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
465
- background-image: -o-radial-gradient(circle, $innerColor, $outerColor);
270
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
271
+ }
272
+ @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
273
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($inner-color), to($outer-color));
274
+ background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
275
+ background-image: -moz-radial-gradient(circle, $inner-color, $outer-color);
276
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
466
277
  background-repeat: no-repeat;
467
278
  }
468
279
  @mixin gradient-striped($color: #555, $angle: 45deg) {
469
- background-color: $color;
470
280
  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
471
281
  background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
472
282
  background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
473
- background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
474
283
  background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
475
284
  }
476
285
 
477
286
  // Reset filters for IE
287
+ //
288
+ // When you need to remove a gradient background, do not forget to use this to reset
289
+ // the IE filter for IE9 and below.
478
290
  @mixin reset-filter() {
479
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
291
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
480
292
  }
481
293
 
482
294
 
483
295
 
296
+ // Retina images
297
+ //
298
+ // Short retina mixin for setting background-image and -size
299
+
300
+ @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
301
+ background-image: url("#{$file-1x}");
302
+
303
+ @media
304
+ only screen and (-webkit-min-device-pixel-ratio: 2),
305
+ only screen and ( min--moz-device-pixel-ratio: 2),
306
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
307
+ only screen and ( min-device-pixel-ratio: 2),
308
+ only screen and ( min-resolution: 192dpi),
309
+ only screen and ( min-resolution: 2dppx) {
310
+ background-image: url("#{$file-2x}");
311
+ background-size: $width-1x $height-1x;
312
+ }
313
+ }
314
+
315
+
316
+ // Responsive image
317
+ //
318
+ // Keep images from scaling beyond the width of their parents.
319
+
320
+ @mixin img-responsive($display: block) {
321
+ display: $display;
322
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
323
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
324
+ }
325
+
326
+
484
327
  // COMPONENT MIXINS
485
328
  // --------------------------------------------------
486
329
 
487
330
  // Horizontal dividers
488
331
  // -------------------------
489
332
  // Dividers (basically an hr) within dropdowns and nav lists
490
- @mixin nav-divider($top: #e5e5e5, $bottom: $white) {
491
- // IE7 needs a set width since we gave a height. Restricting just
492
- // to IE7 to keep the 1px left/right space in other browsers.
493
- // It is unclear where IE is getting the extra space that we need
494
- // to negative-margin away, but so it goes.
495
- *width: 100%;
333
+ @mixin nav-divider($color: #e5e5e5) {
496
334
  height: 1px;
497
- margin: (($baseLineHeight / 2) - 1) 1px; // 8px 1px
498
- *margin: -5px 0 5px;
335
+ margin: (($line-height-computed / 2) - 1) 0;
499
336
  overflow: hidden;
500
- background-color: $top;
501
- border-bottom: 1px solid $bottom;
337
+ background-color: $color;
338
+ }
339
+
340
+ // Panels
341
+ // -------------------------
342
+ @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
343
+ border-color: $border;
344
+ & > .panel-heading {
345
+ color: $heading-text-color;
346
+ background-color: $heading-bg-color;
347
+ border-color: $heading-border;
348
+ + .panel-collapse .panel-body {
349
+ border-top-color: $border;
350
+ }
351
+ }
352
+ & > .panel-footer {
353
+ + .panel-collapse .panel-body {
354
+ border-bottom-color: $border;
355
+ }
356
+ }
502
357
  }
503
358
 
504
- // Button backgrounds
505
- // ------------------
506
- @mixin buttonBackground($startColor, $endColor, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
507
- // gradientBar will set the background to a pleasing blend of these, to support IE<=9
508
- @include gradientBar($startColor, $endColor, $textColor, $textShadow);
509
- *background-color: $endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
510
- @include reset-filter();
359
+ // Alerts
360
+ // -------------------------
361
+ @mixin alert-variant($background, $border, $text-color) {
362
+ background-color: $background;
363
+ border-color: $border;
364
+ color: $text-color;
365
+ hr {
366
+ border-top-color: darken($border, 5%);
367
+ }
368
+ .alert-link {
369
+ color: darken($text-color, 10%);
370
+ }
371
+ }
372
+
373
+ // Tables
374
+ // -------------------------
375
+ @mixin table-row-variant($state, $background, $border) {
376
+ // Exact selectors below required to override `.table-striped` and prevent
377
+ // inheritance to nested tables.
378
+ .table > thead > tr,
379
+ .table > tbody > tr,
380
+ .table > tfoot > tr {
381
+ > td.#{$state},
382
+ > th.#{$state},
383
+ &.#{$state} > td,
384
+ &.#{$state} > th {
385
+ background-color: $background;
386
+ border-color: $border;
387
+ }
388
+ }
511
389
 
512
- // in these cases the gradient won't cover the background, so we override
513
- &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
514
- color: $textColor;
515
- background-color: $endColor;
516
- *background-color: darken($endColor, 5%);
390
+ // Hover states for `.table-hover`
391
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
392
+ .table-hover > tbody > tr {
393
+ > td.#{$state}:hover,
394
+ > th.#{$state}:hover,
395
+ &.#{$state}:hover > td {
396
+ background-color: darken($background, 5%);
397
+ border-color: darken($border, 5%);
398
+ }
517
399
  }
400
+ }
518
401
 
519
- // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
402
+ // Button variants
403
+ // -------------------------
404
+ // Easily pump out default styles, as well as :hover, :focus, :active,
405
+ // and disabled options for all buttons
406
+ @mixin button-variant($color, $background, $border) {
407
+ color: $color;
408
+ background-color: $background;
409
+ border-color: $border;
410
+
411
+ &:hover,
412
+ &:focus,
520
413
  &:active,
521
414
  &.active {
522
- background-color: darken($endColor, 10%) \9;
415
+ color: $color;
416
+ background-color: darken($background, 8%);
417
+ border-color: darken($border, 12%);
418
+ }
419
+ .open & { &.dropdown-toggle {
420
+ color: $color;
421
+ background-color: darken($background, 8%);
422
+ border-color: darken($border, 12%);
423
+ } }
424
+ &:active,
425
+ &.active {
426
+ background-image: none;
427
+ }
428
+ .open & { &.dropdown-toggle {
429
+ background-image: none;
430
+ } }
431
+ &.disabled,
432
+ &[disabled],
433
+ fieldset[disabled] & {
434
+ &,
435
+ &:hover,
436
+ &:focus,
437
+ &:active,
438
+ &.active {
439
+ background-color: $background;
440
+ border-color: $border
441
+ }
442
+ }
443
+ }
444
+
445
+ // Button sizes
446
+ // -------------------------
447
+ @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
448
+ padding: $padding-vertical $padding-horizontal;
449
+ font-size: $font-size;
450
+ line-height: $line-height;
451
+ border-radius: $border-radius;
452
+ }
453
+
454
+ // Pagination
455
+ // -------------------------
456
+ @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
457
+ > li {
458
+ > a,
459
+ > span {
460
+ padding: $padding-vertical $padding-horizontal;
461
+ font-size: $font-size;
462
+ }
463
+ &:first-child {
464
+ > a,
465
+ > span {
466
+ @include border-left-radius($border-radius);
467
+ }
468
+ }
469
+ &:last-child {
470
+ > a,
471
+ > span {
472
+ @include border-right-radius($border-radius);
473
+ }
474
+ }
475
+ }
476
+ }
477
+
478
+ // Labels
479
+ // -------------------------
480
+ @mixin label-variant($color) {
481
+ background-color: $color;
482
+ &[href] {
483
+ &:hover,
484
+ &:focus {
485
+ background-color: darken($color, 10%);
486
+ }
523
487
  }
524
488
  }
525
489
 
526
490
  // Navbar vertical align
527
491
  // -------------------------
528
492
  // Vertically center elements in the navbar.
529
- // Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
530
- @mixin navbarVerticalAlign($elementHeight) {
531
- margin-top: ($navbarHeight - $elementHeight) / 2;
493
+ // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
494
+ @mixin navbar-vertical-align($element-height) {
495
+ margin-top: (($navbar-height - $element-height) / 2);
496
+ margin-bottom: (($navbar-height - $element-height) / 2);
532
497
  }
533
498
 
499
+ // Progress bars
500
+ // -------------------------
501
+ @mixin progress-bar-variant($color) {
502
+ background-color: $color;
503
+ .progress-striped & {
504
+ @include gradient-striped($color);
505
+ }
506
+ }
534
507
 
508
+ // Responsive utilities
509
+ // -------------------------
510
+ // More easily include all the states for responsive-utilities.less.
511
+ // $parent hack because sass doesn't support tr& (without space)
512
+ @mixin responsive-visibility($parent) {
513
+ #{$parent} { display: block !important; }
514
+ tr#{$parent} { display: table-row !important; }
515
+ th#{$parent},
516
+ td#{$parent} { display: table-cell !important; }
517
+ }
518
+
519
+ @mixin responsive-invisibility($parent) {
520
+ #{$parent} { display: none !important; }
521
+ tr#{$parent} { display: none !important; }
522
+ th#{$parent},
523
+ td#{$parent} { display: none !important; }
524
+ }
535
525
 
536
526
  // Grid System
537
527
  // -----------
@@ -540,157 +530,199 @@
540
530
  @mixin container-fixed() {
541
531
  margin-right: auto;
542
532
  margin-left: auto;
533
+ padding-left: ($grid-gutter-width / 2);
534
+ padding-right: ($grid-gutter-width / 2);
543
535
  @include clearfix();
544
536
  }
545
537
 
546
- // Table columns
547
- @mixin tableColumns($columnSpan: 1) {
548
- float: none; // undo default grid column styles
549
- width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
550
- margin-left: 0; // undo default grid column styles
551
- }
552
-
553
- // Make a Grid
554
- // Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
555
- @mixin makeRow() {
556
- margin-left: $gridGutterWidth * -1;
538
+ // Creates a wrapper for a series of columns
539
+ @mixin make-row($gutter: $grid-gutter-width) {
540
+ margin-left: ($gutter / -2);
541
+ margin-right: ($gutter / -2);
557
542
  @include clearfix();
558
543
  }
559
- @mixin makeColumn($columns: 1, $offset: 0) {
560
- float: left;
561
- margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
562
- width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
563
- }
564
-
565
- // The Grid
566
- @mixin grid-core($gridColumnWidth, $gridGutterWidth) {
567
- .row {
568
- margin-left: $gridGutterWidth * -1;
569
- @include clearfix();
570
- }
571
544
 
572
- [class*="span"] {
545
+ // Generate the extra small columns
546
+ @mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
547
+ position: relative;
548
+ float: left;
549
+ width: percentage(($columns / $grid-columns));
550
+ // Prevent columns from collapsing when empty
551
+ min-height: 1px;
552
+ // Inner gutter via padding
553
+ padding-left: ($gutter / 2);
554
+ padding-right: ($gutter / 2);
555
+ }
556
+
557
+ // Generate the small columns
558
+ @mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
559
+ position: relative;
560
+ // Prevent columns from collapsing when empty
561
+ min-height: 1px;
562
+ // Inner gutter via padding
563
+ padding-left: ($gutter / 2);
564
+ padding-right: ($gutter / 2);
565
+
566
+ // Calculate width based on number of columns available
567
+ @media (min-width: $screen-sm) {
573
568
  float: left;
574
- min-height: 1px; // prevent collapsing columns
575
- margin-left: $gridGutterWidth;
569
+ width: percentage(($columns / $grid-columns));
576
570
  }
571
+ }
577
572
 
578
- // Set the container width, and override it for fixed navbars in media queries
579
- .container,
580
- .navbar-static-top .container,
581
- .navbar-fixed-top .container,
582
- .navbar-fixed-bottom .container {
583
- @include grid-core-span($gridColumns, $gridColumnWidth, $gridGutterWidth);
573
+ // Generate the small column offsets
574
+ @mixin make-sm-column-offset($columns) {
575
+ @media (min-width: $screen-sm) {
576
+ margin-left: percentage(($columns / $grid-columns));
584
577
  }
585
-
586
- // generate .spanX and .offsetX
587
- @include grid-core-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
588
- @include grid-core-offset-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
589
578
  }
590
-
591
- @mixin grid-core-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
592
- @for $i from 1 through $gridColumns {
593
- .span#{$i} { @include grid-core-span($i, $gridColumnWidth, $gridGutterWidth); }
579
+ @mixin make-sm-column-push($columns) {
580
+ @media (min-width: $screen-sm) {
581
+ left: percentage(($columns / $grid-columns));
594
582
  }
595
583
  }
596
-
597
- @mixin grid-core-offset-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
598
- @for $i from 1 through $gridColumns {
599
- .offset#{$i} { @include grid-core-offset($i, $gridColumnWidth, $gridGutterWidth); }
584
+ @mixin make-sm-column-pull($columns) {
585
+ @media (min-width: $screen-sm) {
586
+ right: percentage(($columns / $grid-columns));
600
587
  }
601
588
  }
602
589
 
603
- @mixin grid-core-span($columns, $gridColumnWidth, $gridGutterWidth) {
604
- width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
605
- }
590
+ // Generate the medium columns
591
+ @mixin make-md-column($columns, $gutter: $grid-gutter-width) {
592
+ position: relative;
593
+ // Prevent columns from collapsing when empty
594
+ min-height: 1px;
595
+ // Inner gutter via padding
596
+ padding-left: ($gutter / 2);
597
+ padding-right: ($gutter / 2);
606
598
 
607
- @mixin grid-core-offset($columns, $gridColumnWidth, $gridGutterWidth) {
608
- margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns + 1));
599
+ // Calculate width based on number of columns available
600
+ @media (min-width: $screen-md) {
601
+ float: left;
602
+ width: percentage(($columns / $grid-columns));
603
+ }
609
604
  }
610
605
 
611
-
612
-
613
- @mixin grid-fluid($fluidGridColumnWidth, $fluidGridGutterWidth) {
614
- .row-fluid {
615
- width: 100%;
616
- @include clearfix();
617
- [class*="span"] {
618
- @include input-block-level();
619
- float: left;
620
- margin-left: $fluidGridGutterWidth;
621
- *margin-left: $fluidGridGutterWidth - (.5 / $gridRowWidth * 100px * 1%);
622
- }
623
- [class*="span"]:first-child {
624
- margin-left: 0;
625
- }
626
-
627
- // Space grid-sized controls properly if multiple per line
628
- .controls-row [class*="span"] + [class*="span"] {
629
- margin-left: $fluidGridGutterWidth;
630
- }
631
-
632
- // generate .spanX and .offsetX
633
- @include grid-fluid-span-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
634
- @include grid-fluid-offset-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
606
+ // Generate the large column offsets
607
+ @mixin make-md-column-offset($columns) {
608
+ @media (min-width: $screen-md) {
609
+ margin-left: percentage(($columns / $grid-columns));
635
610
  }
636
611
  }
637
-
638
- @mixin grid-fluid-span-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
639
- @for $i from 1 through $gridColumns {
640
- .span#{$i} { @include grid-fluid-span($i, $fluidGridColumnWidth, $fluidGridGutterWidth); }
612
+ @mixin make-md-column-push($columns) {
613
+ @media (min-width: $screen-md) {
614
+ left: percentage(($columns / $grid-columns));
641
615
  }
642
616
  }
643
-
644
- @mixin grid-fluid-offset-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
645
- @for $i from 1 through $gridColumns {
646
- .offset#{$i} { @include grid-fluid-offset($i, $fluidGridColumnWidth, $fluidGridGutterWidth); }
647
- .offset#{$i}:first-child { @include grid-fluid-offset-first-child($i, $fluidGridColumnWidth, $fluidGridGutterWidth); }
617
+ @mixin make-md-column-pull($columns) {
618
+ @media (min-width: $screen-md) {
619
+ right: percentage(($columns / $grid-columns));
648
620
  }
649
621
  }
650
622
 
651
- @mixin grid-fluid-span($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
652
- width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
653
- *width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%);
654
- }
623
+ // Generate the large columns
624
+ @mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
625
+ position: relative;
626
+ // Prevent columns from collapsing when empty
627
+ min-height: 1px;
628
+ // Inner gutter via padding
629
+ padding-left: ($gutter / 2);
630
+ padding-right: ($gutter / 2);
655
631
 
656
- @mixin grid-fluid-offset($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
657
- margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) + ($fluidGridGutterWidth * 2);
658
- *margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + ($fluidGridGutterWidth * 2) - (.5 / $gridRowWidth * 100px * 1%);
632
+ // Calculate width based on number of columns available
633
+ @media (min-width: $screen-lg) {
634
+ float: left;
635
+ width: percentage(($columns / $grid-columns));
636
+ }
659
637
  }
660
638
 
661
- @mixin grid-fluid-offset-first-child($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
662
- margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) + ($fluidGridGutterWidth);
663
- *margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + $fluidGridGutterWidth - (.5 / $gridRowWidth * 100px * 1%);
639
+ // Generate the large column offsets
640
+ @mixin make-lg-column-offset($columns) {
641
+ @media (min-width: $screen-lg) {
642
+ margin-left: percentage(($columns / $grid-columns));
643
+ }
644
+ }
645
+ @mixin make-lg-column-push($columns) {
646
+ @media (min-width: $screen-lg) {
647
+ left: percentage(($columns / $grid-columns));
648
+ }
649
+ }
650
+ @mixin make-lg-column-pull($columns) {
651
+ @media (min-width: $screen-lg) {
652
+ right: percentage(($columns / $grid-columns));
653
+ }
664
654
  }
665
655
 
666
656
 
657
+ // Form validation states
658
+ //
659
+ // Used in forms.less to generate the form validation CSS for warnings, errors,
660
+ // and successes.
667
661
 
668
- @mixin grid-input($gridColumnWidth, $gridGutterWidth) {
669
- input,
670
- textarea,
671
- .uneditable-input {
672
- margin-left: 0; // override margin-left from core grid system
662
+ @mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
663
+ // Color the label and help text
664
+ .help-block,
665
+ .control-label {
666
+ color: $text-color;
673
667
  }
674
-
675
- // Space grid-sized controls properly if multiple per line
676
- .controls-row [class*="span"] + [class*="span"] {
677
- margin-left: $gridGutterWidth;
668
+ // Set the border and box shadow on specific inputs to match
669
+ .form-control {
670
+ border-color: $border-color;
671
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
672
+ &:focus {
673
+ border-color: darken($border-color, 10%);
674
+ $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
675
+ @include box-shadow($shadow);
676
+ }
677
+ }
678
+ // Set validation states also for addons
679
+ .input-group-addon {
680
+ color: $text-color;
681
+ border-color: $border-color;
682
+ background-color: $background-color;
678
683
  }
679
-
680
- // generate .spanX
681
- @include grid-input-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
682
684
  }
683
685
 
684
- @mixin grid-input-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
685
- @for $i from 1 through $gridColumns {
686
- input.span#{$i},
687
- textarea.span#{$i},
688
- .uneditable-input.span#{$i} {
689
- @include grid-input-span($i, $gridColumnWidth, $gridGutterWidth);
690
- }
686
+ // Form control focus state
687
+ //
688
+ // Generate a customized focus state and for any input with the specified color,
689
+ // which defaults to the `$input-focus-border` variable.
690
+ //
691
+ // We highly encourage you to not customize the default value, but instead use
692
+ // this to tweak colors on an as-needed basis. This aesthetic change is based on
693
+ // WebKit's default styles, but applicable to a wider range of browsers. Its
694
+ // usability and accessibility should be taken into account with any change.
695
+ //
696
+ // Example usage: change the default blue border and shadow to white for better
697
+ // contrast against a dark gray background.
698
+
699
+ @mixin form-control-focus($color: $input-border-focus) {
700
+ $color-rgba: rgba(red($color), green($color), blue($color), .6);
701
+ &:focus {
702
+ border-color: $color;
703
+ outline: 0;
704
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
691
705
  }
692
706
  }
693
707
 
694
- @mixin grid-input-span($columns, $gridColumnWidth, $gridGutterWidth) {
695
- width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 14;
708
+ // Form control sizing
709
+ //
710
+ // Relative text size, padding, and border-radii changes for form controls. For
711
+ // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
712
+ // element gets special love because it's special, and that's a fact!
713
+
714
+ @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
715
+ #{$parent} { height: $input-height;
716
+ padding: $padding-vertical $padding-horizontal;
717
+ font-size: $font-size;
718
+ line-height: $line-height;
719
+ border-radius: $border-radius; }
720
+ select#{$parent} {
721
+ height: $input-height;
722
+ line-height: $input-height;
723
+ }
724
+
725
+ textarea#{$parent} {
726
+ height: auto;
727
+ }
696
728
  }