npm2gem 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +241 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +4 -0
  7. data/CODE_OF_CONDUCT.md +111 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +102 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +7 -0
  14. data/exe/npm2gem +8 -0
  15. data/lib/npm2gem/cli.rb +56 -0
  16. data/lib/npm2gem/config.rb +21 -0
  17. data/lib/npm2gem/exception.rb +4 -0
  18. data/lib/npm2gem/file_copier.rb +65 -0
  19. data/lib/npm2gem/gem_version_updater.rb +42 -0
  20. data/lib/npm2gem/npm_install.rb +36 -0
  21. data/lib/npm2gem/version.rb +3 -0
  22. data/lib/npm2gem/version_updaters/base_file_updater.rb +29 -0
  23. data/lib/npm2gem/version_updaters/gemspec_updater.rb +12 -0
  24. data/lib/npm2gem/version_updaters/version_file_updater.rb +18 -0
  25. data/lib/npm2gem.rb +5 -0
  26. data/npm2gem.gemspec +31 -0
  27. data/spec/cli_spec.rb +22 -0
  28. data/spec/config_spec.rb +40 -0
  29. data/spec/dummy/Gemfile +4 -0
  30. data/spec/dummy/README.md +7 -0
  31. data/spec/dummy/Rakefile +6 -0
  32. data/spec/dummy/dummy.gemspec +31 -0
  33. data/spec/dummy/lib/dummy/version.rb +3 -0
  34. data/spec/dummy/lib/dummy.rb +8 -0
  35. data/spec/dummy/node_modules/bootstrap/CHANGELOG.md +5 -0
  36. data/spec/dummy/node_modules/bootstrap/Gruntfile.js +533 -0
  37. data/spec/dummy/node_modules/bootstrap/LICENSE +21 -0
  38. data/spec/dummy/node_modules/bootstrap/README.md +139 -0
  39. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap-theme.css +587 -0
  40. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
  41. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap-theme.min.css +6 -0
  42. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap-theme.min.css.map +1 -0
  43. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap.css +6760 -0
  44. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  45. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap.min.css +6 -0
  46. data/spec/dummy/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  47. data/spec/dummy/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  48. data/spec/dummy/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +288 -0
  49. data/spec/dummy/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  50. data/spec/dummy/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  51. data/spec/dummy/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  52. data/spec/dummy/node_modules/bootstrap/dist/js/bootstrap.js +2363 -0
  53. data/spec/dummy/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  54. data/spec/dummy/node_modules/bootstrap/dist/js/npm.js +13 -0
  55. data/spec/dummy/node_modules/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  56. data/spec/dummy/node_modules/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
  57. data/spec/dummy/node_modules/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  58. data/spec/dummy/node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  59. data/spec/dummy/node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  60. data/spec/dummy/node_modules/bootstrap/grunt/bs-commonjs-generator.js +30 -0
  61. data/spec/dummy/node_modules/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
  62. data/spec/dummy/node_modules/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
  63. data/spec/dummy/node_modules/bootstrap/grunt/bs-raw-files-generator.js +44 -0
  64. data/spec/dummy/node_modules/bootstrap/grunt/configBridge.json +46 -0
  65. data/spec/dummy/node_modules/bootstrap/grunt/sauce_browsers.yml +82 -0
  66. data/spec/dummy/node_modules/bootstrap/js/affix.js +162 -0
  67. data/spec/dummy/node_modules/bootstrap/js/alert.js +94 -0
  68. data/spec/dummy/node_modules/bootstrap/js/button.js +120 -0
  69. data/spec/dummy/node_modules/bootstrap/js/carousel.js +237 -0
  70. data/spec/dummy/node_modules/bootstrap/js/collapse.js +211 -0
  71. data/spec/dummy/node_modules/bootstrap/js/dropdown.js +165 -0
  72. data/spec/dummy/node_modules/bootstrap/js/modal.js +337 -0
  73. data/spec/dummy/node_modules/bootstrap/js/popover.js +108 -0
  74. data/spec/dummy/node_modules/bootstrap/js/scrollspy.js +172 -0
  75. data/spec/dummy/node_modules/bootstrap/js/tab.js +155 -0
  76. data/spec/dummy/node_modules/bootstrap/js/tooltip.js +514 -0
  77. data/spec/dummy/node_modules/bootstrap/js/transition.js +59 -0
  78. data/spec/dummy/node_modules/bootstrap/less/alerts.less +73 -0
  79. data/spec/dummy/node_modules/bootstrap/less/badges.less +66 -0
  80. data/spec/dummy/node_modules/bootstrap/less/bootstrap.less +56 -0
  81. data/spec/dummy/node_modules/bootstrap/less/breadcrumbs.less +26 -0
  82. data/spec/dummy/node_modules/bootstrap/less/button-groups.less +244 -0
  83. data/spec/dummy/node_modules/bootstrap/less/buttons.less +166 -0
  84. data/spec/dummy/node_modules/bootstrap/less/carousel.less +270 -0
  85. data/spec/dummy/node_modules/bootstrap/less/close.less +34 -0
  86. data/spec/dummy/node_modules/bootstrap/less/code.less +69 -0
  87. data/spec/dummy/node_modules/bootstrap/less/component-animations.less +33 -0
  88. data/spec/dummy/node_modules/bootstrap/less/dropdowns.less +216 -0
  89. data/spec/dummy/node_modules/bootstrap/less/forms.less +613 -0
  90. data/spec/dummy/node_modules/bootstrap/less/glyphicons.less +305 -0
  91. data/spec/dummy/node_modules/bootstrap/less/grid.less +84 -0
  92. data/spec/dummy/node_modules/bootstrap/less/input-groups.less +171 -0
  93. data/spec/dummy/node_modules/bootstrap/less/jumbotron.less +54 -0
  94. data/spec/dummy/node_modules/bootstrap/less/labels.less +64 -0
  95. data/spec/dummy/node_modules/bootstrap/less/list-group.less +130 -0
  96. data/spec/dummy/node_modules/bootstrap/less/media.less +66 -0
  97. data/spec/dummy/node_modules/bootstrap/less/mixins/alerts.less +14 -0
  98. data/spec/dummy/node_modules/bootstrap/less/mixins/background-variant.less +9 -0
  99. data/spec/dummy/node_modules/bootstrap/less/mixins/border-radius.less +18 -0
  100. data/spec/dummy/node_modules/bootstrap/less/mixins/buttons.less +65 -0
  101. data/spec/dummy/node_modules/bootstrap/less/mixins/center-block.less +7 -0
  102. data/spec/dummy/node_modules/bootstrap/less/mixins/clearfix.less +22 -0
  103. data/spec/dummy/node_modules/bootstrap/less/mixins/forms.less +85 -0
  104. data/spec/dummy/node_modules/bootstrap/less/mixins/gradients.less +59 -0
  105. data/spec/dummy/node_modules/bootstrap/less/mixins/grid-framework.less +91 -0
  106. data/spec/dummy/node_modules/bootstrap/less/mixins/grid.less +122 -0
  107. data/spec/dummy/node_modules/bootstrap/less/mixins/hide-text.less +21 -0
  108. data/spec/dummy/node_modules/bootstrap/less/mixins/image.less +33 -0
  109. data/spec/dummy/node_modules/bootstrap/less/mixins/labels.less +12 -0
  110. data/spec/dummy/node_modules/bootstrap/less/mixins/list-group.less +30 -0
  111. data/spec/dummy/node_modules/bootstrap/less/mixins/nav-divider.less +10 -0
  112. data/spec/dummy/node_modules/bootstrap/less/mixins/nav-vertical-align.less +9 -0
  113. data/spec/dummy/node_modules/bootstrap/less/mixins/opacity.less +8 -0
  114. data/spec/dummy/node_modules/bootstrap/less/mixins/pagination.less +24 -0
  115. data/spec/dummy/node_modules/bootstrap/less/mixins/panels.less +24 -0
  116. data/spec/dummy/node_modules/bootstrap/less/mixins/progress-bar.less +10 -0
  117. data/spec/dummy/node_modules/bootstrap/less/mixins/reset-filter.less +8 -0
  118. data/spec/dummy/node_modules/bootstrap/less/mixins/reset-text.less +18 -0
  119. data/spec/dummy/node_modules/bootstrap/less/mixins/resize.less +6 -0
  120. data/spec/dummy/node_modules/bootstrap/less/mixins/responsive-visibility.less +15 -0
  121. data/spec/dummy/node_modules/bootstrap/less/mixins/size.less +10 -0
  122. data/spec/dummy/node_modules/bootstrap/less/mixins/tab-focus.less +9 -0
  123. data/spec/dummy/node_modules/bootstrap/less/mixins/table-row.less +28 -0
  124. data/spec/dummy/node_modules/bootstrap/less/mixins/text-emphasis.less +9 -0
  125. data/spec/dummy/node_modules/bootstrap/less/mixins/text-overflow.less +8 -0
  126. data/spec/dummy/node_modules/bootstrap/less/mixins/vendor-prefixes.less +227 -0
  127. data/spec/dummy/node_modules/bootstrap/less/mixins.less +40 -0
  128. data/spec/dummy/node_modules/bootstrap/less/modals.less +150 -0
  129. data/spec/dummy/node_modules/bootstrap/less/navbar.less +660 -0
  130. data/spec/dummy/node_modules/bootstrap/less/navs.less +242 -0
  131. data/spec/dummy/node_modules/bootstrap/less/normalize.less +424 -0
  132. data/spec/dummy/node_modules/bootstrap/less/pager.less +54 -0
  133. data/spec/dummy/node_modules/bootstrap/less/pagination.less +89 -0
  134. data/spec/dummy/node_modules/bootstrap/less/panels.less +271 -0
  135. data/spec/dummy/node_modules/bootstrap/less/popovers.less +131 -0
  136. data/spec/dummy/node_modules/bootstrap/less/print.less +101 -0
  137. data/spec/dummy/node_modules/bootstrap/less/progress-bars.less +87 -0
  138. data/spec/dummy/node_modules/bootstrap/less/responsive-embed.less +35 -0
  139. data/spec/dummy/node_modules/bootstrap/less/responsive-utilities.less +194 -0
  140. data/spec/dummy/node_modules/bootstrap/less/scaffolding.less +161 -0
  141. data/spec/dummy/node_modules/bootstrap/less/tables.less +234 -0
  142. data/spec/dummy/node_modules/bootstrap/less/theme.less +291 -0
  143. data/spec/dummy/node_modules/bootstrap/less/thumbnails.less +36 -0
  144. data/spec/dummy/node_modules/bootstrap/less/tooltip.less +101 -0
  145. data/spec/dummy/node_modules/bootstrap/less/type.less +302 -0
  146. data/spec/dummy/node_modules/bootstrap/less/utilities.less +55 -0
  147. data/spec/dummy/node_modules/bootstrap/less/variables.less +869 -0
  148. data/spec/dummy/node_modules/bootstrap/less/wells.less +29 -0
  149. data/spec/dummy/node_modules/bootstrap/package.json +138 -0
  150. data/spec/dummy/vendor/assets/javascripts/bootstrap.js +2363 -0
  151. data/spec/dummy/vendor/assets/stylesheets/bootstrap-theme.css +587 -0
  152. data/spec/dummy/vendor/assets/stylesheets/bootstrap.css +6760 -0
  153. data/spec/file_copier_spec.rb +45 -0
  154. data/spec/gem_version_updater_spec.rb +45 -0
  155. data/spec/npm2gem_spec.rb +7 -0
  156. data/spec/npm_install_spec.rb +22 -0
  157. data/spec/spec_helper.rb +26 -0
  158. metadata +403 -0
@@ -0,0 +1,270 @@
1
+ //
2
+ // Carousel
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Wrapper for the slide container and indicators
7
+ .carousel {
8
+ position: relative;
9
+ }
10
+
11
+ .carousel-inner {
12
+ position: relative;
13
+ overflow: hidden;
14
+ width: 100%;
15
+
16
+ > .item {
17
+ display: none;
18
+ position: relative;
19
+ .transition(.6s ease-in-out left);
20
+
21
+ // Account for jankitude on images
22
+ > img,
23
+ > a > img {
24
+ &:extend(.img-responsive);
25
+ line-height: 1;
26
+ }
27
+
28
+ // WebKit CSS3 transforms for supported devices
29
+ @media all and (transform-3d), (-webkit-transform-3d) {
30
+ .transition-transform(~'0.6s ease-in-out');
31
+ .backface-visibility(~'hidden');
32
+ .perspective(1000px);
33
+
34
+ &.next,
35
+ &.active.right {
36
+ .translate3d(100%, 0, 0);
37
+ left: 0;
38
+ }
39
+ &.prev,
40
+ &.active.left {
41
+ .translate3d(-100%, 0, 0);
42
+ left: 0;
43
+ }
44
+ &.next.left,
45
+ &.prev.right,
46
+ &.active {
47
+ .translate3d(0, 0, 0);
48
+ left: 0;
49
+ }
50
+ }
51
+ }
52
+
53
+ > .active,
54
+ > .next,
55
+ > .prev {
56
+ display: block;
57
+ }
58
+
59
+ > .active {
60
+ left: 0;
61
+ }
62
+
63
+ > .next,
64
+ > .prev {
65
+ position: absolute;
66
+ top: 0;
67
+ width: 100%;
68
+ }
69
+
70
+ > .next {
71
+ left: 100%;
72
+ }
73
+ > .prev {
74
+ left: -100%;
75
+ }
76
+ > .next.left,
77
+ > .prev.right {
78
+ left: 0;
79
+ }
80
+
81
+ > .active.left {
82
+ left: -100%;
83
+ }
84
+ > .active.right {
85
+ left: 100%;
86
+ }
87
+
88
+ }
89
+
90
+ // Left/right controls for nav
91
+ // ---------------------------
92
+
93
+ .carousel-control {
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+ bottom: 0;
98
+ width: @carousel-control-width;
99
+ .opacity(@carousel-control-opacity);
100
+ font-size: @carousel-control-font-size;
101
+ color: @carousel-control-color;
102
+ text-align: center;
103
+ text-shadow: @carousel-text-shadow;
104
+ background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug
105
+ // We can't have this transition here because WebKit cancels the carousel
106
+ // animation if you trip this while in the middle of another animation.
107
+
108
+ // Set gradients for backgrounds
109
+ &.left {
110
+ #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
111
+ }
112
+ &.right {
113
+ left: auto;
114
+ right: 0;
115
+ #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
116
+ }
117
+
118
+ // Hover/focus state
119
+ &:hover,
120
+ &:focus {
121
+ outline: 0;
122
+ color: @carousel-control-color;
123
+ text-decoration: none;
124
+ .opacity(.9);
125
+ }
126
+
127
+ // Toggles
128
+ .icon-prev,
129
+ .icon-next,
130
+ .glyphicon-chevron-left,
131
+ .glyphicon-chevron-right {
132
+ position: absolute;
133
+ top: 50%;
134
+ margin-top: -10px;
135
+ z-index: 5;
136
+ display: inline-block;
137
+ }
138
+ .icon-prev,
139
+ .glyphicon-chevron-left {
140
+ left: 50%;
141
+ margin-left: -10px;
142
+ }
143
+ .icon-next,
144
+ .glyphicon-chevron-right {
145
+ right: 50%;
146
+ margin-right: -10px;
147
+ }
148
+ .icon-prev,
149
+ .icon-next {
150
+ width: 20px;
151
+ height: 20px;
152
+ line-height: 1;
153
+ font-family: serif;
154
+ }
155
+
156
+
157
+ .icon-prev {
158
+ &:before {
159
+ content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
160
+ }
161
+ }
162
+ .icon-next {
163
+ &:before {
164
+ content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
165
+ }
166
+ }
167
+ }
168
+
169
+ // Optional indicator pips
170
+ //
171
+ // Add an unordered list with the following class and add a list item for each
172
+ // slide your carousel holds.
173
+
174
+ .carousel-indicators {
175
+ position: absolute;
176
+ bottom: 10px;
177
+ left: 50%;
178
+ z-index: 15;
179
+ width: 60%;
180
+ margin-left: -30%;
181
+ padding-left: 0;
182
+ list-style: none;
183
+ text-align: center;
184
+
185
+ li {
186
+ display: inline-block;
187
+ width: 10px;
188
+ height: 10px;
189
+ margin: 1px;
190
+ text-indent: -999px;
191
+ border: 1px solid @carousel-indicator-border-color;
192
+ border-radius: 10px;
193
+ cursor: pointer;
194
+
195
+ // IE8-9 hack for event handling
196
+ //
197
+ // Internet Explorer 8-9 does not support clicks on elements without a set
198
+ // `background-color`. We cannot use `filter` since that's not viewed as a
199
+ // background color by the browser. Thus, a hack is needed.
200
+ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
201
+ //
202
+ // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
203
+ // set alpha transparency for the best results possible.
204
+ background-color: #000 \9; // IE8
205
+ background-color: rgba(0,0,0,0); // IE9
206
+ }
207
+ .active {
208
+ margin: 0;
209
+ width: 12px;
210
+ height: 12px;
211
+ background-color: @carousel-indicator-active-bg;
212
+ }
213
+ }
214
+
215
+ // Optional captions
216
+ // -----------------------------
217
+ // Hidden by default for smaller viewports
218
+ .carousel-caption {
219
+ position: absolute;
220
+ left: 15%;
221
+ right: 15%;
222
+ bottom: 20px;
223
+ z-index: 10;
224
+ padding-top: 20px;
225
+ padding-bottom: 20px;
226
+ color: @carousel-caption-color;
227
+ text-align: center;
228
+ text-shadow: @carousel-text-shadow;
229
+ & .btn {
230
+ text-shadow: none; // No shadow for button elements in carousel-caption
231
+ }
232
+ }
233
+
234
+
235
+ // Scale up controls for tablets and up
236
+ @media screen and (min-width: @screen-sm-min) {
237
+
238
+ // Scale up the controls a smidge
239
+ .carousel-control {
240
+ .glyphicon-chevron-left,
241
+ .glyphicon-chevron-right,
242
+ .icon-prev,
243
+ .icon-next {
244
+ width: (@carousel-control-font-size * 1.5);
245
+ height: (@carousel-control-font-size * 1.5);
246
+ margin-top: (@carousel-control-font-size / -2);
247
+ font-size: (@carousel-control-font-size * 1.5);
248
+ }
249
+ .glyphicon-chevron-left,
250
+ .icon-prev {
251
+ margin-left: (@carousel-control-font-size / -2);
252
+ }
253
+ .glyphicon-chevron-right,
254
+ .icon-next {
255
+ margin-right: (@carousel-control-font-size / -2);
256
+ }
257
+ }
258
+
259
+ // Show and left align the captions
260
+ .carousel-caption {
261
+ left: 20%;
262
+ right: 20%;
263
+ padding-bottom: 30px;
264
+ }
265
+
266
+ // Move up the indicators
267
+ .carousel-indicators {
268
+ bottom: 20px;
269
+ }
270
+ }
@@ -0,0 +1,34 @@
1
+ //
2
+ // Close icons
3
+ // --------------------------------------------------
4
+
5
+
6
+ .close {
7
+ float: right;
8
+ font-size: (@font-size-base * 1.5);
9
+ font-weight: @close-font-weight;
10
+ line-height: 1;
11
+ color: @close-color;
12
+ text-shadow: @close-text-shadow;
13
+ .opacity(.2);
14
+
15
+ &:hover,
16
+ &:focus {
17
+ color: @close-color;
18
+ text-decoration: none;
19
+ cursor: pointer;
20
+ .opacity(.5);
21
+ }
22
+
23
+ // Additional properties for button version
24
+ // iOS requires the button element instead of an anchor tag.
25
+ // If you want the anchor version, it requires `href="#"`.
26
+ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27
+ button& {
28
+ padding: 0;
29
+ cursor: pointer;
30
+ background: transparent;
31
+ border: 0;
32
+ -webkit-appearance: none;
33
+ }
34
+ }
@@ -0,0 +1,69 @@
1
+ //
2
+ // Code (inline and block)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ kbd,
9
+ pre,
10
+ samp {
11
+ font-family: @font-family-monospace;
12
+ }
13
+
14
+ // Inline code
15
+ code {
16
+ padding: 2px 4px;
17
+ font-size: 90%;
18
+ color: @code-color;
19
+ background-color: @code-bg;
20
+ border-radius: @border-radius-base;
21
+ }
22
+
23
+ // User input typically entered via keyboard
24
+ kbd {
25
+ padding: 2px 4px;
26
+ font-size: 90%;
27
+ color: @kbd-color;
28
+ background-color: @kbd-bg;
29
+ border-radius: @border-radius-small;
30
+ box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
31
+
32
+ kbd {
33
+ padding: 0;
34
+ font-size: 100%;
35
+ font-weight: bold;
36
+ box-shadow: none;
37
+ }
38
+ }
39
+
40
+ // Blocks of code
41
+ pre {
42
+ display: block;
43
+ padding: ((@line-height-computed - 1) / 2);
44
+ margin: 0 0 (@line-height-computed / 2);
45
+ font-size: (@font-size-base - 1); // 14px to 13px
46
+ line-height: @line-height-base;
47
+ word-break: break-all;
48
+ word-wrap: break-word;
49
+ color: @pre-color;
50
+ background-color: @pre-bg;
51
+ border: 1px solid @pre-border-color;
52
+ border-radius: @border-radius-base;
53
+
54
+ // Account for some code outputs that place code tags in pre tags
55
+ code {
56
+ padding: 0;
57
+ font-size: inherit;
58
+ color: inherit;
59
+ white-space: pre-wrap;
60
+ background-color: transparent;
61
+ border-radius: 0;
62
+ }
63
+ }
64
+
65
+ // Enable scrollable blocks of code
66
+ .pre-scrollable {
67
+ max-height: @pre-scrollable-max-height;
68
+ overflow-y: scroll;
69
+ }
@@ -0,0 +1,33 @@
1
+ //
2
+ // Component animations
3
+ // --------------------------------------------------
4
+
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9
+
10
+ .fade {
11
+ opacity: 0;
12
+ .transition(opacity .15s linear);
13
+ &.in {
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ .collapse {
19
+ display: none;
20
+
21
+ &.in { display: block; }
22
+ tr&.in { display: table-row; }
23
+ tbody&.in { display: table-row-group; }
24
+ }
25
+
26
+ .collapsing {
27
+ position: relative;
28
+ height: 0;
29
+ overflow: hidden;
30
+ .transition-property(~"height, visibility");
31
+ .transition-duration(.35s);
32
+ .transition-timing-function(ease);
33
+ }
@@ -0,0 +1,216 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Dropdown arrow/caret
7
+ .caret {
8
+ display: inline-block;
9
+ width: 0;
10
+ height: 0;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: @caret-width-base dashed;
14
+ border-top: @caret-width-base solid ~"\9"; // IE8
15
+ border-right: @caret-width-base solid transparent;
16
+ border-left: @caret-width-base solid transparent;
17
+ }
18
+
19
+ // The dropdown wrapper (div)
20
+ .dropup,
21
+ .dropdown {
22
+ position: relative;
23
+ }
24
+
25
+ // Prevent the focus on the dropdown toggle when closing dropdowns
26
+ .dropdown-toggle:focus {
27
+ outline: 0;
28
+ }
29
+
30
+ // The dropdown menu (ul)
31
+ .dropdown-menu {
32
+ position: absolute;
33
+ top: 100%;
34
+ left: 0;
35
+ z-index: @zindex-dropdown;
36
+ display: none; // none by default, but block on "open" of the menu
37
+ float: left;
38
+ min-width: 160px;
39
+ padding: 5px 0;
40
+ margin: 2px 0 0; // override default ul
41
+ list-style: none;
42
+ font-size: @font-size-base;
43
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
44
+ background-color: @dropdown-bg;
45
+ border: 1px solid @dropdown-fallback-border; // IE8 fallback
46
+ border: 1px solid @dropdown-border;
47
+ border-radius: @border-radius-base;
48
+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
49
+ background-clip: padding-box;
50
+
51
+ // Aligns the dropdown menu to right
52
+ //
53
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
54
+ &.pull-right {
55
+ right: 0;
56
+ left: auto;
57
+ }
58
+
59
+ // Dividers (basically an hr) within the dropdown
60
+ .divider {
61
+ .nav-divider(@dropdown-divider-bg);
62
+ }
63
+
64
+ // Links within the dropdown menu
65
+ > li > a {
66
+ display: block;
67
+ padding: 3px 20px;
68
+ clear: both;
69
+ font-weight: normal;
70
+ line-height: @line-height-base;
71
+ color: @dropdown-link-color;
72
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
73
+ }
74
+ }
75
+
76
+ // Hover/Focus state
77
+ .dropdown-menu > li > a {
78
+ &:hover,
79
+ &:focus {
80
+ text-decoration: none;
81
+ color: @dropdown-link-hover-color;
82
+ background-color: @dropdown-link-hover-bg;
83
+ }
84
+ }
85
+
86
+ // Active state
87
+ .dropdown-menu > .active > a {
88
+ &,
89
+ &:hover,
90
+ &:focus {
91
+ color: @dropdown-link-active-color;
92
+ text-decoration: none;
93
+ outline: 0;
94
+ background-color: @dropdown-link-active-bg;
95
+ }
96
+ }
97
+
98
+ // Disabled state
99
+ //
100
+ // Gray out text and ensure the hover/focus state remains gray
101
+
102
+ .dropdown-menu > .disabled > a {
103
+ &,
104
+ &:hover,
105
+ &:focus {
106
+ color: @dropdown-link-disabled-color;
107
+ }
108
+
109
+ // Nuke hover/focus effects
110
+ &:hover,
111
+ &:focus {
112
+ text-decoration: none;
113
+ background-color: transparent;
114
+ background-image: none; // Remove CSS gradient
115
+ .reset-filter();
116
+ cursor: @cursor-disabled;
117
+ }
118
+ }
119
+
120
+ // Open state for the dropdown
121
+ .open {
122
+ // Show the menu
123
+ > .dropdown-menu {
124
+ display: block;
125
+ }
126
+
127
+ // Remove the outline when :focus is triggered
128
+ > a {
129
+ outline: 0;
130
+ }
131
+ }
132
+
133
+ // Menu positioning
134
+ //
135
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
136
+ // menu with the parent.
137
+ .dropdown-menu-right {
138
+ left: auto; // Reset the default from `.dropdown-menu`
139
+ right: 0;
140
+ }
141
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
142
+ // aligned nav component. To enable the undoing of that, we provide an override
143
+ // to restore the default dropdown menu alignment.
144
+ //
145
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
146
+ // `.pull-right` nav component.
147
+ .dropdown-menu-left {
148
+ left: 0;
149
+ right: auto;
150
+ }
151
+
152
+ // Dropdown section headers
153
+ .dropdown-header {
154
+ display: block;
155
+ padding: 3px 20px;
156
+ font-size: @font-size-small;
157
+ line-height: @line-height-base;
158
+ color: @dropdown-header-color;
159
+ white-space: nowrap; // as with > li > a
160
+ }
161
+
162
+ // Backdrop to catch body clicks on mobile, etc.
163
+ .dropdown-backdrop {
164
+ position: fixed;
165
+ left: 0;
166
+ right: 0;
167
+ bottom: 0;
168
+ top: 0;
169
+ z-index: (@zindex-dropdown - 10);
170
+ }
171
+
172
+ // Right aligned dropdowns
173
+ .pull-right > .dropdown-menu {
174
+ right: 0;
175
+ left: auto;
176
+ }
177
+
178
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
179
+ //
180
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
181
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
182
+
183
+ .dropup,
184
+ .navbar-fixed-bottom .dropdown {
185
+ // Reverse the caret
186
+ .caret {
187
+ border-top: 0;
188
+ border-bottom: @caret-width-base dashed;
189
+ border-bottom: @caret-width-base solid ~"\9"; // IE8
190
+ content: "";
191
+ }
192
+ // Different positioning for bottom up menu
193
+ .dropdown-menu {
194
+ top: auto;
195
+ bottom: 100%;
196
+ margin-bottom: 2px;
197
+ }
198
+ }
199
+
200
+
201
+ // Component alignment
202
+ //
203
+ // Reiterate per navbar.less and the modified component alignment there.
204
+
205
+ @media (min-width: @grid-float-breakpoint) {
206
+ .navbar-right {
207
+ .dropdown-menu {
208
+ .dropdown-menu-right();
209
+ }
210
+ // Necessary for overrides of the default right aligned menu.
211
+ // Will remove come v4 in all likelihood.
212
+ .dropdown-menu-left {
213
+ .dropdown-menu-left();
214
+ }
215
+ }
216
+ }