bootstrap 4.4.1 → 5.0.0.alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +12 -2
- data/README.md +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +12 -8
- data/assets/javascripts/bootstrap.js +2094 -1562
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +145 -83
- data/assets/javascripts/bootstrap/button.js +66 -152
- data/assets/javascripts/bootstrap/carousel.js +307 -241
- data/assets/javascripts/bootstrap/collapse.js +287 -183
- data/assets/javascripts/bootstrap/dom/data.js +81 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +315 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +96 -0
- data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
- data/assets/javascripts/bootstrap/dropdown.js +255 -261
- data/assets/javascripts/bootstrap/modal.js +364 -270
- data/assets/javascripts/bootstrap/popover.js +72 -113
- data/assets/javascripts/bootstrap/scrollspy.js +162 -147
- data/assets/javascripts/bootstrap/tab.js +176 -108
- data/assets/javascripts/bootstrap/toast.js +179 -139
- data/assets/javascripts/bootstrap/tooltip.js +369 -259
- data/assets/stylesheets/_bootstrap-grid.scss +54 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +17 -11
- data/assets/stylesheets/bootstrap/_alert.scss +6 -7
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
- data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
- data/assets/stylesheets/bootstrap/_buttons.scss +25 -40
- data/assets/stylesheets/bootstrap/_card.scss +43 -79
- data/assets/stylesheets/bootstrap/_carousel.scss +30 -15
- data/assets/stylesheets/bootstrap/_close.scss +31 -31
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +54 -9
- data/assets/stylesheets/bootstrap/_forms.scss +9 -338
- data/assets/stylesheets/bootstrap/_functions.scss +97 -25
- data/assets/stylesheets/bootstrap/_grid.scss +3 -50
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +16 -17
- data/assets/stylesheets/bootstrap/_mixins.scss +7 -13
- data/assets/stylesheets/bootstrap/_modal.scss +41 -45
- data/assets/stylesheets/bootstrap/_nav.scss +16 -9
- data/assets/stylesheets/bootstrap/_navbar.scss +43 -74
- data/assets/stylesheets/bootstrap/_pagination.scss +11 -20
- data/assets/stylesheets/bootstrap/_popover.scss +5 -5
- data/assets/stylesheets/bootstrap/_progress.scss +2 -3
- data/assets/stylesheets/bootstrap/_reboot.scss +310 -175
- data/assets/stylesheets/bootstrap/_root.scss +5 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +5 -4
- data/assets/stylesheets/bootstrap/_tables.scss +80 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +6 -2
- data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +531 -17
- data/assets/stylesheets/bootstrap/_variables.scss +609 -444
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
- data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -22
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +69 -51
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +22 -66
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +84 -33
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +28 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +3 -3
- data/tasks/updater/network.rb +2 -2
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- metadata +36 -41
- data/assets/javascripts/bootstrap/util.js +0 -188
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -521
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -191
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -22
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -71
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Select
|
|
2
|
+
//
|
|
3
|
+
// Replaces the browser default select with a custom one, mostly pulled from
|
|
4
|
+
// https://primer.github.io/.
|
|
5
|
+
|
|
6
|
+
.form-select {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: $form-select-height;
|
|
10
|
+
padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x;
|
|
11
|
+
font-family: $form-select-font-family;
|
|
12
|
+
@include font-size($form-select-font-size);
|
|
13
|
+
font-weight: $form-select-font-weight;
|
|
14
|
+
line-height: $form-select-line-height;
|
|
15
|
+
color: $form-select-color;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
background-color: $form-select-bg;
|
|
18
|
+
background-image: escape-svg($form-select-indicator);
|
|
19
|
+
background-repeat: no-repeat;
|
|
20
|
+
background-position: $form-select-bg-position;
|
|
21
|
+
background-size: $form-select-bg-size;
|
|
22
|
+
border: $form-select-border-width solid $form-select-border-color;
|
|
23
|
+
@include border-radius($form-select-border-radius, 0);
|
|
24
|
+
@include box-shadow($form-select-box-shadow);
|
|
25
|
+
appearance: none;
|
|
26
|
+
|
|
27
|
+
&:focus {
|
|
28
|
+
border-color: $form-select-focus-border-color;
|
|
29
|
+
outline: 0;
|
|
30
|
+
@if $enable-shadows {
|
|
31
|
+
@include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
|
|
32
|
+
} @else {
|
|
33
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
34
|
+
box-shadow: $form-select-focus-box-shadow;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&::-ms-value {
|
|
38
|
+
// For visual consistency with other platforms/browsers,
|
|
39
|
+
// suppress the default white text on blue background highlight given to
|
|
40
|
+
// the selected option text when the (still closed) <select> receives focus
|
|
41
|
+
// in Edge.
|
|
42
|
+
// See https://github.com/twbs/bootstrap/issues/19398.
|
|
43
|
+
color: $input-color;
|
|
44
|
+
background-color: $input-bg;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[multiple],
|
|
49
|
+
&[size]:not([size="1"]) {
|
|
50
|
+
height: auto;
|
|
51
|
+
padding-right: $form-select-padding-x;
|
|
52
|
+
background-image: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:disabled {
|
|
56
|
+
color: $form-select-disabled-color;
|
|
57
|
+
background-color: $form-select-disabled-bg;
|
|
58
|
+
border-color: $form-select-disabled-border-color;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Remove outline from select box in FF
|
|
62
|
+
&:-moz-focusring {
|
|
63
|
+
color: transparent;
|
|
64
|
+
text-shadow: 0 0 0 $form-select-color;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.form-select-sm {
|
|
69
|
+
height: $form-select-height-sm;
|
|
70
|
+
padding-top: $form-select-padding-y-sm;
|
|
71
|
+
padding-bottom: $form-select-padding-y-sm;
|
|
72
|
+
padding-left: $form-select-padding-x-sm;
|
|
73
|
+
@include font-size($form-select-font-size-sm);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.form-select-lg {
|
|
77
|
+
height: $form-select-height-lg;
|
|
78
|
+
padding-top: $form-select-padding-y-lg;
|
|
79
|
+
padding-bottom: $form-select-padding-y-lg;
|
|
80
|
+
padding-left: $form-select-padding-x-lg;
|
|
81
|
+
@include font-size($form-select-font-size-lg);
|
|
82
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Base styles
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.input-group {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap; // For form validation feedback
|
|
9
|
+
align-items: stretch;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
> .form-control,
|
|
13
|
+
> .form-select,
|
|
14
|
+
> .form-file {
|
|
15
|
+
position: relative; // For focus state's z-index
|
|
16
|
+
flex: 1 1 auto;
|
|
17
|
+
width: 1%;
|
|
18
|
+
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Bring the "active" form control to the top of surrounding elements
|
|
22
|
+
> .form-control:focus,
|
|
23
|
+
> .form-select:focus,
|
|
24
|
+
> .form-file .form-file-input:focus ~ .form-file-label {
|
|
25
|
+
z-index: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Bring the custom file input above the label
|
|
29
|
+
> .form-file {
|
|
30
|
+
> .form-file-input:focus {
|
|
31
|
+
z-index: 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:not(:last-child) > .form-file-label {
|
|
35
|
+
@include border-right-radius(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:not(:first-child) > .form-file-label {
|
|
39
|
+
@include border-left-radius(0);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Ensure buttons are always above inputs for more visually pleasing borders.
|
|
44
|
+
// This isn't needed for `.input-group-text` since it shares the same border-color
|
|
45
|
+
// as our inputs.
|
|
46
|
+
.btn {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
z-index: 3;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
// Textual addons
|
|
58
|
+
//
|
|
59
|
+
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
|
60
|
+
// to prepend or append to an input.
|
|
61
|
+
|
|
62
|
+
.input-group-text {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: $input-group-addon-padding-y $input-group-addon-padding-x;
|
|
66
|
+
@include font-size($input-font-size); // Match inputs
|
|
67
|
+
font-weight: $input-group-addon-font-weight;
|
|
68
|
+
line-height: $input-line-height;
|
|
69
|
+
color: $input-group-addon-color;
|
|
70
|
+
text-align: center;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
background-color: $input-group-addon-bg;
|
|
73
|
+
border: $input-border-width solid $input-group-addon-border-color;
|
|
74
|
+
@include border-radius($input-border-radius);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// Sizing
|
|
79
|
+
//
|
|
80
|
+
// Remix the default form control sizing classes into new ones for easier
|
|
81
|
+
// manipulation.
|
|
82
|
+
|
|
83
|
+
.input-group-lg > .form-control {
|
|
84
|
+
min-height: $input-height-lg;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.input-group-lg > .form-select {
|
|
88
|
+
height: $input-height-lg;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.input-group-lg > .form-control,
|
|
92
|
+
.input-group-lg > .form-select,
|
|
93
|
+
.input-group-lg > .input-group-text,
|
|
94
|
+
.input-group-lg > .btn {
|
|
95
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
96
|
+
@include font-size($input-font-size-lg);
|
|
97
|
+
@include border-radius($input-border-radius-lg);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.input-group-sm > .form-control {
|
|
101
|
+
min-height: $input-height-sm;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.input-group-sm > .form-select {
|
|
105
|
+
height: $input-height-sm;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.input-group-sm > .form-control,
|
|
109
|
+
.input-group-sm > .form-select,
|
|
110
|
+
.input-group-sm > .input-group-text,
|
|
111
|
+
.input-group-sm > .btn {
|
|
112
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
113
|
+
@include font-size($input-font-size-sm);
|
|
114
|
+
@include border-radius($input-border-radius-sm);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.input-group-lg > .form-select,
|
|
118
|
+
.input-group-sm > .form-select {
|
|
119
|
+
padding-right: $form-select-padding-x + $form-select-indicator-padding;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// Rounded corners
|
|
124
|
+
//
|
|
125
|
+
// These rulesets must come after the sizing ones to properly override sm and lg
|
|
126
|
+
// border-radius values when extending. They're more specific than we'd like
|
|
127
|
+
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
|
128
|
+
|
|
129
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
130
|
+
.input-group {
|
|
131
|
+
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
|
|
132
|
+
> .dropdown-toggle:nth-last-child(n + 3) {
|
|
133
|
+
@include border-right-radius(0);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
> :not(:first-child):not(.dropdown-menu) {
|
|
137
|
+
margin-left: -$input-border-width;
|
|
138
|
+
@include border-left-radius(0);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Labels
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.form-label {
|
|
6
|
+
margin-bottom: $form-label-margin-bottom;
|
|
7
|
+
@include font-size($form-label-font-size);
|
|
8
|
+
font-style: $form-label-font-style;
|
|
9
|
+
font-weight: $form-label-font-weight;
|
|
10
|
+
color: $form-label-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// For use with horizontal and inline forms, when you need the label (or legend)
|
|
14
|
+
// text to align with the form controls.
|
|
15
|
+
.col-form-label {
|
|
16
|
+
padding-top: add($input-padding-y, $input-border-width);
|
|
17
|
+
padding-bottom: add($input-padding-y, $input-border-width);
|
|
18
|
+
margin-bottom: 0; // Override the `<legend>` default
|
|
19
|
+
@include font-size(inherit); // Override the `<legend>` default
|
|
20
|
+
font-style: $form-label-font-style;
|
|
21
|
+
font-weight: $form-label-font-weight;
|
|
22
|
+
line-height: $input-line-height;
|
|
23
|
+
color: $form-label-color;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.col-form-label-lg {
|
|
27
|
+
padding-top: add($input-padding-y-lg, $input-border-width);
|
|
28
|
+
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
|
29
|
+
@include font-size($input-font-size-lg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.col-form-label-sm {
|
|
33
|
+
padding-top: add($input-padding-y-sm, $input-border-width);
|
|
34
|
+
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
|
35
|
+
@include font-size($input-font-size-sm);
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Form validation
|
|
2
|
+
//
|
|
3
|
+
// Provide feedback to users when form field values are valid or invalid. Works
|
|
4
|
+
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
|
5
|
+
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
|
6
|
+
// server-side validation.
|
|
7
|
+
|
|
8
|
+
// scss-docs-start form-validation-states-loop
|
|
9
|
+
@each $state, $data in $form-validation-states {
|
|
10
|
+
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
|
11
|
+
}
|
|
12
|
+
// scss-docs-end form-validation-states-loop
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@each $color, $value in $theme-colors {
|
|
2
|
+
.link-#{$color} {
|
|
3
|
+
color: $value;
|
|
4
|
+
|
|
5
|
+
@if $emphasized-link-hover-darken-percentage != 0 {
|
|
6
|
+
&:hover,
|
|
7
|
+
&:focus {
|
|
8
|
+
color: if(color-contrast($value) == $color-contrast-light, darken($value, $emphasized-link-hover-darken-percentage), lighten($value, $emphasized-link-hover-darken-percentage));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Shorthand
|
|
2
|
+
|
|
3
|
+
.fixed-top {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
z-index: $zindex-fixed;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fixed-bottom {
|
|
12
|
+
position: fixed;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: $zindex-fixed;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Responsive sticky top
|
|
20
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
21
|
+
@include media-breakpoint-up($breakpoint) {
|
|
22
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
23
|
+
|
|
24
|
+
.sticky#{$infix}-top {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: $zindex-sticky;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
2
|
+
|
|
3
|
+
.ratio {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
&::before {
|
|
8
|
+
display: block;
|
|
9
|
+
padding-top: var(--aspect-ratio);
|
|
10
|
+
content: "";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> * {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@each $key, $ratio in $aspect-ratios {
|
|
23
|
+
.ratio-#{$key} {
|
|
24
|
+
--aspect-ratio: #{$ratio};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,63 +1,76 @@
|
|
|
1
|
-
// stylelint-disable property-
|
|
1
|
+
// stylelint-disable property-disallowed-list
|
|
2
2
|
// Single side border-radius
|
|
3
3
|
|
|
4
|
+
// Helper function to replace negative values with 0
|
|
5
|
+
@function valid-radius($radius) {
|
|
6
|
+
$return: ();
|
|
7
|
+
@each $value in $radius {
|
|
8
|
+
@if type-of($value) == number {
|
|
9
|
+
$return: append($return, max($value, 0));
|
|
10
|
+
} @else {
|
|
11
|
+
$return: append($return, $value);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@return $return;
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
|
5
18
|
@if $enable-rounded {
|
|
6
|
-
border-radius: $radius;
|
|
19
|
+
border-radius: valid-radius($radius);
|
|
7
20
|
}
|
|
8
21
|
@else if $fallback-border-radius != false {
|
|
9
22
|
border-radius: $fallback-border-radius;
|
|
10
23
|
}
|
|
11
24
|
}
|
|
12
25
|
|
|
13
|
-
@mixin border-top-radius($radius) {
|
|
26
|
+
@mixin border-top-radius($radius: $border-radius) {
|
|
14
27
|
@if $enable-rounded {
|
|
15
|
-
border-top-left-radius: $radius;
|
|
16
|
-
border-top-right-radius: $radius;
|
|
28
|
+
border-top-left-radius: valid-radius($radius);
|
|
29
|
+
border-top-right-radius: valid-radius($radius);
|
|
17
30
|
}
|
|
18
31
|
}
|
|
19
32
|
|
|
20
|
-
@mixin border-right-radius($radius) {
|
|
33
|
+
@mixin border-right-radius($radius: $border-radius) {
|
|
21
34
|
@if $enable-rounded {
|
|
22
|
-
border-top-right-radius: $radius;
|
|
23
|
-
border-bottom-right-radius: $radius;
|
|
35
|
+
border-top-right-radius: valid-radius($radius);
|
|
36
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
24
37
|
}
|
|
25
38
|
}
|
|
26
39
|
|
|
27
|
-
@mixin border-bottom-radius($radius) {
|
|
40
|
+
@mixin border-bottom-radius($radius: $border-radius) {
|
|
28
41
|
@if $enable-rounded {
|
|
29
|
-
border-bottom-right-radius: $radius;
|
|
30
|
-
border-bottom-left-radius: $radius;
|
|
42
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
43
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
31
44
|
}
|
|
32
45
|
}
|
|
33
46
|
|
|
34
|
-
@mixin border-left-radius($radius) {
|
|
47
|
+
@mixin border-left-radius($radius: $border-radius) {
|
|
35
48
|
@if $enable-rounded {
|
|
36
|
-
border-top-left-radius: $radius;
|
|
37
|
-
border-bottom-left-radius: $radius;
|
|
49
|
+
border-top-left-radius: valid-radius($radius);
|
|
50
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
38
51
|
}
|
|
39
52
|
}
|
|
40
53
|
|
|
41
|
-
@mixin border-top-left-radius($radius) {
|
|
54
|
+
@mixin border-top-left-radius($radius: $border-radius) {
|
|
42
55
|
@if $enable-rounded {
|
|
43
|
-
border-top-left-radius: $radius;
|
|
56
|
+
border-top-left-radius: valid-radius($radius);
|
|
44
57
|
}
|
|
45
58
|
}
|
|
46
59
|
|
|
47
|
-
@mixin border-top-right-radius($radius) {
|
|
60
|
+
@mixin border-top-right-radius($radius: $border-radius) {
|
|
48
61
|
@if $enable-rounded {
|
|
49
|
-
border-top-right-radius: $radius;
|
|
62
|
+
border-top-right-radius: valid-radius($radius);
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
|
|
53
|
-
@mixin border-bottom-right-radius($radius) {
|
|
66
|
+
@mixin border-bottom-right-radius($radius: $border-radius) {
|
|
54
67
|
@if $enable-rounded {
|
|
55
|
-
border-bottom-right-radius: $radius;
|
|
68
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
56
69
|
}
|
|
57
70
|
}
|
|
58
71
|
|
|
59
|
-
@mixin border-bottom-left-radius($radius) {
|
|
72
|
+
@mixin border-bottom-left-radius($radius: $border-radius) {
|
|
60
73
|
@if $enable-rounded {
|
|
61
|
-
border-bottom-left-radius: $radius;
|
|
74
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
62
75
|
}
|
|
63
76
|
}
|