comfortable_mexican_sofa 2.0.18 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +19 -14
  4. data/Gemfile +2 -2
  5. data/LICENSE +1 -1
  6. data/README.md +4 -2
  7. data/app/assets/config/manifest.js +0 -0
  8. data/app/assets/javascripts/comfy/admin/cms/application.js +1 -2
  9. data/app/assets/javascripts/comfy/vendor/bootstrap.bundle.min.js +7 -0
  10. data/app/assets/javascripts/comfy/vendor/bootstrap.bundle.min.js.map +1 -0
  11. data/app/assets/stylesheets/comfy/vendor/bootstrap/_alert.scss +1 -1
  12. data/app/assets/stylesheets/comfy/vendor/bootstrap/_badge.scss +8 -1
  13. data/app/assets/stylesheets/comfy/vendor/bootstrap/_breadcrumb.scss +0 -0
  14. data/app/assets/stylesheets/comfy/vendor/bootstrap/_button-group.scss +9 -18
  15. data/app/assets/stylesheets/comfy/vendor/bootstrap/_buttons.scss +9 -16
  16. data/app/assets/stylesheets/comfy/vendor/bootstrap/_card.scss +36 -48
  17. data/app/assets/stylesheets/comfy/vendor/bootstrap/_carousel.scss +37 -76
  18. data/app/assets/stylesheets/comfy/vendor/bootstrap/_close.scss +15 -8
  19. data/app/assets/stylesheets/comfy/vendor/bootstrap/_code.scss +5 -5
  20. data/app/assets/stylesheets/comfy/vendor/bootstrap/_custom-forms.scss +140 -54
  21. data/app/assets/stylesheets/comfy/vendor/bootstrap/_dropdown.scss +34 -9
  22. data/app/assets/stylesheets/comfy/vendor/bootstrap/_forms.scss +29 -34
  23. data/app/assets/stylesheets/comfy/vendor/bootstrap/_functions.scss +8 -8
  24. data/app/assets/stylesheets/comfy/vendor/bootstrap/_grid.scss +0 -0
  25. data/app/assets/stylesheets/comfy/vendor/bootstrap/_images.scss +2 -2
  26. data/app/assets/stylesheets/comfy/vendor/bootstrap/_input-group.scss +43 -8
  27. data/app/assets/stylesheets/comfy/vendor/bootstrap/_jumbotron.scss +1 -0
  28. data/app/assets/stylesheets/comfy/vendor/bootstrap/_list-group.scss +39 -5
  29. data/app/assets/stylesheets/comfy/vendor/bootstrap/_media.scss +0 -0
  30. data/app/assets/stylesheets/comfy/vendor/bootstrap/_mixins.scss +6 -0
  31. data/app/assets/stylesheets/comfy/vendor/bootstrap/_modal.scss +78 -17
  32. data/app/assets/stylesheets/comfy/vendor/bootstrap/_nav.scss +2 -0
  33. data/app/assets/stylesheets/comfy/vendor/bootstrap/_navbar.scss +9 -14
  34. data/app/assets/stylesheets/comfy/vendor/bootstrap/_pagination.scss +0 -5
  35. data/app/assets/stylesheets/comfy/vendor/bootstrap/_popover.scss +47 -59
  36. data/app/assets/stylesheets/comfy/vendor/bootstrap/_print.scss +1 -1
  37. data/app/assets/stylesheets/comfy/vendor/bootstrap/_progress.scss +15 -6
  38. data/app/assets/stylesheets/comfy/vendor/bootstrap/_reboot.scss +47 -44
  39. data/app/assets/stylesheets/comfy/vendor/bootstrap/_root.scss +0 -0
  40. data/app/assets/stylesheets/comfy/vendor/bootstrap/_spinners.scss +55 -0
  41. data/app/assets/stylesheets/comfy/vendor/bootstrap/_tables.scss +5 -8
  42. data/app/assets/stylesheets/comfy/vendor/bootstrap/_toasts.scss +44 -0
  43. data/app/assets/stylesheets/comfy/vendor/bootstrap/_tooltip.scss +1 -1
  44. data/app/assets/stylesheets/comfy/vendor/bootstrap/_transitions.scss +0 -2
  45. data/app/assets/stylesheets/comfy/vendor/bootstrap/_type.scss +16 -16
  46. data/app/assets/stylesheets/comfy/vendor/bootstrap/_utilities.scss +2 -0
  47. data/app/assets/stylesheets/comfy/vendor/bootstrap/_variables.scss +371 -177
  48. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-grid.scss +4 -7
  49. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-reboot.scss +3 -3
  50. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap.scss +5 -3
  51. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_alert.scss +0 -0
  52. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_background-variant.scss +0 -0
  53. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_badge.scss +7 -2
  54. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_border-radius.scss +29 -1
  55. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_box-shadow.scss +16 -1
  56. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_breakpoints.scss +3 -3
  57. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_buttons.scss +12 -14
  58. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_caret.scss +4 -8
  59. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_clearfix.scss +0 -0
  60. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_deprecate.scss +10 -0
  61. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_float.scss +3 -0
  62. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_forms.scss +58 -13
  63. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_gradients.scss +0 -0
  64. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_grid-framework.scss +3 -4
  65. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_grid.scss +9 -10
  66. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_hover.scss +1 -1
  67. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_image.scss +2 -2
  68. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_list-group.scss +0 -0
  69. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_lists.scss +0 -0
  70. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_nav-divider.scss +0 -0
  71. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_pagination.scss +1 -1
  72. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_reset-text.scss +1 -1
  73. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_resize.scss +0 -0
  74. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_screen-reader.scss +0 -0
  75. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_size.scss +1 -0
  76. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_table-row.scss +10 -1
  77. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-emphasis.scss +5 -3
  78. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-hide.scss +1 -3
  79. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-truncate.scss +0 -0
  80. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_transition.scss +5 -2
  81. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_visibility.scss +1 -0
  82. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_align.scss +0 -0
  83. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_background.scss +0 -0
  84. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_borders.scss +17 -1
  85. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_clearfix.scss +0 -0
  86. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_display.scss +6 -18
  87. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_embed.scss +7 -20
  88. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_flex.scss +0 -0
  89. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_float.scss +5 -3
  90. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_overflow.scss +5 -0
  91. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_position.scss +0 -5
  92. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_screenreaders.scss +0 -0
  93. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_shadows.scss +0 -0
  94. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_sizing.scss +8 -0
  95. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_spacing.scss +23 -1
  96. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_stretched-link.scss +19 -0
  97. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_text.scss +19 -5
  98. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_visibility.scss +4 -2
  99. data/app/assets/stylesheets/comfy/vendor/bootstrap/vendor/_rfs.scss +204 -0
  100. data/app/models/comfy/cms/file.rb +6 -1
  101. data/app/models/comfy/cms/fragment.rb +6 -2
  102. data/app/models/comfy/cms/layout.rb +16 -8
  103. data/app/models/comfy/cms/page.rb +12 -17
  104. data/app/views/comfy/admin/cms/files/index.html.haml +4 -2
  105. data/app/views/comfy/admin/cms/pages/_form.html.haml +2 -2
  106. data/app/views/comfy/admin/cms/pages/index.html.haml +2 -2
  107. data/config/locales/ar.yml +262 -0
  108. data/config/locales/ca.yml +0 -1
  109. data/config/locales/cs.yml +0 -1
  110. data/config/locales/da.yml +0 -1
  111. data/config/locales/de.yml +60 -61
  112. data/config/locales/en.yml +0 -1
  113. data/config/locales/es.yml +0 -1
  114. data/config/locales/fi.yml +0 -1
  115. data/config/locales/fr.yml +0 -1
  116. data/config/locales/gr.yml +0 -1
  117. data/config/locales/hr.yml +262 -0
  118. data/config/locales/it.yml +0 -1
  119. data/config/locales/ja.yml +0 -1
  120. data/config/locales/nb.yml +0 -1
  121. data/config/locales/nl.yml +0 -1
  122. data/config/locales/pl.yml +0 -1
  123. data/config/locales/pt-BR.yml +0 -1
  124. data/config/locales/ru.yml +0 -1
  125. data/config/locales/sk.yml +0 -1
  126. data/config/locales/sv.yml +0 -1
  127. data/config/locales/tr.yml +0 -1
  128. data/config/locales/uk.yml +0 -1
  129. data/config/locales/zh-CN.yml +0 -1
  130. data/config/locales/zh-TW.yml +0 -1
  131. data/lib/comfortable_mexican_sofa/configuration.rb +2 -0
  132. data/lib/comfortable_mexican_sofa/seeds.rb +6 -2
  133. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  134. data/lib/tasks/cms_seeds.rake +7 -7
  135. metadata +15 -5
  136. data/app/assets/javascripts/comfy/vendor/bootstrap.min.js +0 -7
  137. data/app/assets/javascripts/comfy/vendor/popper.min.js +0 -6
@@ -1,31 +1,39 @@
1
1
  // Notes on the classes:
2
2
  //
3
- // 1. The .carousel-item-left and .carousel-item-right is used to indicate where
3
+ // 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
4
+ // even when their scroll action started on a carousel, but for compatibility (with Firefox)
5
+ // we're preventing all actions instead
6
+ // 2. The .carousel-item-left and .carousel-item-right is used to indicate where
4
7
  // the active slide is heading.
5
- // 2. .active.carousel-item is the current slide.
6
- // 3. .active.carousel-item-left and .active.carousel-item-right is the current
8
+ // 3. .active.carousel-item is the current slide.
9
+ // 4. .active.carousel-item-left and .active.carousel-item-right is the current
7
10
  // slide in its in-transition state. Only one of these occurs at a time.
8
- // 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
11
+ // 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
9
12
  // is the upcoming slide in transition.
10
13
 
11
14
  .carousel {
12
15
  position: relative;
13
16
  }
14
17
 
18
+ .carousel.pointer-event {
19
+ touch-action: pan-y;
20
+ }
21
+
15
22
  .carousel-inner {
16
23
  position: relative;
17
24
  width: 100%;
18
25
  overflow: hidden;
26
+ @include clearfix();
19
27
  }
20
28
 
21
29
  .carousel-item {
22
30
  position: relative;
23
31
  display: none;
24
- align-items: center;
32
+ float: left;
25
33
  width: 100%;
26
- @include transition($carousel-transition);
34
+ margin-right: -100%;
27
35
  backface-visibility: hidden;
28
- perspective: 1000px;
36
+ @include transition($carousel-transition);
29
37
  }
30
38
 
31
39
  .carousel-item.active,
@@ -34,37 +42,14 @@
34
42
  display: block;
35
43
  }
36
44
 
37
- .carousel-item-next,
38
- .carousel-item-prev {
39
- position: absolute;
40
- top: 0;
41
- }
42
-
43
- .carousel-item-next.carousel-item-left,
44
- .carousel-item-prev.carousel-item-right {
45
- transform: translateX(0);
46
-
47
- @supports (transform-style: preserve-3d) {
48
- transform: translate3d(0, 0, 0);
49
- }
50
- }
51
-
52
- .carousel-item-next,
45
+ .carousel-item-next:not(.carousel-item-left),
53
46
  .active.carousel-item-right {
54
47
  transform: translateX(100%);
55
-
56
- @supports (transform-style: preserve-3d) {
57
- transform: translate3d(100%, 0, 0);
58
- }
59
48
  }
60
49
 
61
- .carousel-item-prev,
50
+ .carousel-item-prev:not(.carousel-item-right),
62
51
  .active.carousel-item-left {
63
52
  transform: translateX(-100%);
64
-
65
- @supports (transform-style: preserve-3d) {
66
- transform: translate3d(-100%, 0, 0);
67
- }
68
53
  }
69
54
 
70
55
 
@@ -75,31 +60,22 @@
75
60
  .carousel-fade {
76
61
  .carousel-item {
77
62
  opacity: 0;
78
- transition-duration: .6s;
79
63
  transition-property: opacity;
64
+ transform: none;
80
65
  }
81
66
 
82
67
  .carousel-item.active,
83
68
  .carousel-item-next.carousel-item-left,
84
69
  .carousel-item-prev.carousel-item-right {
70
+ z-index: 1;
85
71
  opacity: 1;
86
72
  }
87
73
 
88
74
  .active.carousel-item-left,
89
75
  .active.carousel-item-right {
76
+ z-index: 0;
90
77
  opacity: 0;
91
- }
92
-
93
- .carousel-item-next,
94
- .carousel-item-prev,
95
- .carousel-item.active,
96
- .active.carousel-item-left,
97
- .active.carousel-item-prev {
98
- transform: translateX(0);
99
-
100
- @supports (transform-style: preserve-3d) {
101
- transform: translate3d(0, 0, 0);
102
- }
78
+ @include transition(0s $carousel-transition-duration opacity);
103
79
  }
104
80
  }
105
81
 
@@ -113,6 +89,7 @@
113
89
  position: absolute;
114
90
  top: 0;
115
91
  bottom: 0;
92
+ z-index: 1;
116
93
  // Use flex for alignment (1-3)
117
94
  display: flex; // 1. allow flex styles
118
95
  align-items: center; // 2. vertically center contents
@@ -121,15 +98,14 @@
121
98
  color: $carousel-control-color;
122
99
  text-align: center;
123
100
  opacity: $carousel-control-opacity;
124
- // We can't have a transition here because WebKit cancels the carousel
125
- // animation if you trip this while in the middle of another animation.
101
+ @include transition($carousel-control-transition);
126
102
 
127
103
  // Hover/focus state
128
104
  @include hover-focus {
129
105
  color: $carousel-control-color;
130
106
  text-decoration: none;
131
107
  outline: 0;
132
- opacity: .9;
108
+ opacity: $carousel-control-hover-opacity;
133
109
  }
134
110
  }
135
111
  .carousel-control-prev {
@@ -151,8 +127,7 @@
151
127
  display: inline-block;
152
128
  width: $carousel-control-icon-width;
153
129
  height: $carousel-control-icon-width;
154
- background: transparent no-repeat center center;
155
- background-size: 100% 100%;
130
+ background: no-repeat 50% / 100% 100%;
156
131
  }
157
132
  .carousel-control-prev-icon {
158
133
  background-image: $carousel-control-prev-icon-bg;
@@ -170,7 +145,7 @@
170
145
  .carousel-indicators {
171
146
  position: absolute;
172
147
  right: 0;
173
- bottom: 10px;
148
+ bottom: 0;
174
149
  left: 0;
175
150
  z-index: 15;
176
151
  display: flex;
@@ -182,7 +157,7 @@
182
157
  list-style: none;
183
158
 
184
159
  li {
185
- position: relative;
160
+ box-sizing: content-box;
186
161
  flex: 0 1 auto;
187
162
  width: $carousel-indicator-width;
188
163
  height: $carousel-indicator-height;
@@ -190,31 +165,17 @@
190
165
  margin-left: $carousel-indicator-spacer;
191
166
  text-indent: -999px;
192
167
  cursor: pointer;
193
- background-color: rgba($carousel-indicator-active-bg, .5);
194
-
195
- // Use pseudo classes to increase the hit area by 10px on top and bottom.
196
- &::before {
197
- position: absolute;
198
- top: -10px;
199
- left: 0;
200
- display: inline-block;
201
- width: 100%;
202
- height: 10px;
203
- content: "";
204
- }
205
- &::after {
206
- position: absolute;
207
- bottom: -10px;
208
- left: 0;
209
- display: inline-block;
210
- width: 100%;
211
- height: 10px;
212
- content: "";
213
- }
168
+ background-color: $carousel-indicator-active-bg;
169
+ background-clip: padding-box;
170
+ // Use transparent borders to increase the hit area by 10px on top and bottom.
171
+ border-top: $carousel-indicator-hit-area-height solid transparent;
172
+ border-bottom: $carousel-indicator-hit-area-height solid transparent;
173
+ opacity: .5;
174
+ @include transition($carousel-indicator-transition);
214
175
  }
215
176
 
216
177
  .active {
217
- background-color: $carousel-indicator-active-bg;
178
+ opacity: 1;
218
179
  }
219
180
  }
220
181
 
@@ -225,9 +186,9 @@
225
186
 
226
187
  .carousel-caption {
227
188
  position: absolute;
228
- right: ((100% - $carousel-caption-width) / 2);
189
+ right: (100% - $carousel-caption-width) / 2;
229
190
  bottom: 20px;
230
- left: ((100% - $carousel-caption-width) / 2);
191
+ left: (100% - $carousel-caption-width) / 2;
231
192
  z-index: 10;
232
193
  padding-top: 20px;
233
194
  padding-bottom: 20px;
@@ -1,21 +1,22 @@
1
1
  .close {
2
2
  float: right;
3
- font-size: $close-font-size;
3
+ @include font-size($close-font-size);
4
4
  font-weight: $close-font-weight;
5
5
  line-height: 1;
6
6
  color: $close-color;
7
7
  text-shadow: $close-text-shadow;
8
8
  opacity: .5;
9
9
 
10
- @include hover-focus {
10
+ // Override <a>'s hover style
11
+ @include hover {
11
12
  color: $close-color;
12
13
  text-decoration: none;
13
- opacity: .75;
14
14
  }
15
15
 
16
- // Opinionated: add "hand" cursor to non-disabled .close elements
17
16
  &:not(:disabled):not(.disabled) {
18
- cursor: pointer;
17
+ @include hover-focus {
18
+ opacity: .75;
19
+ }
19
20
  }
20
21
  }
21
22
 
@@ -24,11 +25,17 @@
24
25
  // If you want the anchor version, it requires `href="#"`.
25
26
  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
26
27
 
27
- // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
28
+ // stylelint-disable-next-line selector-no-qualifying-type
28
29
  button.close {
29
30
  padding: 0;
30
31
  background-color: transparent;
31
32
  border: 0;
32
- -webkit-appearance: none;
33
+ appearance: none;
34
+ }
35
+
36
+ // Future-proof disabling of clicks on `<a>` elements
37
+
38
+ // stylelint-disable-next-line selector-no-qualifying-type
39
+ a.close.disabled {
40
+ pointer-events: none;
33
41
  }
34
- // stylelint-enable
@@ -1,6 +1,6 @@
1
1
  // Inline code
2
2
  code {
3
- font-size: $code-font-size;
3
+ @include font-size($code-font-size);
4
4
  color: $code-color;
5
5
  word-break: break-word;
6
6
 
@@ -13,7 +13,7 @@ code {
13
13
  // User input typically entered via keyboard
14
14
  kbd {
15
15
  padding: $kbd-padding-y $kbd-padding-x;
16
- font-size: $kbd-font-size;
16
+ @include font-size($kbd-font-size);
17
17
  color: $kbd-color;
18
18
  background-color: $kbd-bg;
19
19
  @include border-radius($border-radius-sm);
@@ -21,7 +21,7 @@ kbd {
21
21
 
22
22
  kbd {
23
23
  padding: 0;
24
- font-size: 100%;
24
+ @include font-size(100%);
25
25
  font-weight: $nested-kbd-font-weight;
26
26
  @include box-shadow(none);
27
27
  }
@@ -30,12 +30,12 @@ kbd {
30
30
  // Blocks of code
31
31
  pre {
32
32
  display: block;
33
- font-size: $code-font-size;
33
+ @include font-size($code-font-size);
34
34
  color: $pre-color;
35
35
 
36
36
  // Account for some code outputs that place code tags in pre tags
37
37
  code {
38
- font-size: inherit;
38
+ @include font-size(inherit);
39
39
  color: inherit;
40
40
  word-break: normal;
41
41
  }
@@ -10,8 +10,8 @@
10
10
  .custom-control {
11
11
  position: relative;
12
12
  display: block;
13
- min-height: (1rem * $line-height-base);
14
- padding-left: $custom-control-gutter;
13
+ min-height: $font-size-base * $line-height-base;
14
+ padding-left: $custom-control-gutter + $custom-control-indicator-size;
15
15
  }
16
16
 
17
17
  .custom-control-inline {
@@ -26,18 +26,28 @@
26
26
 
27
27
  &:checked ~ .custom-control-label::before {
28
28
  color: $custom-control-indicator-checked-color;
29
+ border-color: $custom-control-indicator-checked-border-color;
29
30
  @include gradient-bg($custom-control-indicator-checked-bg);
30
31
  @include box-shadow($custom-control-indicator-checked-box-shadow);
31
32
  }
32
33
 
33
34
  &:focus ~ .custom-control-label::before {
34
35
  // the mixin is not used here to make sure there is feedback
35
- box-shadow: $custom-control-indicator-focus-box-shadow;
36
+ @if $enable-shadows {
37
+ box-shadow: $input-box-shadow, $input-focus-box-shadow;
38
+ } @else {
39
+ box-shadow: $custom-control-indicator-focus-box-shadow;
40
+ }
41
+ }
42
+
43
+ &:focus:not(:checked) ~ .custom-control-label::before {
44
+ border-color: $custom-control-indicator-focus-border-color;
36
45
  }
37
46
 
38
- &:active ~ .custom-control-label::before {
47
+ &:not(:disabled):active ~ .custom-control-label::before {
39
48
  color: $custom-control-indicator-active-color;
40
49
  background-color: $custom-control-indicator-active-bg;
50
+ border-color: $custom-control-indicator-active-border-color;
41
51
  @include box-shadow($custom-control-indicator-active-box-shadow);
42
52
  }
43
53
 
@@ -59,34 +69,33 @@
59
69
  .custom-control-label {
60
70
  position: relative;
61
71
  margin-bottom: 0;
72
+ vertical-align: top;
62
73
 
63
74
  // Background-color and (when enabled) gradient
64
75
  &::before {
65
76
  position: absolute;
66
- top: (($line-height-base - $custom-control-indicator-size) / 2);
67
- left: -$custom-control-gutter;
77
+ top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
78
+ left: -($custom-control-gutter + $custom-control-indicator-size);
68
79
  display: block;
69
80
  width: $custom-control-indicator-size;
70
81
  height: $custom-control-indicator-size;
71
82
  pointer-events: none;
72
83
  content: "";
73
- user-select: none;
74
84
  background-color: $custom-control-indicator-bg;
85
+ border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
75
86
  @include box-shadow($custom-control-indicator-box-shadow);
76
87
  }
77
88
 
78
89
  // Foreground (icon)
79
90
  &::after {
80
91
  position: absolute;
81
- top: (($line-height-base - $custom-control-indicator-size) / 2);
82
- left: -$custom-control-gutter;
92
+ top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
93
+ left: -($custom-control-gutter + $custom-control-indicator-size);
83
94
  display: block;
84
95
  width: $custom-control-indicator-size;
85
96
  height: $custom-control-indicator-size;
86
97
  content: "";
87
- background-repeat: no-repeat;
88
- background-position: center center;
89
- background-size: $custom-control-indicator-bg-size;
98
+ background: no-repeat 50% / #{$custom-control-indicator-bg-size};
90
99
  }
91
100
  }
92
101
 
@@ -101,9 +110,6 @@
101
110
  }
102
111
 
103
112
  .custom-control-input:checked ~ .custom-control-label {
104
- &::before {
105
- @include gradient-bg($custom-control-indicator-checked-bg);
106
- }
107
113
  &::after {
108
114
  background-image: $custom-checkbox-indicator-icon-checked;
109
115
  }
@@ -111,6 +117,7 @@
111
117
 
112
118
  .custom-control-input:indeterminate ~ .custom-control-label {
113
119
  &::before {
120
+ border-color: $custom-checkbox-indicator-indeterminate-border-color;
114
121
  @include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
115
122
  @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
116
123
  }
@@ -135,15 +142,56 @@
135
142
 
136
143
  .custom-radio {
137
144
  .custom-control-label::before {
145
+ // stylelint-disable-next-line property-blacklist
138
146
  border-radius: $custom-radio-indicator-border-radius;
139
147
  }
140
148
 
141
149
  .custom-control-input:checked ~ .custom-control-label {
150
+ &::after {
151
+ background-image: $custom-radio-indicator-icon-checked;
152
+ }
153
+ }
154
+
155
+ .custom-control-input:disabled {
156
+ &:checked ~ .custom-control-label::before {
157
+ background-color: $custom-control-indicator-checked-disabled-bg;
158
+ }
159
+ }
160
+ }
161
+
162
+
163
+ // switches
164
+ //
165
+ // Tweak a few things for switches
166
+
167
+ .custom-switch {
168
+ padding-left: $custom-switch-width + $custom-control-gutter;
169
+
170
+ .custom-control-label {
142
171
  &::before {
143
- @include gradient-bg($custom-control-indicator-checked-bg);
172
+ left: -($custom-switch-width + $custom-control-gutter);
173
+ width: $custom-switch-width;
174
+ pointer-events: all;
175
+ // stylelint-disable-next-line property-blacklist
176
+ border-radius: $custom-switch-indicator-border-radius;
177
+ }
178
+
179
+ &::after {
180
+ top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
181
+ left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
182
+ width: $custom-switch-indicator-size;
183
+ height: $custom-switch-indicator-size;
184
+ background-color: $custom-control-indicator-border-color;
185
+ // stylelint-disable-next-line property-blacklist
186
+ border-radius: $custom-switch-indicator-border-radius;
187
+ @include transition(transform .15s ease-in-out, $custom-forms-transition);
144
188
  }
189
+ }
190
+
191
+ .custom-control-input:checked ~ .custom-control-label {
145
192
  &::after {
146
- background-image: $custom-radio-indicator-icon-checked;
193
+ background-color: $custom-control-indicator-bg;
194
+ transform: translateX($custom-switch-width - $custom-control-indicator-size);
147
195
  }
148
196
  }
149
197
 
@@ -166,23 +214,27 @@
166
214
  width: 100%;
167
215
  height: $custom-select-height;
168
216
  padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
217
+ font-family: $custom-select-font-family;
218
+ @include font-size($custom-select-font-size);
219
+ font-weight: $custom-select-font-weight;
169
220
  line-height: $custom-select-line-height;
170
221
  color: $custom-select-color;
171
222
  vertical-align: middle;
172
- background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
173
- background-size: $custom-select-bg-size;
223
+ background: $custom-select-background;
224
+ background-color: $custom-select-bg;
174
225
  border: $custom-select-border-width solid $custom-select-border-color;
175
- @if $enable-rounded {
176
- border-radius: $custom-select-border-radius;
177
- } @else {
178
- border-radius: 0;
179
- }
226
+ @include border-radius($custom-select-border-radius, 0);
227
+ @include box-shadow($custom-select-box-shadow);
180
228
  appearance: none;
181
229
 
182
230
  &:focus {
183
231
  border-color: $custom-select-focus-border-color;
184
232
  outline: 0;
185
- box-shadow: $custom-select-focus-box-shadow;
233
+ @if $enable-shadows {
234
+ box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
235
+ } @else {
236
+ box-shadow: $custom-select-focus-box-shadow;
237
+ }
186
238
 
187
239
  &::-ms-value {
188
240
  // For visual consistency with other platforms/browsers,
@@ -209,22 +261,24 @@
209
261
 
210
262
  // Hides the default caret in IE11
211
263
  &::-ms-expand {
212
- opacity: 0;
264
+ display: none;
213
265
  }
214
266
  }
215
267
 
216
268
  .custom-select-sm {
217
269
  height: $custom-select-height-sm;
218
- padding-top: $custom-select-padding-y;
219
- padding-bottom: $custom-select-padding-y;
220
- font-size: $custom-select-font-size-sm;
270
+ padding-top: $custom-select-padding-y-sm;
271
+ padding-bottom: $custom-select-padding-y-sm;
272
+ padding-left: $custom-select-padding-x-sm;
273
+ @include font-size($custom-select-font-size-sm);
221
274
  }
222
275
 
223
276
  .custom-select-lg {
224
277
  height: $custom-select-height-lg;
225
- padding-top: $custom-select-padding-y;
226
- padding-bottom: $custom-select-padding-y;
227
- font-size: $custom-select-font-size-lg;
278
+ padding-top: $custom-select-padding-y-lg;
279
+ padding-bottom: $custom-select-padding-y-lg;
280
+ padding-left: $custom-select-padding-x-lg;
281
+ @include font-size($custom-select-font-size-lg);
228
282
  }
229
283
 
230
284
 
@@ -251,10 +305,10 @@
251
305
  &:focus ~ .custom-file-label {
252
306
  border-color: $custom-file-focus-border-color;
253
307
  box-shadow: $custom-file-focus-box-shadow;
308
+ }
254
309
 
255
- &::after {
256
- border-color: $custom-file-focus-border-color;
257
- }
310
+ &:disabled ~ .custom-file-label {
311
+ background-color: $custom-file-disabled-bg;
258
312
  }
259
313
 
260
314
  @each $lang, $value in $custom-file-text {
@@ -262,6 +316,10 @@
262
316
  content: $value;
263
317
  }
264
318
  }
319
+
320
+ ~ .custom-file-label[data-browse]::after {
321
+ content: attr(data-browse);
322
+ }
265
323
  }
266
324
 
267
325
  .custom-file-label {
@@ -272,6 +330,8 @@
272
330
  z-index: 1;
273
331
  height: $custom-file-height;
274
332
  padding: $custom-file-padding-y $custom-file-padding-x;
333
+ font-family: $custom-file-font-family;
334
+ font-weight: $custom-file-font-weight;
275
335
  line-height: $custom-file-line-height;
276
336
  color: $custom-file-color;
277
337
  background-color: $custom-file-bg;
@@ -292,7 +352,7 @@
292
352
  color: $custom-file-button-color;
293
353
  content: "Browse";
294
354
  @include gradient-bg($custom-file-button-bg);
295
- border-left: $custom-file-border-width solid $custom-file-border-color;
355
+ border-left: inherit;
296
356
  @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
297
357
  }
298
358
  }
@@ -305,12 +365,19 @@
305
365
 
306
366
  .custom-range {
307
367
  width: 100%;
308
- padding-left: 0; // Firefox specific
368
+ height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
369
+ padding: 0; // Need to reset padding
309
370
  background-color: transparent;
310
371
  appearance: none;
311
372
 
312
373
  &:focus {
313
374
  outline: none;
375
+
376
+ // Pseudo-elements must be split across multiple rulesets to have an effect.
377
+ // No box-shadow() mixin for focus accessibility.
378
+ &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
379
+ &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
380
+ &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
314
381
  }
315
382
 
316
383
  &::-moz-focus-outer {
@@ -320,18 +387,14 @@
320
387
  &::-webkit-slider-thumb {
321
388
  width: $custom-range-thumb-width;
322
389
  height: $custom-range-thumb-height;
323
- margin-top: -($custom-range-thumb-width * .25); // Webkit specific?
390
+ margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
324
391
  @include gradient-bg($custom-range-thumb-bg);
325
392
  border: $custom-range-thumb-border;
326
393
  @include border-radius($custom-range-thumb-border-radius);
327
394
  @include box-shadow($custom-range-thumb-box-shadow);
395
+ @include transition($custom-forms-transition);
328
396
  appearance: none;
329
397
 
330
- &:focus {
331
- outline: none;
332
- box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
333
- }
334
-
335
398
  &:active {
336
399
  @include gradient-bg($custom-range-thumb-active-bg);
337
400
  }
@@ -355,13 +418,9 @@
355
418
  border: $custom-range-thumb-border;
356
419
  @include border-radius($custom-range-thumb-border-radius);
357
420
  @include box-shadow($custom-range-thumb-box-shadow);
421
+ @include transition($custom-forms-transition);
358
422
  appearance: none;
359
423
 
360
- &:focus {
361
- outline: none;
362
- box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
363
- }
364
-
365
424
  &:active {
366
425
  @include gradient-bg($custom-range-thumb-active-bg);
367
426
  }
@@ -381,17 +440,16 @@
381
440
  &::-ms-thumb {
382
441
  width: $custom-range-thumb-width;
383
442
  height: $custom-range-thumb-height;
443
+ margin-top: 0; // Edge specific
444
+ margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
445
+ margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
384
446
  @include gradient-bg($custom-range-thumb-bg);
385
447
  border: $custom-range-thumb-border;
386
448
  @include border-radius($custom-range-thumb-border-radius);
387
449
  @include box-shadow($custom-range-thumb-box-shadow);
450
+ @include transition($custom-forms-transition);
388
451
  appearance: none;
389
452
 
390
- &:focus {
391
- outline: none;
392
- box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
393
- }
394
-
395
453
  &:active {
396
454
  @include gradient-bg($custom-range-thumb-active-bg);
397
455
  }
@@ -404,7 +462,7 @@
404
462
  cursor: $custom-range-track-cursor;
405
463
  background-color: transparent;
406
464
  border-color: transparent;
407
- border-width: ($custom-range-thumb-height * .5);
465
+ border-width: $custom-range-thumb-height / 2;
408
466
  @include box-shadow($custom-range-track-box-shadow);
409
467
  }
410
468
 
@@ -418,4 +476,32 @@
418
476
  background-color: $custom-range-track-bg;
419
477
  @include border-radius($custom-range-track-border-radius);
420
478
  }
479
+
480
+ &:disabled {
481
+ &::-webkit-slider-thumb {
482
+ background-color: $custom-range-thumb-disabled-bg;
483
+ }
484
+
485
+ &::-webkit-slider-runnable-track {
486
+ cursor: default;
487
+ }
488
+
489
+ &::-moz-range-thumb {
490
+ background-color: $custom-range-thumb-disabled-bg;
491
+ }
492
+
493
+ &::-moz-range-track {
494
+ cursor: default;
495
+ }
496
+
497
+ &::-ms-thumb {
498
+ background-color: $custom-range-thumb-disabled-bg;
499
+ }
500
+ }
501
+ }
502
+
503
+ .custom-control-label::before,
504
+ .custom-file-label,
505
+ .custom-select {
506
+ @include transition($custom-forms-transition);
421
507
  }