bootstrap 4.0.0.alpha5 → 4.0.0.alpha6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/assets/javascripts/bootstrap.js +312 -207
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +9 -5
- data/assets/javascripts/bootstrap/button.js +5 -5
- data/assets/javascripts/bootstrap/carousel.js +52 -28
- data/assets/javascripts/bootstrap/collapse.js +19 -11
- data/assets/javascripts/bootstrap/dropdown.js +21 -19
- data/assets/javascripts/bootstrap/modal.js +69 -43
- data/assets/javascripts/bootstrap/popover.js +4 -4
- data/assets/javascripts/bootstrap/scrollspy.js +20 -11
- data/assets/javascripts/bootstrap/tab.js +19 -14
- data/assets/javascripts/bootstrap/tooltip.js +54 -22
- data/assets/javascripts/bootstrap/util.js +7 -12
- data/assets/stylesheets/_bootstrap-grid.scss +23 -3
- data/assets/stylesheets/_bootstrap-reboot.scss +2 -3
- data/assets/stylesheets/_bootstrap.scss +6 -6
- data/assets/stylesheets/bootstrap/_alert.scss +3 -4
- data/assets/stylesheets/bootstrap/_badge.scss +77 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +18 -51
- data/assets/stylesheets/bootstrap/_buttons.scss +14 -20
- data/assets/stylesheets/bootstrap/_card.scss +30 -76
- data/assets/stylesheets/bootstrap/_carousel.scss +96 -171
- data/assets/stylesheets/bootstrap/_close.scss +3 -3
- data/assets/stylesheets/bootstrap/_code.scss +7 -0
- data/assets/stylesheets/bootstrap/_custom-forms.scss +13 -12
- data/assets/stylesheets/bootstrap/_dropdown.scss +17 -36
- data/assets/stylesheets/bootstrap/_forms.scss +61 -47
- data/assets/stylesheets/bootstrap/_grid.scss +13 -0
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +17 -27
- data/assets/stylesheets/bootstrap/_list-group.scss +79 -63
- data/assets/stylesheets/bootstrap/_media.scss +5 -78
- data/assets/stylesheets/bootstrap/_mixins.scss +8 -5
- data/assets/stylesheets/bootstrap/_modal.scss +21 -13
- data/assets/stylesheets/bootstrap/_nav.scss +30 -68
- data/assets/stylesheets/bootstrap/_navbar.scss +131 -178
- data/assets/stylesheets/bootstrap/_normalize.scss +133 -94
- data/assets/stylesheets/bootstrap/_pagination.scss +16 -22
- data/assets/stylesheets/bootstrap/_popover.scss +3 -3
- data/assets/stylesheets/bootstrap/_print.scss +5 -8
- data/assets/stylesheets/bootstrap/_progress.scss +14 -127
- data/assets/stylesheets/bootstrap/_reboot.scss +16 -15
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +18 -5
- data/assets/stylesheets/bootstrap/_tables.scss +13 -56
- data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
- data/assets/stylesheets/bootstrap/{_animation.scss → _transitions.scss} +6 -8
- data/assets/stylesheets/bootstrap/_type.scss +5 -12
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -0
- data/assets/stylesheets/bootstrap/_variables.scss +320 -216
- data/assets/stylesheets/bootstrap/mixins/{_tag.scss → _badge.scss} +2 -2
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +25 -16
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +31 -58
- data/assets/stylesheets/bootstrap/mixins/_cards.scss +3 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +19 -23
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +19 -26
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_transforms.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_align.scss +5 -5
- data/assets/stylesheets/bootstrap/utilities/_background.scss +1 -1
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +10 -3
- data/assets/stylesheets/bootstrap/utilities/_display.scss +13 -8
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +42 -31
- data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -9
- data/assets/stylesheets/bootstrap/utilities/_position.scss +23 -0
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +10 -0
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +36 -37
- data/assets/stylesheets/bootstrap/utilities/_text.scss +14 -12
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/scss.rb +3 -5
- data/templates/project/_bootstrap-variables.scss +321 -217
- metadata +10 -10
- data/assets/stylesheets/_bootstrap-flex.scss +0 -8
- data/assets/stylesheets/bootstrap/_tags.scss +0 -77
- data/assets/stylesheets/bootstrap/mixins/_progress.scss +0 -23
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
@@ -6,7 +6,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
6
6
|
|
7
7
|
/**
|
8
8
|
* --------------------------------------------------------------------------
|
9
|
-
* Bootstrap (v4.0.0-alpha.
|
9
|
+
* Bootstrap (v4.0.0-alpha.6): tooltip.js
|
10
10
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
11
11
|
* --------------------------------------------------------------------------
|
12
12
|
*/
|
@@ -17,7 +17,7 @@ var Tooltip = function ($) {
|
|
17
17
|
* Check for Tether dependency
|
18
18
|
* Tether - http://tether.io/
|
19
19
|
*/
|
20
|
-
if (
|
20
|
+
if (typeof Tether === 'undefined') {
|
21
21
|
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
|
22
22
|
}
|
23
23
|
|
@@ -28,7 +28,7 @@ var Tooltip = function ($) {
|
|
28
28
|
*/
|
29
29
|
|
30
30
|
var NAME = 'tooltip';
|
31
|
-
var VERSION = '4.0.0-alpha.
|
31
|
+
var VERSION = '4.0.0-alpha.6';
|
32
32
|
var DATA_KEY = 'bs.tooltip';
|
33
33
|
var EVENT_KEY = '.' + DATA_KEY;
|
34
34
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
@@ -45,7 +45,8 @@ var Tooltip = function ($) {
|
|
45
45
|
selector: false,
|
46
46
|
placement: 'top',
|
47
47
|
offset: '0 0',
|
48
|
-
constraints: []
|
48
|
+
constraints: [],
|
49
|
+
container: false
|
49
50
|
};
|
50
51
|
|
51
52
|
var DefaultType = {
|
@@ -58,7 +59,8 @@ var Tooltip = function ($) {
|
|
58
59
|
selector: '(string|boolean)',
|
59
60
|
placement: '(string|function)',
|
60
61
|
offset: 'string',
|
61
|
-
constraints: 'array'
|
62
|
+
constraints: 'array',
|
63
|
+
container: '(string|element|boolean)'
|
62
64
|
};
|
63
65
|
|
64
66
|
var AttachmentMap = {
|
@@ -69,7 +71,7 @@ var Tooltip = function ($) {
|
|
69
71
|
};
|
70
72
|
|
71
73
|
var HoverState = {
|
72
|
-
|
74
|
+
SHOW: 'show',
|
73
75
|
OUT: 'out'
|
74
76
|
};
|
75
77
|
|
@@ -88,7 +90,7 @@ var Tooltip = function ($) {
|
|
88
90
|
|
89
91
|
var ClassName = {
|
90
92
|
FADE: 'fade',
|
91
|
-
|
93
|
+
SHOW: 'show'
|
92
94
|
};
|
93
95
|
|
94
96
|
var Selector = {
|
@@ -123,6 +125,7 @@ var Tooltip = function ($) {
|
|
123
125
|
this._timeout = 0;
|
124
126
|
this._hoverState = '';
|
125
127
|
this._activeTrigger = {};
|
128
|
+
this._isTransitioning = false;
|
126
129
|
this._tether = null;
|
127
130
|
|
128
131
|
// protected
|
@@ -168,7 +171,7 @@ var Tooltip = function ($) {
|
|
168
171
|
}
|
169
172
|
} else {
|
170
173
|
|
171
|
-
if ($(this.getTipElement()).hasClass(ClassName.
|
174
|
+
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
|
172
175
|
this._leave(null, this);
|
173
176
|
return;
|
174
177
|
}
|
@@ -185,6 +188,7 @@ var Tooltip = function ($) {
|
|
185
188
|
$.removeData(this.element, this.constructor.DATA_KEY);
|
186
189
|
|
187
190
|
$(this.element).off(this.constructor.EVENT_KEY);
|
191
|
+
$(this.element).closest('.modal').off('hide.bs.modal');
|
188
192
|
|
189
193
|
if (this.tip) {
|
190
194
|
$(this.tip).remove();
|
@@ -204,9 +208,15 @@ var Tooltip = function ($) {
|
|
204
208
|
Tooltip.prototype.show = function show() {
|
205
209
|
var _this = this;
|
206
210
|
|
207
|
-
|
211
|
+
if ($(this.element).css('display') === 'none') {
|
212
|
+
throw new Error('Please use show on visible elements');
|
213
|
+
}
|
208
214
|
|
215
|
+
var showEvent = $.Event(this.constructor.Event.SHOW);
|
209
216
|
if (this.isWithContent() && this._isEnabled) {
|
217
|
+
if (this._isTransitioning) {
|
218
|
+
throw new Error('Tooltip is transitioning');
|
219
|
+
}
|
210
220
|
$(this.element).trigger(showEvent);
|
211
221
|
|
212
222
|
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
@@ -231,7 +241,9 @@ var Tooltip = function ($) {
|
|
231
241
|
|
232
242
|
var attachment = this._getAttachment(placement);
|
233
243
|
|
234
|
-
|
244
|
+
var container = this.config.container === false ? document.body : $(this.config.container);
|
245
|
+
|
246
|
+
$(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
|
235
247
|
|
236
248
|
$(this.element).trigger(this.constructor.Event.INSERTED);
|
237
249
|
|
@@ -249,11 +261,12 @@ var Tooltip = function ($) {
|
|
249
261
|
Util.reflow(tip);
|
250
262
|
this._tether.position();
|
251
263
|
|
252
|
-
$(tip).addClass(ClassName.
|
264
|
+
$(tip).addClass(ClassName.SHOW);
|
253
265
|
|
254
266
|
var complete = function complete() {
|
255
267
|
var prevHoverState = _this._hoverState;
|
256
268
|
_this._hoverState = null;
|
269
|
+
_this._isTransitioning = false;
|
257
270
|
|
258
271
|
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
259
272
|
|
@@ -263,6 +276,7 @@ var Tooltip = function ($) {
|
|
263
276
|
};
|
264
277
|
|
265
278
|
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
279
|
+
this._isTransitioning = true;
|
266
280
|
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
267
281
|
return;
|
268
282
|
}
|
@@ -276,13 +290,17 @@ var Tooltip = function ($) {
|
|
276
290
|
|
277
291
|
var tip = this.getTipElement();
|
278
292
|
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
293
|
+
if (this._isTransitioning) {
|
294
|
+
throw new Error('Tooltip is transitioning');
|
295
|
+
}
|
279
296
|
var complete = function complete() {
|
280
|
-
if (_this2._hoverState !== HoverState.
|
297
|
+
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
281
298
|
tip.parentNode.removeChild(tip);
|
282
299
|
}
|
283
300
|
|
284
301
|
_this2.element.removeAttribute('aria-describedby');
|
285
302
|
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
303
|
+
_this2._isTransitioning = false;
|
286
304
|
_this2.cleanupTether();
|
287
305
|
|
288
306
|
if (callback) {
|
@@ -296,10 +314,14 @@ var Tooltip = function ($) {
|
|
296
314
|
return;
|
297
315
|
}
|
298
316
|
|
299
|
-
$(tip).removeClass(ClassName.
|
317
|
+
$(tip).removeClass(ClassName.SHOW);
|
300
318
|
|
301
|
-
|
319
|
+
this._activeTrigger[Trigger.CLICK] = false;
|
320
|
+
this._activeTrigger[Trigger.FOCUS] = false;
|
321
|
+
this._activeTrigger[Trigger.HOVER] = false;
|
302
322
|
|
323
|
+
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
324
|
+
this._isTransitioning = true;
|
303
325
|
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
304
326
|
} else {
|
305
327
|
complete();
|
@@ -323,7 +345,7 @@ var Tooltip = function ($) {
|
|
323
345
|
|
324
346
|
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
|
325
347
|
|
326
|
-
$tip.removeClass(ClassName.FADE
|
348
|
+
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
327
349
|
|
328
350
|
this.cleanupTether();
|
329
351
|
};
|
@@ -373,13 +395,23 @@ var Tooltip = function ($) {
|
|
373
395
|
|
374
396
|
triggers.forEach(function (trigger) {
|
375
397
|
if (trigger === 'click') {
|
376
|
-
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector,
|
398
|
+
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
|
399
|
+
return _this3.toggle(event);
|
400
|
+
});
|
377
401
|
} else if (trigger !== Trigger.MANUAL) {
|
378
402
|
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
|
379
403
|
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
|
380
404
|
|
381
|
-
$(_this3.element).on(eventIn, _this3.config.selector,
|
405
|
+
$(_this3.element).on(eventIn, _this3.config.selector, function (event) {
|
406
|
+
return _this3._enter(event);
|
407
|
+
}).on(eventOut, _this3.config.selector, function (event) {
|
408
|
+
return _this3._leave(event);
|
409
|
+
});
|
382
410
|
}
|
411
|
+
|
412
|
+
$(_this3.element).closest('.modal').on('hide.bs.modal', function () {
|
413
|
+
return _this3.hide();
|
414
|
+
});
|
383
415
|
});
|
384
416
|
|
385
417
|
if (this.config.selector) {
|
@@ -414,14 +446,14 @@ var Tooltip = function ($) {
|
|
414
446
|
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
|
415
447
|
}
|
416
448
|
|
417
|
-
if ($(context.getTipElement()).hasClass(ClassName.
|
418
|
-
context._hoverState = HoverState.
|
449
|
+
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
|
450
|
+
context._hoverState = HoverState.SHOW;
|
419
451
|
return;
|
420
452
|
}
|
421
453
|
|
422
454
|
clearTimeout(context._timeout);
|
423
455
|
|
424
|
-
context._hoverState = HoverState.
|
456
|
+
context._hoverState = HoverState.SHOW;
|
425
457
|
|
426
458
|
if (!context.config.delay || !context.config.delay.show) {
|
427
459
|
context.show();
|
@@ -429,7 +461,7 @@ var Tooltip = function ($) {
|
|
429
461
|
}
|
430
462
|
|
431
463
|
context._timeout = setTimeout(function () {
|
432
|
-
if (context._hoverState === HoverState.
|
464
|
+
if (context._hoverState === HoverState.SHOW) {
|
433
465
|
context.show();
|
434
466
|
}
|
435
467
|
}, context.config.delay.show);
|
@@ -513,7 +545,7 @@ var Tooltip = function ($) {
|
|
513
545
|
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
514
546
|
return this.each(function () {
|
515
547
|
var data = $(this).data(DATA_KEY);
|
516
|
-
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object'
|
548
|
+
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
|
517
549
|
|
518
550
|
if (!data && /dispose|hide/.test(config)) {
|
519
551
|
return;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* --------------------------------------------------------------------------
|
3
|
-
* Bootstrap (v4.0.0-alpha.
|
3
|
+
* Bootstrap (v4.0.0-alpha.6): util.js
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
5
|
* --------------------------------------------------------------------------
|
6
6
|
*/
|
@@ -55,7 +55,9 @@ var Util = function ($) {
|
|
55
55
|
|
56
56
|
for (var name in TransitionEndEvent) {
|
57
57
|
if (el.style[name] !== undefined) {
|
58
|
-
return {
|
58
|
+
return {
|
59
|
+
end: TransitionEndEvent[name]
|
60
|
+
};
|
59
61
|
}
|
60
62
|
}
|
61
63
|
|
@@ -102,9 +104,8 @@ var Util = function ($) {
|
|
102
104
|
|
103
105
|
getUID: function getUID(prefix) {
|
104
106
|
do {
|
105
|
-
|
107
|
+
// eslint-disable-next-line no-bitwise
|
106
108
|
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
107
|
-
/* eslint-enable no-bitwise */
|
108
109
|
} while (document.getElementById(prefix));
|
109
110
|
return prefix;
|
110
111
|
},
|
@@ -119,7 +120,7 @@ var Util = function ($) {
|
|
119
120
|
return selector;
|
120
121
|
},
|
121
122
|
reflow: function reflow(element) {
|
122
|
-
|
123
|
+
return element.offsetHeight;
|
123
124
|
},
|
124
125
|
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
125
126
|
$(element).trigger(transition.end);
|
@@ -132,13 +133,7 @@ var Util = function ($) {
|
|
132
133
|
if (configTypes.hasOwnProperty(property)) {
|
133
134
|
var expectedTypes = configTypes[property];
|
134
135
|
var value = config[property];
|
135
|
-
var valueType =
|
136
|
-
|
137
|
-
if (value && isElement(value)) {
|
138
|
-
valueType = 'element';
|
139
|
-
} else {
|
140
|
-
valueType = toType(value);
|
141
|
-
}
|
136
|
+
var valueType = value && isElement(value) ? 'element' : toType(value);
|
142
137
|
|
143
138
|
if (!new RegExp(expectedTypes).test(valueType)) {
|
144
139
|
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
|
@@ -1,14 +1,32 @@
|
|
1
1
|
// Bootstrap Grid only
|
2
2
|
//
|
3
|
-
// Includes relevant variables and mixins for the
|
4
|
-
// system, as well as the generated predefined classes (e.g., `.col-4
|
3
|
+
// Includes relevant variables and mixins for the flexbox grid
|
4
|
+
// system, as well as the generated predefined classes (e.g., `.col-sm-4`).
|
5
|
+
|
6
|
+
//
|
7
|
+
// Box sizing, responsive, and more
|
8
|
+
//
|
9
|
+
|
10
|
+
@at-root {
|
11
|
+
@-ms-viewport { width: device-width; }
|
12
|
+
}
|
13
|
+
|
14
|
+
html {
|
15
|
+
box-sizing: border-box;
|
16
|
+
-ms-overflow-style: scrollbar;
|
17
|
+
}
|
18
|
+
|
19
|
+
*,
|
20
|
+
*::before,
|
21
|
+
*::after {
|
22
|
+
box-sizing: inherit;
|
23
|
+
}
|
5
24
|
|
6
25
|
|
7
26
|
//
|
8
27
|
// Variables
|
9
28
|
//
|
10
29
|
|
11
|
-
@import "bootstrap/custom";
|
12
30
|
@import "bootstrap/variables";
|
13
31
|
|
14
32
|
//
|
@@ -20,4 +38,6 @@
|
|
20
38
|
@import "bootstrap/mixins/grid-framework";
|
21
39
|
@import "bootstrap/mixins/grid";
|
22
40
|
|
41
|
+
@import "bootstrap/custom";
|
42
|
+
|
23
43
|
@import "bootstrap/grid";
|
@@ -2,10 +2,9 @@
|
|
2
2
|
//
|
3
3
|
// Includes only Normalize and our custom Reboot reset.
|
4
4
|
|
5
|
-
@import "bootstrap/custom";
|
6
5
|
@import "bootstrap/variables";
|
7
|
-
@import "bootstrap/mixins
|
8
|
-
@import "bootstrap/
|
6
|
+
@import "bootstrap/mixins";
|
7
|
+
@import "bootstrap/custom";
|
9
8
|
|
10
9
|
@import "bootstrap/normalize";
|
11
10
|
@import "bootstrap/reboot";
|
@@ -1,14 +1,14 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v4.0.0-alpha.
|
3
|
-
* Copyright 2011-
|
4
|
-
* Copyright 2011-
|
2
|
+
* Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
|
3
|
+
* Copyright 2011-2017 The Bootstrap Authors
|
4
|
+
* Copyright 2011-2017 Twitter, Inc.
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
6
6
|
*/
|
7
7
|
|
8
8
|
// Core variables and mixins
|
9
|
-
@import "bootstrap/custom";
|
10
9
|
@import "bootstrap/variables";
|
11
10
|
@import "bootstrap/mixins";
|
11
|
+
@import "bootstrap/custom";
|
12
12
|
|
13
13
|
// Reset and dependencies
|
14
14
|
@import "bootstrap/normalize";
|
@@ -25,7 +25,7 @@
|
|
25
25
|
@import "bootstrap/buttons";
|
26
26
|
|
27
27
|
// Components
|
28
|
-
@import "bootstrap/
|
28
|
+
@import "bootstrap/transitions";
|
29
29
|
@import "bootstrap/dropdown";
|
30
30
|
@import "bootstrap/button-group";
|
31
31
|
@import "bootstrap/input-group";
|
@@ -35,7 +35,7 @@
|
|
35
35
|
@import "bootstrap/card";
|
36
36
|
@import "bootstrap/breadcrumb";
|
37
37
|
@import "bootstrap/pagination";
|
38
|
-
@import "bootstrap/
|
38
|
+
@import "bootstrap/badge";
|
39
39
|
@import "bootstrap/jumbotron";
|
40
40
|
@import "bootstrap/alert";
|
41
41
|
@import "bootstrap/progress";
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
.alert {
|
6
6
|
padding: $alert-padding-y $alert-padding-x;
|
7
|
-
margin-bottom: $
|
7
|
+
margin-bottom: $alert-margin-bottom;
|
8
8
|
border: $alert-border-width solid transparent;
|
9
9
|
@include border-radius($alert-border-radius);
|
10
10
|
}
|
@@ -26,13 +26,12 @@
|
|
26
26
|
// Expand the right padding and account for the close button's positioning.
|
27
27
|
|
28
28
|
.alert-dismissible {
|
29
|
-
padding-right: ($alert-padding-x * 2);
|
30
|
-
|
31
29
|
// Adjust close link position
|
32
30
|
.close {
|
33
31
|
position: relative;
|
34
|
-
top:
|
32
|
+
top: -$alert-padding-y;
|
35
33
|
right: -$alert-padding-x;
|
34
|
+
padding: $alert-padding-y $alert-padding-x;
|
36
35
|
color: inherit;
|
37
36
|
}
|
38
37
|
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
// Base class
|
2
|
+
//
|
3
|
+
// Requires one of the contextual, color modifier classes for `color` and
|
4
|
+
// `background-color`.
|
5
|
+
|
6
|
+
.badge {
|
7
|
+
display: inline-block;
|
8
|
+
padding: $badge-padding-y $badge-padding-x;
|
9
|
+
font-size: $badge-font-size;
|
10
|
+
font-weight: $badge-font-weight;
|
11
|
+
line-height: 1;
|
12
|
+
color: $badge-color;
|
13
|
+
text-align: center;
|
14
|
+
white-space: nowrap;
|
15
|
+
vertical-align: baseline;
|
16
|
+
@include border-radius();
|
17
|
+
|
18
|
+
// Empty badges collapse automatically
|
19
|
+
&:empty {
|
20
|
+
display: none;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Quick fix for badges in buttons
|
25
|
+
.btn .badge {
|
26
|
+
position: relative;
|
27
|
+
top: -1px;
|
28
|
+
}
|
29
|
+
|
30
|
+
// scss-lint:disable QualifyingElement
|
31
|
+
// Add hover effects, but only for links
|
32
|
+
a.badge {
|
33
|
+
@include hover-focus {
|
34
|
+
color: $badge-link-hover-color;
|
35
|
+
text-decoration: none;
|
36
|
+
cursor: pointer;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
// scss-lint:enable QualifyingElement
|
40
|
+
|
41
|
+
// Pill badges
|
42
|
+
//
|
43
|
+
// Make them extra rounded with a modifier to replace v3's badges.
|
44
|
+
|
45
|
+
.badge-pill {
|
46
|
+
padding-right: $badge-pill-padding-x;
|
47
|
+
padding-left: $badge-pill-padding-x;
|
48
|
+
@include border-radius($badge-pill-border-radius);
|
49
|
+
}
|
50
|
+
|
51
|
+
// Colors
|
52
|
+
//
|
53
|
+
// Contextual variations (linked badges get darker on :hover).
|
54
|
+
|
55
|
+
.badge-default {
|
56
|
+
@include badge-variant($badge-default-bg);
|
57
|
+
}
|
58
|
+
|
59
|
+
.badge-primary {
|
60
|
+
@include badge-variant($badge-primary-bg);
|
61
|
+
}
|
62
|
+
|
63
|
+
.badge-success {
|
64
|
+
@include badge-variant($badge-success-bg);
|
65
|
+
}
|
66
|
+
|
67
|
+
.badge-info {
|
68
|
+
@include badge-variant($badge-info-bg);
|
69
|
+
}
|
70
|
+
|
71
|
+
.badge-warning {
|
72
|
+
@include badge-variant($badge-warning-bg);
|
73
|
+
}
|
74
|
+
|
75
|
+
.badge-danger {
|
76
|
+
@include badge-variant($badge-danger-bg);
|
77
|
+
}
|