twitter-bootstrap-rails 2.2.8 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +229 -322
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  5. data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  6. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  7. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  9. data/app/assets/javascripts/twitter/bootstrap.js +12 -13
  10. data/app/assets/javascripts/twitter/bootstrap/affix.js +162 -0
  11. data/app/assets/javascripts/twitter/bootstrap/alert.js +94 -0
  12. data/app/assets/javascripts/twitter/bootstrap/button.js +120 -0
  13. data/app/assets/javascripts/twitter/bootstrap/carousel.js +237 -0
  14. data/app/assets/javascripts/twitter/bootstrap/collapse.js +211 -0
  15. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +165 -0
  16. data/app/assets/javascripts/twitter/bootstrap/modal.js +337 -0
  17. data/app/assets/javascripts/twitter/bootstrap/popover.js +108 -0
  18. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +172 -0
  19. data/app/assets/javascripts/twitter/bootstrap/tab.js +155 -0
  20. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +514 -0
  21. data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
  22. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  23. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  24. data/app/helpers/bootstrap_flash_helper.rb +14 -7
  25. data/app/helpers/form_errors_helper.rb +22 -0
  26. data/app/helpers/glyph_helper.rb +12 -6
  27. data/app/helpers/modal_helper.rb +26 -22
  28. data/app/helpers/navbar_helper.rb +47 -32
  29. data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
  30. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
  31. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  32. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
  33. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +9 -18
  34. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
  35. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  36. data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
  37. data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
  38. data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
  39. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  40. data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
  41. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
  42. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
  43. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  44. data/lib/generators/bootstrap/themed/templates/index.html.erb +4 -2
  45. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -2
  46. data/lib/generators/bootstrap/themed/templates/index.html.slim +6 -5
  47. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  48. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  49. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  50. data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
  51. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  52. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  53. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  54. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  55. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
  56. data/lib/twitter/bootstrap/rails/engine.rb +17 -10
  57. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  58. data/spec/lib/breadcrumbs_spec.rb +99 -0
  59. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
  60. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  61. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  62. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  63. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  64. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
  65. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  66. data/spec/spec_helper.rb +11 -1
  67. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
  68. data/vendor/static-source/bootstrap.less +0 -1
  69. data/vendor/static-source/sprites.less +1 -1
  70. data/vendor/toolkit/twitter/bootstrap/alerts.less +51 -57
  71. data/vendor/toolkit/twitter/bootstrap/badges.less +66 -0
  72. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +29 -36
  73. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  74. data/vendor/toolkit/twitter/bootstrap/button-groups.less +167 -152
  75. data/vendor/toolkit/twitter/bootstrap/buttons.less +107 -169
  76. data/vendor/toolkit/twitter/bootstrap/carousel.less +177 -65
  77. data/vendor/toolkit/twitter/bootstrap/close.less +21 -19
  78. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  79. data/vendor/toolkit/twitter/bootstrap/component-animations.less +15 -4
  80. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +120 -152
  81. data/vendor/toolkit/twitter/bootstrap/forms.less +470 -547
  82. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +305 -0
  83. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  84. data/vendor/toolkit/twitter/bootstrap/input-groups.less +171 -0
  85. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +54 -0
  86. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  87. data/vendor/toolkit/twitter/bootstrap/list-group.less +130 -0
  88. data/vendor/toolkit/twitter/bootstrap/media.less +40 -29
  89. data/vendor/toolkit/twitter/bootstrap/mixins.less +37 -699
  90. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  91. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +9 -0
  92. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  93. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +65 -0
  94. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  95. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  96. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  97. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  98. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  99. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  100. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  101. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  102. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  103. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +30 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  105. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  106. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +24 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +9 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +227 -0
  120. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  121. data/vendor/toolkit/twitter/bootstrap/navbar.less +547 -384
  122. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  123. data/vendor/toolkit/twitter/bootstrap/normalize.less +424 -0
  124. data/vendor/toolkit/twitter/bootstrap/pager.less +45 -34
  125. data/vendor/toolkit/twitter/bootstrap/pagination.less +71 -105
  126. data/vendor/toolkit/twitter/bootstrap/panels.less +271 -0
  127. data/vendor/toolkit/twitter/bootstrap/popovers.less +66 -68
  128. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  129. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +40 -75
  130. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +35 -0
  131. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  132. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +131 -23
  133. data/vendor/toolkit/twitter/bootstrap/tables.less +172 -182
  134. data/vendor/toolkit/twitter/bootstrap/theme.less +291 -0
  135. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +27 -44
  136. data/vendor/toolkit/twitter/bootstrap/tooltip.less +58 -27
  137. data/vendor/toolkit/twitter/bootstrap/type.less +209 -154
  138. data/vendor/toolkit/twitter/bootstrap/utilities.less +32 -7
  139. data/vendor/toolkit/twitter/bootstrap/variables.less +784 -216
  140. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  141. metadata +156 -141
  142. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  143. data/app/assets/fonts/fontawesome-webfont.svg +0 -399
  144. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  145. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  146. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  147. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  148. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  149. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  150. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  151. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  152. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  153. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  154. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  155. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  156. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  157. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  158. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  159. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  161. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -787
  162. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
  163. data/test/lib/breadcrumbs_test.rb +0 -75
  164. data/test/test_helper.rb +0 -11
  165. data/vendor/static-source/fontawesome.less +0 -9
  166. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  167. data/vendor/toolkit/fontawesome/core.less +0 -129
  168. data/vendor/toolkit/fontawesome/extras.less +0 -93
  169. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  170. data/vendor/toolkit/fontawesome/font-awesome.less +0 -33
  171. data/vendor/toolkit/fontawesome/icons.less +0 -381
  172. data/vendor/toolkit/fontawesome/mixins.less +0 -48
  173. data/vendor/toolkit/fontawesome/path.less +0 -14
  174. data/vendor/toolkit/fontawesome/variables.less +0 -735
  175. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  176. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  177. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  178. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  179. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  180. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  181. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  182. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  183. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  184. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  185. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -0,0 +1,54 @@
1
+ //
2
+ // Jumbotron
3
+ // --------------------------------------------------
4
+
5
+
6
+ .jumbotron {
7
+ padding-top: @jumbotron-padding;
8
+ padding-bottom: @jumbotron-padding;
9
+ margin-bottom: @jumbotron-padding;
10
+ color: @jumbotron-color;
11
+ background-color: @jumbotron-bg;
12
+
13
+ h1,
14
+ .h1 {
15
+ color: @jumbotron-heading-color;
16
+ }
17
+
18
+ p {
19
+ margin-bottom: (@jumbotron-padding / 2);
20
+ font-size: @jumbotron-font-size;
21
+ font-weight: 200;
22
+ }
23
+
24
+ > hr {
25
+ border-top-color: darken(@jumbotron-bg, 10%);
26
+ }
27
+
28
+ .container &,
29
+ .container-fluid & {
30
+ border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
31
+ padding-left: (@grid-gutter-width / 2);
32
+ padding-right: (@grid-gutter-width / 2);
33
+ }
34
+
35
+ .container {
36
+ max-width: 100%;
37
+ }
38
+
39
+ @media screen and (min-width: @screen-sm-min) {
40
+ padding-top: (@jumbotron-padding * 1.6);
41
+ padding-bottom: (@jumbotron-padding * 1.6);
42
+
43
+ .container &,
44
+ .container-fluid & {
45
+ padding-left: (@jumbotron-padding * 2);
46
+ padding-right: (@jumbotron-padding * 2);
47
+ }
48
+
49
+ h1,
50
+ .h1 {
51
+ font-size: @jumbotron-heading-font-size;
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,64 @@
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
+ a& {
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
+ // Quick fix for labels in buttons
33
+ .btn & {
34
+ position: relative;
35
+ top: -1px;
36
+ }
37
+ }
38
+
39
+ // Colors
40
+ // Contextual variations (linked labels get darker on :hover)
41
+
42
+ .label-default {
43
+ .label-variant(@label-default-bg);
44
+ }
45
+
46
+ .label-primary {
47
+ .label-variant(@label-primary-bg);
48
+ }
49
+
50
+ .label-success {
51
+ .label-variant(@label-success-bg);
52
+ }
53
+
54
+ .label-info {
55
+ .label-variant(@label-info-bg);
56
+ }
57
+
58
+ .label-warning {
59
+ .label-variant(@label-warning-bg);
60
+ }
61
+
62
+ .label-danger {
63
+ .label-variant(@label-danger-bg);
64
+ }
@@ -0,0 +1,130 @@
1
+ //
2
+ // List groups
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base class
7
+ //
8
+ // Easily usable on <ul>, <ol>, or <div>.
9
+
10
+ .list-group {
11
+ // No need to set list-style: none; since .list-group-item is block level
12
+ margin-bottom: 20px;
13
+ padding-left: 0; // reset padding because ul and ol
14
+ }
15
+
16
+
17
+ // Individual list items
18
+ //
19
+ // Use on `li`s or `div`s within the `.list-group` parent.
20
+
21
+ .list-group-item {
22
+ position: relative;
23
+ display: block;
24
+ padding: 10px 15px;
25
+ // Place the border on the list items and negative margin up for better styling
26
+ margin-bottom: -1px;
27
+ background-color: @list-group-bg;
28
+ border: 1px solid @list-group-border;
29
+
30
+ // Round the first and last items
31
+ &:first-child {
32
+ .border-top-radius(@list-group-border-radius);
33
+ }
34
+ &:last-child {
35
+ margin-bottom: 0;
36
+ .border-bottom-radius(@list-group-border-radius);
37
+ }
38
+ }
39
+
40
+
41
+ // Interactive list items
42
+ //
43
+ // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
44
+ // Includes an extra `.active` modifier class for showing selected items.
45
+
46
+ a.list-group-item,
47
+ button.list-group-item {
48
+ color: @list-group-link-color;
49
+
50
+ .list-group-item-heading {
51
+ color: @list-group-link-heading-color;
52
+ }
53
+
54
+ // Hover state
55
+ &:hover,
56
+ &:focus {
57
+ text-decoration: none;
58
+ color: @list-group-link-hover-color;
59
+ background-color: @list-group-hover-bg;
60
+ }
61
+ }
62
+
63
+ button.list-group-item {
64
+ width: 100%;
65
+ text-align: left;
66
+ }
67
+
68
+ .list-group-item {
69
+ // Disabled state
70
+ &.disabled,
71
+ &.disabled:hover,
72
+ &.disabled:focus {
73
+ background-color: @list-group-disabled-bg;
74
+ color: @list-group-disabled-color;
75
+ cursor: @cursor-disabled;
76
+
77
+ // Force color to inherit for custom content
78
+ .list-group-item-heading {
79
+ color: inherit;
80
+ }
81
+ .list-group-item-text {
82
+ color: @list-group-disabled-text-color;
83
+ }
84
+ }
85
+
86
+ // Active class on item itself, not parent
87
+ &.active,
88
+ &.active:hover,
89
+ &.active:focus {
90
+ z-index: 2; // Place active items above their siblings for proper border styling
91
+ color: @list-group-active-color;
92
+ background-color: @list-group-active-bg;
93
+ border-color: @list-group-active-border;
94
+
95
+ // Force color to inherit for custom content
96
+ .list-group-item-heading,
97
+ .list-group-item-heading > small,
98
+ .list-group-item-heading > .small {
99
+ color: inherit;
100
+ }
101
+ .list-group-item-text {
102
+ color: @list-group-active-text-color;
103
+ }
104
+ }
105
+ }
106
+
107
+
108
+ // Contextual variants
109
+ //
110
+ // Add modifier classes to change text and background color on individual items.
111
+ // Organizationally, this must come after the `:hover` states.
112
+
113
+ .list-group-item-variant(success; @state-success-bg; @state-success-text);
114
+ .list-group-item-variant(info; @state-info-bg; @state-info-text);
115
+ .list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
116
+ .list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
117
+
118
+
119
+ // Custom content options
120
+ //
121
+ // Extra classes for creating well-formatted content within `.list-group-item`s.
122
+
123
+ .list-group-item-heading {
124
+ margin-top: 0;
125
+ margin-bottom: 5px;
126
+ }
127
+ .list-group-item-text {
128
+ margin-bottom: 0;
129
+ line-height: 1.3;
130
+ }
@@ -1,55 +1,66 @@
1
- // Media objects
2
- // Source: http://stubbornella.org/content/?p=497
3
- // --------------------------------------------------
4
-
1
+ .media {
2
+ // Proper spacing between instances of .media
3
+ margin-top: 15px;
5
4
 
6
- // Common styles
7
- // -------------------------
5
+ &:first-child {
6
+ margin-top: 0;
7
+ }
8
+ }
8
9
 
9
- // Clear the floats
10
10
  .media,
11
11
  .media-body {
12
- overflow: hidden;
13
- *overflow: visible;
14
12
  zoom: 1;
13
+ overflow: hidden;
15
14
  }
16
15
 
17
- // Proper spacing between instances of .media
18
- .media,
19
- .media .media {
20
- margin-top: 15px;
21
- }
22
- .media:first-child {
23
- margin-top: 0;
16
+ .media-body {
17
+ width: 10000px;
24
18
  }
25
19
 
26
- // For images and videos, set to block
27
20
  .media-object {
28
21
  display: block;
22
+
23
+ // Fix collapse in webkit from max-width: 100% and display: table-cell.
24
+ &.img-thumbnail {
25
+ max-width: none;
26
+ }
29
27
  }
30
28
 
31
- // Reset margins on headings for tighter default spacing
32
- .media-heading {
33
- margin: 0 0 5px;
29
+ .media-right,
30
+ .media > .pull-right {
31
+ padding-left: 10px;
34
32
  }
35
33
 
34
+ .media-left,
35
+ .media > .pull-left {
36
+ padding-right: 10px;
37
+ }
36
38
 
37
- // Media image alignment
38
- // -------------------------
39
+ .media-left,
40
+ .media-right,
41
+ .media-body {
42
+ display: table-cell;
43
+ vertical-align: top;
44
+ }
39
45
 
40
- .media > .pull-left {
41
- margin-right: 10px;
46
+ .media-middle {
47
+ vertical-align: middle;
42
48
  }
43
- .media > .pull-right {
44
- margin-left: 10px;
49
+
50
+ .media-bottom {
51
+ vertical-align: bottom;
45
52
  }
46
53
 
54
+ // Reset margins on headings for tighter default spacing
55
+ .media-heading {
56
+ margin-top: 0;
57
+ margin-bottom: 5px;
58
+ }
47
59
 
48
60
  // Media list variation
49
- // -------------------------
50
-
61
+ //
51
62
  // Undo default ul/ol styles
52
63
  .media-list {
53
- margin-left: 0;
64
+ padding-left: 0;
54
65
  list-style: none;
55
66
  }
@@ -1,702 +1,40 @@
1
- //
2
1
  // Mixins
3
2
  // --------------------------------------------------
4
3
 
5
-
6
- // UTILITY MIXINS
7
- // --------------------------------------------------
8
-
9
- // Clearfix
10
- // --------
11
- // For clearing floats like a boss h5bp.com/q
12
- .clearfix {
13
- *zoom: 1;
14
- &:before,
15
- &:after {
16
- display: table;
17
- content: "";
18
- // Fixes Opera/contenteditable bug:
19
- // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
20
- line-height: 0;
21
- }
22
- &:after {
23
- clear: both;
24
- }
25
- }
26
-
27
- // Webkit-style focus
28
- // ------------------
29
- .tab-focus() {
30
- // Default
31
- outline: thin dotted #333;
32
- // Webkit
33
- outline: 5px auto -webkit-focus-ring-color;
34
- outline-offset: -2px;
35
- }
36
-
37
- // Center-align a block level element
38
- // ----------------------------------
39
- .center-block() {
40
- display: block;
41
- margin-left: auto;
42
- margin-right: auto;
43
- }
44
-
45
- // IE7 inline-block
46
- // ----------------
47
- .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
- .ie7-restore-left-whitespace() {
59
- *margin-left: .3em;
60
-
61
- &:first-child {
62
- *margin-left: 0;
63
- }
64
- }
65
-
66
- .ie7-restore-right-whitespace() {
67
- *margin-right: .3em;
68
- }
69
-
70
- // Sizing shortcuts
71
- // -------------------------
72
- .size(@height, @width) {
73
- width: @width;
74
- height: @height;
75
- }
76
- .square(@size) {
77
- .size(@size, @size);
78
- }
79
-
80
- // Placeholder text
81
- // -------------------------
82
- .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
- }
92
- }
93
-
94
- // Text overflow
95
- // -------------------------
96
- // Requires inline-block or block for proper styling
97
- .text-overflow() {
98
- overflow: hidden;
99
- text-overflow: ellipsis;
100
- white-space: nowrap;
101
- }
102
-
103
- // CSS image replacement
104
- // -------------------------
105
- // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
106
- .hide-text {
107
- font: 0/0 a;
108
- color: transparent;
109
- text-shadow: none;
110
- background-color: transparent;
111
- border: 0;
112
- }
113
-
114
-
115
- // FONTS
116
- // --------------------------------------------------
117
-
118
- #font {
119
- #family {
120
- .serif() {
121
- font-family: @serifFontFamily;
122
- }
123
- .sans-serif() {
124
- font-family: @sansFontFamily;
125
- }
126
- .monospace() {
127
- font-family: @monoFontFamily;
128
- }
129
- }
130
- .shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
131
- font-size: @size;
132
- font-weight: @weight;
133
- line-height: @lineHeight;
134
- }
135
- .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
136
- #font > #family > .serif;
137
- #font > .shorthand(@size, @weight, @lineHeight);
138
- }
139
- .sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
140
- #font > #family > .sans-serif;
141
- #font > .shorthand(@size, @weight, @lineHeight);
142
- }
143
- .monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
144
- #font > #family > .monospace;
145
- #font > .shorthand(@size, @weight, @lineHeight);
146
- }
147
- }
148
-
149
-
150
- // FORMS
151
- // --------------------------------------------------
152
-
153
- // Block level inputs
154
- .input-block-level {
155
- display: block;
156
- width: 100%;
157
- min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
158
- .box-sizing(border-box); // Makes inputs behave like true block-level elements
159
- }
160
-
161
-
162
-
163
- // Mixin for form field states
164
- .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
165
- // Set the text color
166
- .control-label,
167
- .help-block,
168
- .help-inline {
169
- color: @textColor;
170
- }
171
- // Style inputs accordingly
172
- .checkbox,
173
- .radio,
174
- input,
175
- select,
176
- textarea {
177
- color: @textColor;
178
- }
179
- input,
180
- select,
181
- textarea {
182
- border-color: @borderColor;
183
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
184
- &:focus {
185
- border-color: darken(@borderColor, 10%);
186
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%);
187
- .box-shadow(@shadow);
188
- }
189
- }
190
- // Give a small background color for input-prepend/-append
191
- .input-prepend .add-on,
192
- .input-append .add-on {
193
- color: @textColor;
194
- background-color: @backgroundColor;
195
- border-color: @textColor;
196
- }
197
- }
198
-
199
-
200
-
201
- // CSS3 PROPERTIES
202
- // --------------------------------------------------
203
-
204
- // Border Radius
205
- .border-radius(@radius) {
206
- -webkit-border-radius: @radius;
207
- -moz-border-radius: @radius;
208
- border-radius: @radius;
209
- }
210
-
211
- // Single Corner Border Radius
212
- .border-top-left-radius(@radius) {
213
- -webkit-border-top-left-radius: @radius;
214
- -moz-border-radius-topleft: @radius;
215
- border-top-left-radius: @radius;
216
- }
217
- .border-top-right-radius(@radius) {
218
- -webkit-border-top-right-radius: @radius;
219
- -moz-border-radius-topright: @radius;
220
- border-top-right-radius: @radius;
221
- }
222
- .border-bottom-right-radius(@radius) {
223
- -webkit-border-bottom-right-radius: @radius;
224
- -moz-border-radius-bottomright: @radius;
225
- border-bottom-right-radius: @radius;
226
- }
227
- .border-bottom-left-radius(@radius) {
228
- -webkit-border-bottom-left-radius: @radius;
229
- -moz-border-radius-bottomleft: @radius;
230
- border-bottom-left-radius: @radius;
231
- }
232
-
233
- // Single Side Border Radius
234
- .border-top-radius(@radius) {
235
- .border-top-right-radius(@radius);
236
- .border-top-left-radius(@radius);
237
- }
238
- .border-right-radius(@radius) {
239
- .border-top-right-radius(@radius);
240
- .border-bottom-right-radius(@radius);
241
- }
242
- .border-bottom-radius(@radius) {
243
- .border-bottom-right-radius(@radius);
244
- .border-bottom-left-radius(@radius);
245
- }
246
- .border-left-radius(@radius) {
247
- .border-top-left-radius(@radius);
248
- .border-bottom-left-radius(@radius);
249
- }
250
-
251
- // Drop shadows
252
- .box-shadow(@shadow) {
253
- -webkit-box-shadow: @shadow;
254
- -moz-box-shadow: @shadow;
255
- box-shadow: @shadow;
256
- }
257
-
258
- // Transitions
259
- .transition(@transition) {
260
- -webkit-transition: @transition;
261
- -moz-transition: @transition;
262
- -o-transition: @transition;
263
- transition: @transition;
264
- }
265
- .transition-delay(@transition-delay) {
266
- -webkit-transition-delay: @transition-delay;
267
- -moz-transition-delay: @transition-delay;
268
- -o-transition-delay: @transition-delay;
269
- transition-delay: @transition-delay;
270
- }
271
- .transition-duration(@transition-duration) {
272
- -webkit-transition-duration: @transition-duration;
273
- -moz-transition-duration: @transition-duration;
274
- -o-transition-duration: @transition-duration;
275
- transition-duration: @transition-duration;
276
- }
277
-
278
- // Transformations
279
- .rotate(@degrees) {
280
- -webkit-transform: rotate(@degrees);
281
- -moz-transform: rotate(@degrees);
282
- -ms-transform: rotate(@degrees);
283
- -o-transform: rotate(@degrees);
284
- transform: rotate(@degrees);
285
- }
286
- .scale(@ratio) {
287
- -webkit-transform: scale(@ratio);
288
- -moz-transform: scale(@ratio);
289
- -ms-transform: scale(@ratio);
290
- -o-transform: scale(@ratio);
291
- transform: scale(@ratio);
292
- }
293
- .translate(@x, @y) {
294
- -webkit-transform: translate(@x, @y);
295
- -moz-transform: translate(@x, @y);
296
- -ms-transform: translate(@x, @y);
297
- -o-transform: translate(@x, @y);
298
- transform: translate(@x, @y);
299
- }
300
- .skew(@x, @y) {
301
- -webkit-transform: skew(@x, @y);
302
- -moz-transform: skew(@x, @y);
303
- -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885
304
- -o-transform: skew(@x, @y);
305
- transform: skew(@x, @y);
306
- -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319
307
- }
308
- .translate3d(@x, @y, @z) {
309
- -webkit-transform: translate3d(@x, @y, @z);
310
- -moz-transform: translate3d(@x, @y, @z);
311
- -o-transform: translate3d(@x, @y, @z);
312
- transform: translate3d(@x, @y, @z);
313
- }
314
-
315
- // Backface visibility
316
- // Prevent browsers from flickering when using CSS 3D transforms.
317
- // Default value is `visible`, but can be changed to `hidden
318
- // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
319
- .backface-visibility(@visibility){
320
- -webkit-backface-visibility: @visibility;
321
- -moz-backface-visibility: @visibility;
322
- backface-visibility: @visibility;
323
- }
324
-
325
- // Background clipping
326
- // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
327
- .background-clip(@clip) {
328
- -webkit-background-clip: @clip;
329
- -moz-background-clip: @clip;
330
- background-clip: @clip;
331
- }
332
-
333
- // Background sizing
334
- .background-size(@size) {
335
- -webkit-background-size: @size;
336
- -moz-background-size: @size;
337
- -o-background-size: @size;
338
- background-size: @size;
339
- }
340
-
341
-
342
- // Box sizing
343
- .box-sizing(@boxmodel) {
344
- -webkit-box-sizing: @boxmodel;
345
- -moz-box-sizing: @boxmodel;
346
- box-sizing: @boxmodel;
347
- }
348
-
349
- // User select
350
- // For selecting text on the page
351
- .user-select(@select) {
352
- -webkit-user-select: @select;
353
- -moz-user-select: @select;
354
- -ms-user-select: @select;
355
- -o-user-select: @select;
356
- user-select: @select;
357
- }
358
-
359
- // Resize anything
360
- .resizable(@direction) {
361
- resize: @direction; // Options: horizontal, vertical, both
362
- overflow: auto; // Safari fix
363
- }
364
-
365
- // CSS3 Content Columns
366
- .content-columns(@columnCount, @columnGap: @gridGutterWidth) {
367
- -webkit-column-count: @columnCount;
368
- -moz-column-count: @columnCount;
369
- column-count: @columnCount;
370
- -webkit-column-gap: @columnGap;
371
- -moz-column-gap: @columnGap;
372
- column-gap: @columnGap;
373
- }
374
-
375
- // Optional hyphenation
376
- .hyphens(@mode: auto) {
377
- word-wrap: break-word;
378
- -webkit-hyphens: @mode;
379
- -moz-hyphens: @mode;
380
- -ms-hyphens: @mode;
381
- -o-hyphens: @mode;
382
- hyphens: @mode;
383
- }
384
-
385
- // Opacity
386
- .opacity(@opacity) {
387
- opacity: @opacity / 100;
388
- filter: ~"alpha(opacity=@{opacity})";
389
- }
390
-
391
-
392
-
393
- // BACKGROUNDS
394
- // --------------------------------------------------
395
-
396
- // Add an alphatransparency value to any background or border color (via Elyse Holladay)
397
- #translucent {
398
- .background(@color: @white, @alpha: 1) {
399
- background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
400
- }
401
- .border(@color: @white, @alpha: 1) {
402
- border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
403
- .background-clip(padding-box);
404
- }
405
- }
406
-
407
- // Gradient Bar Colors for buttons and alerts
408
- .gradientBar(@primaryColor, @secondaryColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
409
- color: @textColor;
410
- text-shadow: @textShadow;
411
- #gradient > .vertical(@primaryColor, @secondaryColor);
412
- border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
413
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
414
- }
415
-
416
- // Gradients
417
- #gradient {
418
- .horizontal(@startColor: #555, @endColor: #333) {
419
- background-color: @endColor;
420
- background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
421
- background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
422
- background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
423
- background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
424
- background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10
425
- background-repeat: repeat-x;
426
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down
427
- }
428
- .vertical(@startColor: #555, @endColor: #333) {
429
- background-color: mix(@startColor, @endColor, 60%);
430
- background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
431
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
432
- background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
433
- background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
434
- background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10
435
- background-repeat: repeat-x;
436
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down
437
- }
438
- .directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
439
- background-color: @endColor;
440
- background-repeat: repeat-x;
441
- background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
442
- background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
443
- background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
444
- background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10
445
- }
446
- .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
447
- background-color: mix(@midColor, @endColor, 80%);
448
- background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
449
- background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
450
- background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
451
- background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
452
- background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor);
453
- background-repeat: no-repeat;
454
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
455
- }
456
-
457
- .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
458
- background-color: mix(@midColor, @endColor, 80%);
459
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
460
- background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
461
- background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
462
- background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
463
- background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
464
- background-repeat: no-repeat;
465
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
466
- }
467
- .radial(@innerColor: #555, @outerColor: #333) {
468
- background-color: @outerColor;
469
- background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
470
- background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
471
- background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
472
- background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
473
- background-repeat: no-repeat;
474
- }
475
- .striped(@color: #555, @angle: 45deg) {
476
- background-color: @color;
477
- 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));
478
- 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);
479
- 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);
480
- 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);
481
- 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);
482
- }
483
- }
484
- // Reset filters for IE
485
- .reset-filter() {
486
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
487
- }
488
-
489
-
490
-
491
- // COMPONENT MIXINS
492
- // --------------------------------------------------
493
-
494
- // Horizontal dividers
495
- // -------------------------
496
- // Dividers (basically an hr) within dropdowns and nav lists
497
- .nav-divider(@top: #e5e5e5, @bottom: @white) {
498
- // IE7 needs a set width since we gave a height. Restricting just
499
- // to IE7 to keep the 1px left/right space in other browsers.
500
- // It is unclear where IE is getting the extra space that we need
501
- // to negative-margin away, but so it goes.
502
- *width: 100%;
503
- height: 1px;
504
- margin: ((@baseLineHeight / 2) - 1) 1px; // 8px 1px
505
- *margin: -5px 0 5px;
506
- overflow: hidden;
507
- background-color: @top;
508
- border-bottom: 1px solid @bottom;
509
- }
510
-
511
- // Button backgrounds
512
- // ------------------
513
- .buttonBackground(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
514
- // gradientBar will set the background to a pleasing blend of these, to support IE<=9
515
- .gradientBar(@startColor, @endColor, @textColor, @textShadow);
516
- *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
517
- .reset-filter();
518
-
519
- // in these cases the gradient won't cover the background, so we override
520
- &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
521
- color: @textColor;
522
- background-color: @endColor;
523
- *background-color: darken(@endColor, 5%);
524
- }
525
-
526
- // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
527
- &:active,
528
- &.active {
529
- background-color: darken(@endColor, 10%) e("\9");
530
- }
531
- }
532
-
533
- // Navbar vertical align
534
- // -------------------------
535
- // Vertically center elements in the navbar.
536
- // Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
537
- .navbarVerticalAlign(@elementHeight) {
538
- margin-top: (@navbarHeight - @elementHeight) / 2;
539
- }
540
-
541
-
542
-
543
- // Grid System
544
- // -----------
545
-
546
- // Centered container element
547
- .container-fixed() {
548
- margin-right: auto;
549
- margin-left: auto;
550
- .clearfix();
551
- }
552
-
553
- // Table columns
554
- .tableColumns(@columnSpan: 1) {
555
- float: none; // undo default grid column styles
556
- width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
557
- margin-left: 0; // undo default grid column styles
558
- }
559
-
560
- // Make a Grid
561
- // Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
562
- .makeRow() {
563
- margin-left: @gridGutterWidth * -1;
564
- .clearfix();
565
- }
566
- .makeColumn(@columns: 1, @offset: 0) {
567
- float: left;
568
- margin-left: (@gridColumnWidth * @offset) + (@gridGutterWidth * (@offset - 1)) + (@gridGutterWidth * 2);
569
- width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
570
- }
571
-
572
- // The Grid
573
- #grid {
574
-
575
- .core (@gridColumnWidth, @gridGutterWidth) {
576
-
577
- .spanX (@index) when (@index > 0) {
578
- .span@{index} { .span(@index); }
579
- .spanX(@index - 1);
580
- }
581
- .spanX (0) {}
582
-
583
- .offsetX (@index) when (@index > 0) {
584
- .offset@{index} { .offset(@index); }
585
- .offsetX(@index - 1);
586
- }
587
- .offsetX (0) {}
588
-
589
- .offset (@columns) {
590
- margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns + 1));
591
- }
592
-
593
- .span (@columns) {
594
- width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
595
- }
596
-
597
- .row {
598
- margin-left: @gridGutterWidth * -1;
599
- .clearfix();
600
- }
601
-
602
- [class*="span"] {
603
- float: left;
604
- min-height: 1px; // prevent collapsing columns
605
- margin-left: @gridGutterWidth;
606
- }
607
-
608
- // Set the container width, and override it for fixed navbars in media queries
609
- .container,
610
- .navbar-static-top .container,
611
- .navbar-fixed-top .container,
612
- .navbar-fixed-bottom .container { .span(@gridColumns); }
613
-
614
- // generate .spanX and .offsetX
615
- .spanX (@gridColumns);
616
- .offsetX (@gridColumns);
617
-
618
- }
619
-
620
- .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {
621
-
622
- .spanX (@index) when (@index > 0) {
623
- .span@{index} { .span(@index); }
624
- .spanX(@index - 1);
625
- }
626
- .spanX (0) {}
627
-
628
- .offsetX (@index) when (@index > 0) {
629
- .offset@{index} { .offset(@index); }
630
- .offset@{index}:first-child { .offsetFirstChild(@index); }
631
- .offsetX(@index - 1);
632
- }
633
- .offsetX (0) {}
634
-
635
- .offset (@columns) {
636
- margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth*2);
637
- *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + (@fluidGridGutterWidth*2) - (.5 / @gridRowWidth * 100 * 1%);
638
- }
639
-
640
- .offsetFirstChild (@columns) {
641
- margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth);
642
- *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
643
- }
644
-
645
- .span (@columns) {
646
- width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
647
- *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
648
- }
649
-
650
- .row-fluid {
651
- width: 100%;
652
- .clearfix();
653
- [class*="span"] {
654
- .input-block-level();
655
- float: left;
656
- margin-left: @fluidGridGutterWidth;
657
- *margin-left: @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
658
- }
659
- [class*="span"]:first-child {
660
- margin-left: 0;
661
- }
662
-
663
- // Space grid-sized controls properly if multiple per line
664
- .controls-row [class*="span"] + [class*="span"] {
665
- margin-left: @fluidGridGutterWidth;
666
- }
667
-
668
- // generate .spanX and .offsetX
669
- .spanX (@gridColumns);
670
- .offsetX (@gridColumns);
671
- }
672
-
673
- }
674
-
675
- .input(@gridColumnWidth, @gridGutterWidth) {
676
-
677
- .spanX (@index) when (@index > 0) {
678
- input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); }
679
- .spanX(@index - 1);
680
- }
681
- .spanX (0) {}
682
-
683
- .span(@columns) {
684
- width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 14;
685
- }
686
-
687
- input,
688
- textarea,
689
- .uneditable-input {
690
- margin-left: 0; // override margin-left from core grid system
691
- }
692
-
693
- // Space grid-sized controls properly if multiple per line
694
- .controls-row [class*="span"] + [class*="span"] {
695
- margin-left: @gridGutterWidth;
696
- }
697
-
698
- // generate .spanX
699
- .spanX (@gridColumns);
700
-
701
- }
702
- }
4
+ // Utilities
5
+ @import "mixins/hide-text.less";
6
+ @import "mixins/opacity.less";
7
+ @import "mixins/image.less";
8
+ @import "mixins/labels.less";
9
+ @import "mixins/reset-filter.less";
10
+ @import "mixins/resize.less";
11
+ @import "mixins/responsive-visibility.less";
12
+ @import "mixins/size.less";
13
+ @import "mixins/tab-focus.less";
14
+ @import "mixins/reset-text.less";
15
+ @import "mixins/text-emphasis.less";
16
+ @import "mixins/text-overflow.less";
17
+ @import "mixins/vendor-prefixes.less";
18
+
19
+ // Components
20
+ @import "mixins/alerts.less";
21
+ @import "mixins/buttons.less";
22
+ @import "mixins/panels.less";
23
+ @import "mixins/pagination.less";
24
+ @import "mixins/list-group.less";
25
+ @import "mixins/nav-divider.less";
26
+ @import "mixins/forms.less";
27
+ @import "mixins/progress-bar.less";
28
+ @import "mixins/table-row.less";
29
+
30
+ // Skins
31
+ @import "mixins/background-variant.less";
32
+ @import "mixins/border-radius.less";
33
+ @import "mixins/gradients.less";
34
+
35
+ // Layout
36
+ @import "mixins/clearfix.less";
37
+ @import "mixins/center-block.less";
38
+ @import "mixins/nav-vertical-align.less";
39
+ @import "mixins/grid-framework.less";
40
+ @import "mixins/grid.less";