bootstrap 4.1.3 → 5.0.0

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.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -2
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +7 -4
  5. data/Rakefile +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +226 -166
  7. data/assets/javascripts/bootstrap/base-component.js +63 -0
  8. data/assets/javascripts/bootstrap/button.js +119 -165
  9. data/assets/javascripts/bootstrap/carousel.js +634 -445
  10. data/assets/javascripts/bootstrap/collapse.js +447 -327
  11. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +550 -425
  16. data/assets/javascripts/bootstrap/modal.js +695 -492
  17. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  18. data/assets/javascripts/bootstrap/popover.js +167 -217
  19. data/assets/javascripts/bootstrap/scrollspy.js +319 -302
  20. data/assets/javascripts/bootstrap/tab.js +303 -221
  21. data/assets/javascripts/bootstrap/toast.js +333 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +896 -577
  23. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  24. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  25. data/assets/javascripts/bootstrap-sprockets.js +15 -7
  26. data/assets/javascripts/bootstrap.js +4262 -3163
  27. data/assets/javascripts/bootstrap.min.js +4 -4
  28. data/assets/stylesheets/_bootstrap-grid.scss +54 -21
  29. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  30. data/assets/stylesheets/_bootstrap.scss +21 -11
  31. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  32. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  33. data/assets/stylesheets/bootstrap/_badge.scss +3 -21
  34. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
  35. data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
  36. data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
  37. data/assets/stylesheets/bootstrap/_card.scss +55 -141
  38. data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
  39. data/assets/stylesheets/bootstrap/_close.scss +33 -28
  40. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  41. data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
  42. data/assets/stylesheets/bootstrap/_forms.scss +9 -333
  43. data/assets/stylesheets/bootstrap/_functions.scss +148 -29
  44. data/assets/stylesheets/bootstrap/_grid.scss +4 -34
  45. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  46. data/assets/stylesheets/bootstrap/_images.scss +4 -4
  47. data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
  48. data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
  49. data/assets/stylesheets/bootstrap/_modal.scss +90 -42
  50. data/assets/stylesheets/bootstrap/_nav.scss +31 -10
  51. data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
  52. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
  54. data/assets/stylesheets/bootstrap/_popover.scss +63 -88
  55. data/assets/stylesheets/bootstrap/_progress.scss +20 -6
  56. data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
  57. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  58. data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +79 -116
  60. data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
  61. data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
  62. data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
  63. data/assets/stylesheets/bootstrap/_type.scss +42 -63
  64. data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
  65. data/assets/stylesheets/bootstrap/_variables.scss +952 -440
  66. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  72. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  74. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  75. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  76. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  77. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  78. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  79. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  80. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  81. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  82. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  83. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +57 -14
  84. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
  85. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
  86. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
  87. data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
  88. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  89. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  90. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  91. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  92. data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
  93. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  94. data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
  95. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  96. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  97. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
  98. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  99. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  100. data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
  101. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  102. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  103. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  104. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +312 -0
  105. data/bootstrap.gemspec +7 -6
  106. data/lib/bootstrap/engine.rb +3 -0
  107. data/lib/bootstrap/version.rb +4 -2
  108. data/lib/bootstrap.rb +10 -7
  109. data/tasks/updater/js.rb +20 -5
  110. data/tasks/updater/network.rb +8 -2
  111. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  112. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  113. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  114. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  115. data/test/dummy_rails/app/views/pages/root.html +89 -0
  116. data/test/dummy_rails/config/application.rb +0 -3
  117. data/test/gemfiles/rails_6_0.gemfile +7 -0
  118. data/test/gemfiles/rails_6_1.gemfile +7 -0
  119. data/test/support/dummy_rails_integration.rb +3 -1
  120. data/test/test_helper.rb +18 -13
  121. metadata +64 -79
  122. data/assets/javascripts/bootstrap/util.js +0 -143
  123. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  124. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
  125. data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
  126. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
  127. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  128. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  129. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  130. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
  131. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
  132. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
  133. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  134. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  135. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
  136. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
  137. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
  138. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
  139. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
  140. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
  141. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  142. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  143. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
  144. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
  145. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
  146. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  147. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
  148. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
  149. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  150. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  151. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
  152. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
  153. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
  154. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
  155. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  156. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,3 +1,4 @@
1
+ // scss-docs-start caret-mixins
1
2
  @mixin caret-down {
2
3
  border-top: $caret-width solid;
3
4
  border-right: $caret-width solid transparent;
@@ -12,14 +13,14 @@
12
13
  border-left: $caret-width solid transparent;
13
14
  }
14
15
 
15
- @mixin caret-right {
16
+ @mixin caret-end {
16
17
  border-top: $caret-width solid transparent;
17
18
  border-right: 0;
18
19
  border-bottom: $caret-width solid transparent;
19
20
  border-left: $caret-width solid;
20
21
  }
21
22
 
22
- @mixin caret-left {
23
+ @mixin caret-start {
23
24
  border-top: $caret-width solid transparent;
24
25
  border-right: $caret-width solid;
25
26
  border-bottom: $caret-width solid transparent;
@@ -29,33 +30,29 @@
29
30
  @if $enable-caret {
30
31
  &::after {
31
32
  display: inline-block;
32
- width: 0;
33
- height: 0;
34
- margin-left: $caret-width * .85;
35
- vertical-align: $caret-width * .85;
33
+ margin-left: $caret-spacing;
34
+ vertical-align: $caret-vertical-align;
36
35
  content: "";
37
36
  @if $direction == down {
38
- @include caret-down;
37
+ @include caret-down();
39
38
  } @else if $direction == up {
40
- @include caret-up;
41
- } @else if $direction == right {
42
- @include caret-right;
39
+ @include caret-up();
40
+ } @else if $direction == end {
41
+ @include caret-end();
43
42
  }
44
43
  }
45
44
 
46
- @if $direction == left {
45
+ @if $direction == start {
47
46
  &::after {
48
47
  display: none;
49
48
  }
50
49
 
51
50
  &::before {
52
51
  display: inline-block;
53
- width: 0;
54
- height: 0;
55
- margin-right: $caret-width * .85;
56
- vertical-align: $caret-width * .85;
52
+ margin-right: $caret-spacing;
53
+ vertical-align: $caret-vertical-align;
57
54
  content: "";
58
- @include caret-left;
55
+ @include caret-start();
59
56
  }
60
57
  }
61
58
 
@@ -64,3 +61,4 @@
64
61
  }
65
62
  }
66
63
  }
64
+ // scss-docs-end caret-mixins
@@ -1,3 +1,4 @@
1
+ // scss-docs-start clearfix
1
2
  @mixin clearfix() {
2
3
  &::after {
3
4
  display: block;
@@ -5,3 +6,4 @@
5
6
  content: "";
6
7
  }
7
8
  }
9
+ // scss-docs-end clearfix
@@ -0,0 +1,7 @@
1
+ // scss-docs-start mixin-color-scheme
2
+ @mixin color-scheme($name) {
3
+ @media (prefers-color-scheme: #{$name}) {
4
+ @content;
5
+ }
6
+ }
7
+ // scss-docs-end mixin-color-scheme
@@ -0,0 +1,9 @@
1
+ // Container mixins
2
+
3
+ @mixin make-container($gutter: $container-padding-x) {
4
+ width: 100%;
5
+ padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});
6
+ padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});
7
+ margin-right: auto;
8
+ margin-left: auto;
9
+ }
@@ -0,0 +1,10 @@
1
+ // Deprecate mixin
2
+ //
3
+ // This mixin can be used to deprecate mixins or functions.
4
+ // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5
+ // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6
+ @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7
+ @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8
+ @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9
+ }
10
+ }
@@ -1,37 +1,34 @@
1
- // Form control focus state
2
- //
3
- // Generate a customized focus state and for any input with the specified color,
4
- // which defaults to the `$input-focus-border-color` variable.
5
- //
6
- // We highly encourage you to not customize the default value, but instead use
7
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
8
- // WebKit's default styles, but applicable to a wider range of browsers. Its
9
- // usability and accessibility should be taken into account with any change.
10
- //
11
- // Example usage: change the default blue border and shadow to white for better
12
- // contrast against a dark gray background.
13
- @mixin form-control-focus() {
14
- &:focus {
15
- color: $input-focus-color;
16
- background-color: $input-focus-bg;
17
- border-color: $input-focus-border-color;
18
- outline: 0;
19
- // Avoid using mixin so we can pass custom focus shadow properly
20
- @if $enable-shadows {
21
- box-shadow: $input-box-shadow, $input-focus-box-shadow;
22
- } @else {
23
- box-shadow: $input-focus-box-shadow;
1
+ // This mixin uses an `if()` technique to be compatible with Dart Sass
2
+ // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
3
+
4
+ // scss-docs-start form-validation-mixins
5
+ @mixin form-validation-state-selector($state) {
6
+ @if ($state == "valid" or $state == "invalid") {
7
+ .was-validated #{if(&, "&", "")}:#{$state},
8
+ #{if(&, "&", "")}.is-#{$state} {
9
+ @content;
10
+ }
11
+ } @else {
12
+ #{if(&, "&", "")}.is-#{$state} {
13
+ @content;
24
14
  }
25
15
  }
26
16
  }
27
17
 
28
-
29
- @mixin form-validation-state($state, $color) {
18
+ @mixin form-validation-state(
19
+ $state,
20
+ $color,
21
+ $icon,
22
+ $tooltip-color: color-contrast($color),
23
+ $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
24
+ $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity)
25
+ ) {
30
26
  .#{$state}-feedback {
31
27
  display: none;
32
28
  width: 100%;
33
29
  margin-top: $form-feedback-margin-top;
34
- font-size: $form-feedback-font-size;
30
+ @include font-size($form-feedback-font-size);
31
+ font-style: $form-feedback-font-style;
35
32
  color: $color;
36
33
  }
37
34
 
@@ -41,107 +38,100 @@
41
38
  z-index: 5;
42
39
  display: none;
43
40
  max-width: 100%; // Contain to parent when possible
44
- padding: $tooltip-padding-y $tooltip-padding-x;
41
+ padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
45
42
  margin-top: .1rem;
46
- font-size: $tooltip-font-size;
47
- line-height: $line-height-base;
48
- color: color-yiq($color);
49
- background-color: rgba($color, $tooltip-opacity);
50
- @include border-radius($tooltip-border-radius);
43
+ @include font-size($form-feedback-tooltip-font-size);
44
+ line-height: $form-feedback-tooltip-line-height;
45
+ color: $tooltip-color;
46
+ background-color: $tooltip-bg-color;
47
+ @include border-radius($form-feedback-tooltip-border-radius);
51
48
  }
52
49
 
53
- .form-control,
54
- .custom-select {
55
- .was-validated &:#{$state},
56
- &.is-#{$state} {
57
- border-color: $color;
58
-
59
- &:focus {
60
- border-color: $color;
61
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
62
- }
63
-
64
- ~ .#{$state}-feedback,
65
- ~ .#{$state}-tooltip {
66
- display: block;
67
- }
50
+ @include form-validation-state-selector($state) {
51
+ ~ .#{$state}-feedback,
52
+ ~ .#{$state}-tooltip {
53
+ display: block;
68
54
  }
69
55
  }
70
56
 
71
- .form-control-file {
72
- .was-validated &:#{$state},
73
- &.is-#{$state} {
74
- ~ .#{$state}-feedback,
75
- ~ .#{$state}-tooltip {
76
- display: block;
77
- }
78
- }
79
- }
57
+ .form-control {
58
+ @include form-validation-state-selector($state) {
59
+ border-color: $color;
80
60
 
81
- .form-check-input {
82
- .was-validated &:#{$state},
83
- &.is-#{$state} {
84
- ~ .form-check-label {
85
- color: $color;
61
+ @if $enable-validation-icons {
62
+ padding-right: $input-height-inner;
63
+ background-image: escape-svg($icon);
64
+ background-repeat: no-repeat;
65
+ background-position: right $input-height-inner-quarter center;
66
+ background-size: $input-height-inner-half $input-height-inner-half;
86
67
  }
87
68
 
88
- ~ .#{$state}-feedback,
89
- ~ .#{$state}-tooltip {
90
- display: block;
69
+ &:focus {
70
+ border-color: $color;
71
+ box-shadow: $focus-box-shadow;
91
72
  }
92
73
  }
93
74
  }
94
75
 
95
- .custom-control-input {
96
- .was-validated &:#{$state},
97
- &.is-#{$state} {
98
- ~ .custom-control-label {
99
- color: $color;
100
-
101
- &::before {
102
- background-color: lighten($color, 25%);
103
- }
76
+ // stylelint-disable-next-line selector-no-qualifying-type
77
+ textarea.form-control {
78
+ @include form-validation-state-selector($state) {
79
+ @if $enable-validation-icons {
80
+ padding-right: $input-height-inner;
81
+ background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
104
82
  }
83
+ }
84
+ }
105
85
 
106
- ~ .#{$state}-feedback,
107
- ~ .#{$state}-tooltip {
108
- display: block;
109
- }
86
+ .form-select {
87
+ @include form-validation-state-selector($state) {
88
+ border-color: $color;
110
89
 
111
- &:checked {
112
- ~ .custom-control-label::before {
113
- @include gradient-bg(lighten($color, 10%));
90
+ @if $enable-validation-icons {
91
+ &:not([multiple]):not([size]),
92
+ &:not([multiple])[size="1"] {
93
+ padding-right: $form-select-feedback-icon-padding-end;
94
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
95
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
96
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
114
97
  }
115
98
  }
116
99
 
117
100
  &:focus {
118
- ~ .custom-control-label::before {
119
- box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-focus-width rgba($color, .25);
120
- }
101
+ border-color: $color;
102
+ box-shadow: $focus-box-shadow;
121
103
  }
122
104
  }
123
105
  }
124
106
 
125
- // custom file
126
- .custom-file-input {
127
- .was-validated &:#{$state},
128
- &.is-#{$state} {
129
- ~ .custom-file-label {
130
- border-color: $color;
107
+ .form-check-input {
108
+ @include form-validation-state-selector($state) {
109
+ border-color: $color;
131
110
 
132
- &::after { border-color: inherit; }
111
+ &:checked {
112
+ background-color: $color;
133
113
  }
134
114
 
135
- ~ .#{$state}-feedback,
136
- ~ .#{$state}-tooltip {
137
- display: block;
115
+ &:focus {
116
+ box-shadow: $focus-box-shadow;
138
117
  }
139
118
 
140
- &:focus {
141
- ~ .custom-file-label {
142
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
143
- }
119
+ ~ .form-check-label {
120
+ color: $color;
144
121
  }
145
122
  }
146
123
  }
124
+ .form-check-inline .form-check-input {
125
+ ~ .#{$state}-feedback {
126
+ margin-left: .5em;
127
+ }
128
+ }
129
+
130
+ .input-group .form-control,
131
+ .input-group .form-select {
132
+ @include form-validation-state-selector($state) {
133
+ z-index: 3;
134
+ }
135
+ }
147
136
  }
137
+ // scss-docs-end form-validation-mixins
@@ -1,45 +1,47 @@
1
1
  // Gradients
2
2
 
3
- @mixin gradient-bg($color) {
3
+ // scss-docs-start gradient-bg-mixin
4
+ @mixin gradient-bg($color: null) {
5
+ background-color: $color;
6
+
4
7
  @if $enable-gradients {
5
- background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
6
- } @else {
7
- background-color: $color;
8
+ background-image: var(--#{$variable-prefix}gradient);
8
9
  }
9
10
  }
11
+ // scss-docs-end gradient-bg-mixin
10
12
 
13
+ // scss-docs-start gradient-mixins
11
14
  // Horizontal gradient, from left to right
12
15
  //
13
16
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
14
17
  @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
15
18
  background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
16
- background-repeat: repeat-x;
17
19
  }
18
20
 
19
21
  // Vertical gradient, from top to bottom
20
22
  //
21
23
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
22
- @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
24
+ @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
23
25
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
24
- background-repeat: repeat-x;
25
26
  }
26
27
 
27
28
  @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
28
29
  background-image: linear-gradient($deg, $start-color, $end-color);
29
- background-repeat: repeat-x;
30
30
  }
31
+
31
32
  @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
32
33
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
33
- background-repeat: no-repeat;
34
34
  }
35
+
35
36
  @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
36
37
  background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
37
- background-repeat: no-repeat;
38
38
  }
39
+
39
40
  @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
40
41
  background-image: radial-gradient(circle, $inner-color, $outer-color);
41
- background-repeat: no-repeat;
42
42
  }
43
+
43
44
  @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
44
45
  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
45
46
  }
47
+ // scss-docs-end gradient-mixins
@@ -2,51 +2,124 @@
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
- @mixin make-container() {
6
- width: 100%;
7
- padding-right: ($grid-gutter-width / 2);
8
- padding-left: ($grid-gutter-width / 2);
9
- margin-right: auto;
10
- margin-left: auto;
11
- }
12
-
13
-
14
- // For each breakpoint, define the maximum width of the container in a media query
15
- @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
16
- @each $breakpoint, $container-max-width in $max-widths {
17
- @include media-breakpoint-up($breakpoint, $breakpoints) {
18
- max-width: $container-max-width;
19
- }
20
- }
21
- }
22
-
23
- @mixin make-row() {
5
+ @mixin make-row($gutter: $grid-gutter-width) {
6
+ --#{$variable-prefix}gutter-x: #{$gutter};
7
+ --#{$variable-prefix}gutter-y: 0;
24
8
  display: flex;
25
9
  flex-wrap: wrap;
26
- margin-right: ($grid-gutter-width / -2);
27
- margin-left: ($grid-gutter-width / -2);
10
+ margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list
11
+ margin-right: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
12
+ margin-left: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
28
13
  }
29
14
 
30
- @mixin make-col-ready() {
31
- position: relative;
15
+ @mixin make-col-ready($gutter: $grid-gutter-width) {
16
+ // Add box sizing if only the grid is loaded
17
+ box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
32
18
  // Prevent columns from becoming too narrow when at smaller grid tiers by
33
- // always setting `width: 100%;`. This works because we use `flex` values
19
+ // always setting `width: 100%;`. This works because we set the width
34
20
  // later on to override this initial width.
21
+ flex-shrink: 0;
35
22
  width: 100%;
36
- min-height: 1px; // Prevent collapsing
37
- padding-right: ($grid-gutter-width / 2);
38
- padding-left: ($grid-gutter-width / 2);
23
+ max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
24
+ padding-right: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
25
+ padding-left: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
26
+ margin-top: var(--#{$variable-prefix}gutter-y);
27
+ }
28
+
29
+ @mixin make-col($size: false, $columns: $grid-columns) {
30
+ @if $size {
31
+ flex: 0 0 auto;
32
+ width: percentage($size / $columns);
33
+ } @else {
34
+ flex: 1 1 0;
35
+ max-width: 100%;
36
+ }
39
37
  }
40
38
 
41
- @mixin make-col($size, $columns: $grid-columns) {
42
- flex: 0 0 percentage($size / $columns);
43
- // Add a `max-width` to ensure content within each column does not blow out
44
- // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
45
- // do not appear to require this.
46
- max-width: percentage($size / $columns);
39
+ @mixin make-col-auto() {
40
+ flex: 0 0 auto;
41
+ width: auto;
47
42
  }
48
43
 
49
44
  @mixin make-col-offset($size, $columns: $grid-columns) {
50
45
  $num: $size / $columns;
51
46
  margin-left: if($num == 0, 0, percentage($num));
52
47
  }
48
+
49
+ // Row columns
50
+ //
51
+ // Specify on a parent element(e.g., .row) to force immediate children into NN
52
+ // numberof columns. Supports wrapping to new lines, but does not do a Masonry
53
+ // style grid.
54
+ @mixin row-cols($count) {
55
+ > * {
56
+ flex: 0 0 auto;
57
+ width: 100% / $count;
58
+ }
59
+ }
60
+
61
+ // Framework grid generation
62
+ //
63
+ // Used only by Bootstrap to generate the correct number of grid classes given
64
+ // any value of `$grid-columns`.
65
+
66
+ @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
67
+ @each $breakpoint in map-keys($breakpoints) {
68
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
69
+
70
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
71
+ // Provide basic `.col-{bp}` classes for equal-width flexbox columns
72
+ .col#{$infix} {
73
+ flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
74
+ }
75
+
76
+ .row-cols#{$infix}-auto > * {
77
+ @include make-col-auto();
78
+ }
79
+
80
+ @if $grid-row-columns > 0 {
81
+ @for $i from 1 through $grid-row-columns {
82
+ .row-cols#{$infix}-#{$i} {
83
+ @include row-cols($i);
84
+ }
85
+ }
86
+ }
87
+
88
+ .col#{$infix}-auto {
89
+ @include make-col-auto();
90
+ }
91
+
92
+ @if $columns > 0 {
93
+ @for $i from 1 through $columns {
94
+ .col#{$infix}-#{$i} {
95
+ @include make-col($i, $columns);
96
+ }
97
+ }
98
+
99
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
100
+ @for $i from 0 through ($columns - 1) {
101
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
102
+ .offset#{$infix}-#{$i} {
103
+ @include make-col-offset($i, $columns);
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ // Gutters
110
+ //
111
+ // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
112
+ @each $key, $value in $gutters {
113
+ .g#{$infix}-#{$key},
114
+ .gx#{$infix}-#{$key} {
115
+ --#{$variable-prefix}gutter-x: #{$value};
116
+ }
117
+
118
+ .g#{$infix}-#{$key},
119
+ .gy#{$infix}-#{$key} {
120
+ --#{$variable-prefix}gutter-y: #{$value};
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
@@ -14,23 +14,3 @@
14
14
  // when setting a width and height attribute on the img element.
15
15
  height: auto;
16
16
  }
17
-
18
-
19
- // Retina image
20
- //
21
- // Short retina mixin for setting background-image and -size.
22
-
23
- // stylelint-disable indentation, media-query-list-comma-newline-after
24
- @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
25
- background-image: url($file-1x);
26
-
27
- // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
28
- // but doesn't convert dppx=>dpi.
29
- // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
30
- // Compatibility info: https://caniuse.com/#feat=css-media-resolution
31
- @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
32
- only screen and (min-resolution: 2dppx) { // Standardized
33
- background-image: url($file-2x);
34
- background-size: $width-1x $height-1x;
35
- }
36
- }
@@ -1,14 +1,16 @@
1
1
  // List Groups
2
2
 
3
+ // scss-docs-start list-group-mixin
3
4
  @mixin list-group-item-variant($state, $background, $color) {
4
5
  .list-group-item-#{$state} {
5
6
  color: $color;
6
7
  background-color: $background;
7
8
 
8
9
  &.list-group-item-action {
9
- @include hover-focus {
10
+ &:hover,
11
+ &:focus {
10
12
  color: $color;
11
- background-color: darken($background, 5%);
13
+ background-color: shade-color($background, 10%);
12
14
  }
13
15
 
14
16
  &.active {
@@ -19,3 +21,4 @@
19
21
  }
20
22
  }
21
23
  }
24
+ // scss-docs-end list-group-mixin
@@ -1,22 +1,31 @@
1
1
  // Pagination
2
2
 
3
- @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
3
+ // scss-docs-start pagination-mixin
4
+ @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
4
5
  .page-link {
5
6
  padding: $padding-y $padding-x;
6
- font-size: $font-size;
7
- line-height: $line-height;
7
+ @include font-size($font-size);
8
8
  }
9
9
 
10
10
  .page-item {
11
- &:first-child {
12
- .page-link {
13
- @include border-left-radius($border-radius);
11
+ @if $pagination-margin-start == (-$pagination-border-width) {
12
+ &:first-child {
13
+ .page-link {
14
+ @include border-start-radius($border-radius);
15
+ }
14
16
  }
15
- }
16
- &:last-child {
17
+
18
+ &:last-child {
19
+ .page-link {
20
+ @include border-end-radius($border-radius);
21
+ }
22
+ }
23
+ } @else {
24
+ //Add border-radius to all pageLinks in case they have left margin
17
25
  .page-link {
18
- @include border-right-radius($border-radius);
26
+ @include border-radius($border-radius);
19
27
  }
20
28
  }
21
29
  }
22
30
  }
31
+ // scss-docs-end pagination-mixin
@@ -1,11 +1,11 @@
1
1
  @mixin reset-text {
2
2
  font-family: $font-family-base;
3
- // We deliberately do NOT reset font-size or word-wrap.
3
+ // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
4
4
  font-style: normal;
5
5
  font-weight: $font-weight-normal;
6
6
  line-height: $line-height-base;
7
7
  text-align: left; // Fallback for where `start` is not supported
8
- text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties
8
+ text-align: start;
9
9
  text-decoration: none;
10
10
  text-shadow: none;
11
11
  text-transform: none;