bullframe.css 4.2.1 → 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 (144) hide show
  1. package/.browserslistrc +2 -3
  2. package/.editorconfig +15 -0
  3. package/.gitattributes +1 -0
  4. package/.htmlhintrc +12 -0
  5. package/.prettierignore +1 -0
  6. package/.stylelintignore +3 -0
  7. package/.stylelintrc.json +21 -5
  8. package/CHANGELOG.md +289 -301
  9. package/README.md +371 -327
  10. package/dist/css/bullframe-classless-dark-prefers.css +378 -267
  11. package/dist/css/bullframe-classless-dark-prefers.css.map +1 -0
  12. package/dist/css/bullframe-classless-dark-prefers.min.css +2 -3
  13. package/dist/css/bullframe-classless-dark-prefers.min.css.map +1 -1
  14. package/dist/css/bullframe-classless-dark.css +384 -251
  15. package/dist/css/bullframe-classless-dark.css.map +1 -0
  16. package/dist/css/bullframe-classless-dark.min.css +2 -3
  17. package/dist/css/bullframe-classless-dark.min.css.map +1 -1
  18. package/dist/css/bullframe-classless-system-default.css +378 -267
  19. package/dist/css/bullframe-classless-system-default.css.map +1 -0
  20. package/dist/css/bullframe-classless-system-default.min.css +2 -3
  21. package/dist/css/bullframe-classless-system-default.min.css.map +1 -1
  22. package/dist/css/bullframe-classless.css +343 -227
  23. package/dist/css/bullframe-classless.css.map +1 -0
  24. package/dist/css/bullframe-classless.min.css +2 -2
  25. package/dist/css/bullframe-classless.min.css.map +1 -1
  26. package/dist/css/bullframe-dark-prefers.css +399 -462
  27. package/dist/css/bullframe-dark-prefers.css.map +1 -0
  28. package/dist/css/bullframe-dark-prefers.min.css +2 -2
  29. package/dist/css/bullframe-dark-prefers.min.css.map +1 -1
  30. package/dist/css/bullframe-dark.css +401 -373
  31. package/dist/css/bullframe-dark.css.map +1 -0
  32. package/dist/css/bullframe-dark.min.css +2 -2
  33. package/dist/css/bullframe-dark.min.css.map +1 -1
  34. package/dist/css/bullframe-system-default.css +396 -389
  35. package/dist/css/bullframe-system-default.css.map +1 -0
  36. package/dist/css/bullframe-system-default.min.css +2 -2
  37. package/dist/css/bullframe-system-default.min.css.map +1 -1
  38. package/dist/css/bullframe-utilities.css +69 -109
  39. package/dist/css/bullframe-utilities.css.map +1 -0
  40. package/dist/css/bullframe-utilities.min.css +1 -1
  41. package/dist/css/bullframe-utilities.min.css.map +1 -1
  42. package/dist/css/bullframe.css +370 -348
  43. package/dist/css/bullframe.css.map +1 -0
  44. package/dist/css/bullframe.min.css +2 -1
  45. package/dist/css/bullframe.min.css.map +1 -1
  46. package/dist/docs/demo/css/style.css +131 -0
  47. package/{docs/test-page → dist/docs/demo}/index.html +166 -358
  48. package/dist/docs/github-readme/bf-logo-full-dark.png +0 -0
  49. package/package.json +26 -30
  50. package/prettier.config.js +26 -0
  51. package/src/docs/demo/css/style.css +131 -0
  52. package/src/docs/demo/icons/android-chrome-192x192.png +0 -0
  53. package/src/docs/demo/icons/android-chrome-384x384.png +0 -0
  54. package/src/docs/demo/icons/apple-touch-icon.png +0 -0
  55. package/src/docs/demo/icons/favicon-16x16.png +0 -0
  56. package/src/docs/demo/icons/favicon-32x32.png +0 -0
  57. package/src/docs/demo/icons/favicon.ico +0 -0
  58. package/src/docs/demo/icons/mstile-150x150.png +0 -0
  59. package/src/docs/demo/icons/safari-pinned-tab.svg +28 -0
  60. package/src/docs/demo/images/logo.png +0 -0
  61. package/src/docs/demo/images/placeholder-img-130x140.jpg +0 -0
  62. package/src/docs/demo/images/placeholder-img-16x16.jpg +0 -0
  63. package/src/docs/demo/images/placeholder-img-800x400.jpg +0 -0
  64. package/src/docs/demo/images/video-poster.png +0 -0
  65. package/src/docs/demo/index.html +1152 -0
  66. package/src/docs/github-readme/bf-logo-full-dark.png +0 -0
  67. package/src/docs/github-readme/bf-logo-full-light.png +0 -0
  68. package/src/scss/bullframe-classless-dark-prefers.scss +2 -5
  69. package/src/scss/bullframe-classless-dark.scss +2 -5
  70. package/src/scss/bullframe-classless-system-default.scss +2 -5
  71. package/src/scss/bullframe-classless.scss +49 -43
  72. package/src/scss/bullframe-dark-prefers.scss +2 -4
  73. package/src/scss/bullframe-dark.scss +2 -4
  74. package/src/scss/bullframe-system-default.scss +2 -4
  75. package/src/scss/bullframe-utilities.scss +21 -61
  76. package/src/scss/bullframe.scss +49 -121
  77. package/src/scss/custom/_author-styles.scss +5 -0
  78. package/src/scss/forms/_forms-normalization.scss +68 -58
  79. package/src/scss/forms/_forms-styling-radio-checkbox.scss +64 -66
  80. package/src/scss/forms/_forms-styling-range.scss +88 -74
  81. package/src/scss/forms/_forms-styling-select.scss +18 -16
  82. package/src/scss/forms/_forms-styling.scss +38 -26
  83. package/src/scss/miscellaneous/_misc-accessibility.scss +10 -16
  84. package/src/scss/miscellaneous/_misc-anchors.scss +15 -13
  85. package/src/scss/miscellaneous/_misc-embedded-content.scss +14 -21
  86. package/src/scss/miscellaneous/_misc-focus.scss +0 -21
  87. package/src/scss/miscellaneous/_misc-interactive.scss +48 -0
  88. package/src/scss/miscellaneous/_misc-lists.scss +9 -5
  89. package/src/scss/miscellaneous/_misc-scrolling.scss +5 -0
  90. package/src/scss/miscellaneous/_misc-shame.scss +6 -0
  91. package/src/scss/miscellaneous/_misc-tables.scss +17 -5
  92. package/src/scss/mixins/_mixin-dark-prefers.scss +414 -0
  93. package/src/scss/mixins/_mixin-dark.scss +396 -0
  94. package/src/scss/mixins/_mixin-grid-flex.scss +0 -3
  95. package/src/scss/mixins/_mixin-layout.scss +1 -1
  96. package/src/scss/mixins/_mixin-texts.scss +2 -3
  97. package/src/scss/typography/_typography-blockquotes.scss +10 -5
  98. package/src/scss/typography/_typography-headings.scss +9 -8
  99. package/src/scss/typography/_typography-html-body.scss +17 -14
  100. package/src/scss/typography/_typography-misc.scss +19 -22
  101. package/src/scss/typography/_typography-monospaced-elements.scss +21 -12
  102. package/src/scss/utilities/_utility-buttons.scss +20 -18
  103. package/src/scss/utilities/_utility-debugging.scss +2 -88
  104. package/src/scss/utilities/_utility-embeds.scss +1 -1
  105. package/src/scss/utilities/_utility-filters.scss +0 -3
  106. package/src/scss/utilities/_utility-form-states.scss +30 -21
  107. package/src/scss/utilities/_utility-global-dark-classless.scss +3 -157
  108. package/src/scss/utilities/_utility-global-dark-prefers-classless.scss +3 -3
  109. package/src/scss/utilities/_utility-global-dark-prefers.scss +3 -3
  110. package/src/scss/utilities/_utility-global-dark-scrollbars.scss +11 -6
  111. package/src/scss/utilities/_utility-global-dark.scss +4 -213
  112. package/src/scss/utilities/_utility-global-system-default-classless.scss +3 -3
  113. package/src/scss/utilities/_utility-global-system-default.scss +3 -3
  114. package/src/scss/utilities/_utility-grid-system.scss +51 -115
  115. package/src/scss/utilities/_utility-layout.scss +7 -15
  116. package/src/scss/utilities/_utility-print.scss +5 -5
  117. package/src/scss/utilities/_utility-spacing.scss +42 -40
  118. package/src/scss/utilities/_utility-tables.scss +12 -18
  119. package/src/scss/utilities/_utility-texts.scss +48 -22
  120. package/src/scss/utilities/_utility-z-index.scss +1 -1
  121. package/src/scss/variables/_variables-breakpoints.scss +1 -0
  122. package/src/scss/variables/_variables-colors.scss +8 -5
  123. package/src/scss/variables/_variables-spacing.scss +3 -5
  124. package/src/scss/variables/_variables-texts.scss +5 -9
  125. package/vite.config.js +116 -0
  126. package/.nvmrc +0 -1
  127. package/LICENSE +0 -21
  128. package/gulpfile.js +0 -74
  129. package/netlify.toml +0 -3
  130. package/src/scss/miscellaneous/_misc-author-styles-in-css.scss +0 -76
  131. /package/{docs/test-page/assets → dist/docs/demo}/icons/android-chrome-192x192.png +0 -0
  132. /package/{docs/test-page/assets → dist/docs/demo}/icons/android-chrome-384x384.png +0 -0
  133. /package/{docs/test-page/assets → dist/docs/demo}/icons/apple-touch-icon.png +0 -0
  134. /package/{docs/test-page/assets → dist/docs/demo}/icons/favicon-16x16.png +0 -0
  135. /package/{docs/test-page/assets → dist/docs/demo}/icons/favicon-32x32.png +0 -0
  136. /package/{docs/test-page/assets → dist/docs/demo}/icons/favicon.ico +0 -0
  137. /package/{docs/test-page/assets → dist/docs/demo}/icons/mstile-150x150.png +0 -0
  138. /package/{docs/test-page/assets → dist/docs/demo}/icons/safari-pinned-tab.svg +0 -0
  139. /package/{docs/test-page/assets → dist/docs/demo}/images/logo.png +0 -0
  140. /package/{docs/test-page/assets → dist/docs/demo}/images/placeholder-img-130x140.jpg +0 -0
  141. /package/{docs/test-page/assets → dist/docs/demo}/images/placeholder-img-16x16.jpg +0 -0
  142. /package/{docs/test-page/assets → dist/docs/demo}/images/placeholder-img-800x400.jpg +0 -0
  143. /package/{docs/test-page/assets → dist/docs/demo}/images/video-poster.png +0 -0
  144. /package/{docs/assets/images/branding/logo-full.png → dist/docs/github-readme/bf-logo-full-light.png} +0 -0
@@ -1,3 +1,9 @@
1
+ @use "../variables/variables-colors" as bf-v-color;
2
+ @use "../variables/variables-texts" as bf-v-text;
3
+ @use "../variables/variables-spacing" as bf-v-space;
4
+ @use "../variables/variables-breakpoints" as bf-v-bp;
5
+ @use "sass:color";
6
+
1
7
  // normalization, enhancement and responsiveness
2
8
 
3
9
  html input,
@@ -13,8 +19,8 @@ textarea {
13
19
 
14
20
  html input,
15
21
  button,
16
- [type='radio'],
17
- [type='checkbox'],
22
+ [type="radio"],
23
+ [type="checkbox"],
18
24
  select,
19
25
  optgroup,
20
26
  textarea {
@@ -31,12 +37,12 @@ legend {
31
37
  // re-set width auto where needed
32
38
  html label,
33
39
  button,
34
- [type='image'],
35
- [type='submit'],
36
- [type='reset'],
37
- html [type='button'],
38
- [type='radio'],
39
- [type='checkbox'] {
40
+ [type="image"],
41
+ [type="submit"],
42
+ [type="reset"],
43
+ html [type="button"],
44
+ [type="radio"],
45
+ [type="checkbox"] {
40
46
  width: auto;
41
47
  }
42
48
 
@@ -47,14 +53,14 @@ label,
47
53
  select,
48
54
  textarea,
49
55
  button,
50
- html [type='button'],
51
- [type='reset'],
52
- [type='submit'],
56
+ html [type="button"],
57
+ [type="reset"],
58
+ [type="submit"],
53
59
  output {
54
60
  display: inline-block;
55
61
  }
56
62
 
57
- [type='file'] {
63
+ [type="file"] {
58
64
  display: block;
59
65
  background-color: transparent;
60
66
  }
@@ -92,8 +98,8 @@ legend {
92
98
  border: 0;
93
99
  padding: 0;
94
100
  font-weight: 400;
95
- margin-bottom: $bf-spacing-md-px;
96
- margin-bottom: $bf-spacing-md-rem;
101
+ margin-bottom: bf-v-space.$bf-spacing-md-px;
102
+ margin-bottom: bf-v-space.$bf-spacing-md-rem;
97
103
  font-size: inherit;
98
104
  line-height: 1.375;
99
105
  color: inherit;
@@ -103,8 +109,8 @@ label {
103
109
  font-weight: 400;
104
110
  font-size: 90%;
105
111
  line-height: 1.375;
106
- margin-bottom: $bf-spacing-md-px;
107
- margin-bottom: $bf-spacing-md-rem;
112
+ margin-bottom: bf-v-space.$bf-spacing-md-px;
113
+ margin-bottom: bf-v-space.$bf-spacing-md-rem;
108
114
  }
109
115
 
110
116
  label input,
@@ -113,8 +119,7 @@ label textarea {
113
119
  font-size: 110%;
114
120
  }
115
121
 
116
- [type='number']::-webkit-outer-spin-button,
117
- [type='number']::-webkit-inner-spin-button {
122
+ ::-webkit-inner-spin-button {
118
123
  height: auto;
119
124
  }
120
125
 
@@ -132,9 +137,8 @@ label textarea {
132
137
  padding: 0;
133
138
  }
134
139
 
135
- [type='search'] {
136
- outline-offset: -$bf-spacing-sm-px;
137
- outline-offset: -$bf-spacing-sm-rem;
140
+ [type="search"] {
141
+ outline-offset: calc(-1 * bf-v-space.$bf-spacing-sm-rem);
138
142
  }
139
143
 
140
144
  output {
@@ -152,24 +156,27 @@ select {
152
156
 
153
157
  // Taken from Bootstrap Reboot v5.2
154
158
  // https://unpkg.com/browse/bootstrap@5.2.0/dist/css/bootstrap-reboot.css
155
- [list]:not([type='date']):not([type='datetime-local']):not([type='month']):not(
156
- [type='week']
157
- ):not([type='time'])::-webkit-calendar-picker-indicator {
159
+ [list]:not(
160
+ [type="date"],
161
+ [type="datetime-local"],
162
+ [type="month"],
163
+ [type="week"],
164
+ [type="time"]
165
+ )::-webkit-calendar-picker-indicator {
158
166
  display: none !important;
159
167
  }
160
168
 
161
169
  optgroup {
162
170
  font-family: inherit;
163
171
  font-size: inherit;
164
- font-style: inherit;
165
- font-weight: 700; // fallback for font families without 600 */
172
+ font-style: inherit; // fallback for font families without 600 */
166
173
  font-weight: 600;
167
174
  }
168
175
 
169
176
  // remove -webkit-appearance listing every single elements that needed it
170
177
  button,
171
178
  // avoid destroying native android audio/video players
172
- html [type="button"],
179
+ html [type="button"],
173
180
  [type="reset"],
174
181
  [type="submit"],
175
182
 
@@ -189,42 +196,41 @@ html [type="button"],
189
196
  [type="search"]::-webkit-search-cancel-button,
190
197
  input[list],
191
198
  textarea {
192
- -webkit-appearance: none;
199
+ appearance: none;
193
200
  }
194
201
 
195
202
  ::-webkit-file-upload-button {
196
- -webkit-appearance: button; // iOS and Safari
197
- font: inherit; // Safari
203
+ font: inherit;
204
+ appearance: auto;
205
+ }
206
+
207
+ ::file-selector-button {
208
+ font: inherit;
209
+ appearance: auto;
198
210
  }
199
211
 
200
- // ! IE9+
201
- // https://caniuse.com/#feat=border-radius
202
212
  button,
203
213
  input,
204
214
  select,
205
215
  textarea {
206
- border-radius: $bf-spacing-sm-px;
207
- border-radius: $bf-spacing-sm-rem;
216
+ border-radius: bf-v-space.$bf-spacing-sm-rem;
208
217
  }
209
218
 
210
- // ! IE9+
211
- // https://caniuse.com/#feat=border-radius
212
- [type='radio'] {
219
+ [type="radio"] {
213
220
  border-radius: 50%;
214
221
  }
215
222
 
216
- [type='checkbox'] {
217
- border-radius: $bf-spacing-md-px;
218
- border-radius: $bf-spacing-md-rem;
223
+ [type="checkbox"] {
224
+ border-radius: bf-v-space.$bf-spacing-md-rem;
219
225
  }
220
226
 
221
- [type='radio'],
222
- [type='checkbox'] {
227
+ [type="radio"],
228
+ [type="checkbox"] {
223
229
  padding: 0;
224
- background-color: $bf-white;
230
+ background-color: bf-v-color.$bf-white;
225
231
  }
226
232
 
227
- [type='range'] {
233
+ [type="range" i] {
228
234
  background-color: transparent; // FF and Chrome mobile
229
235
  }
230
236
 
@@ -253,16 +259,16 @@ textarea {
253
259
  }
254
260
 
255
261
  button,
256
- [type='button'],
257
- [type='reset'],
258
- [type='submit'] {
262
+ [type="button"],
263
+ [type="reset"],
264
+ [type="submit"] {
259
265
  line-height: normal;
260
266
  text-align: center;
261
267
  margin: 0;
262
268
  background-clip: padding-box;
263
269
  vertical-align: baseline;
264
270
  overflow: visible;
265
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
271
+ -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
266
272
  user-select: none;
267
273
  border: 0;
268
274
  background-image: none; // FF mobile
@@ -271,18 +277,14 @@ button,
271
277
  &:active,
272
278
  &:focus {
273
279
  text-decoration: none;
274
- color: $bf-dark;
280
+ color: bf-v-color.$bf-dark;
275
281
  }
276
282
  }
277
283
 
278
- button,
279
- select,
280
- input[type='submit'],
281
- input[type='button'],
282
- [type='checkbox'],
283
- [type='range'],
284
- [type='radio'],
285
- [role='button'] {
284
+ button:not(:disabled),
285
+ [type="button"]:not(:disabled),
286
+ [type="reset"]:not(:disabled),
287
+ [type="submit"]:not(:disabled) {
286
288
  cursor: pointer;
287
289
  }
288
290
 
@@ -292,7 +294,15 @@ input[type='button'],
292
294
  // Fix: Use '!important' https://github.com/necolas/normalize.css/issues/150
293
295
  input::placeholder,
294
296
  textarea::placeholder {
295
- color: $bf-gray-dark;
297
+ color: bf-v-color.$bf-gray-dark;
298
+ }
299
+
300
+ /*
301
+ Use the modern Firefox focus style for all focusable elements.
302
+ */
303
+
304
+ :-moz-focusring {
305
+ outline: auto;
296
306
  }
297
307
 
298
308
  // remove ':invalid' styles in FF
@@ -1,84 +1,82 @@
1
+ @use '../variables/variables-colors' as bf-v-color;
2
+ @use '../variables/variables-texts' as bf-v-text;
3
+ @use '../variables/variables-spacing' as bf-v-space;
4
+ @use '../variables/variables-breakpoints' as bf-v-bp;
5
+ @use 'sass:color';
6
+
1
7
  // heavily inspired by '2020 toggles' by Aaron Iker
2
8
  // https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
3
9
  // https://codepen.io/aaroniker/pen/ZEYoxEY?editors=0100
4
- //
5
- // https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
6
- // https://caniuse.com/#feat=mdn-css_at-rules_supports_selector
7
- //
8
- // Anyway are safe and future-friendly because more browser compatibility
9
- // will come
10
-
11
- @supports (appearance: none) {
12
- [type='checkbox'],
13
- [type='radio'] {
14
- appearance: none;
15
10
 
16
- height: 1.8rem;
17
- width: 1.8rem;
11
+ [type='checkbox'],
12
+ [type='radio'] {
13
+ appearance: none;
14
+
15
+ height: 1.8rem;
16
+ width: 1.8rem;
18
17
 
18
+ vertical-align: top;
19
+ position: relative;
20
+
21
+ border: 1px solid / bf-v-color.$bf-gray;
22
+
23
+ + label {
24
+ line-height: 1.8rem;
19
25
  vertical-align: top;
20
- position: relative;
21
-
22
- border: 1px solid $bf-gray;
23
-
24
- + label {
25
- line-height: 1.8rem;
26
- vertical-align: top;
27
- margin-left: $bf-spacing-md-px;
28
- margin-left: $bf-spacing-md-rem;
29
- }
30
-
31
- // add support for RTL languages
32
- // Read more
33
- // 1. http://bootstrap.rtlcss.com
34
- // 2. https://rtlstyling.com/
35
- *[dir='rtl'] & + label,
36
- &[dir='rtl'] + label {
37
- margin-left: 0;
38
- margin-right: $bf-spacing-md-px;
39
- margin-right: $bf-spacing-md-rem;
40
- }
41
-
42
- &:after {
43
- content: '';
44
- display: block;
45
- position: absolute;
46
- }
47
-
48
- &:checked {
49
- background-color: $bf-blue;
50
- border-color: $bf-black;
51
- }
26
+ margin-left: bf-v-space.$bf-spacing-md-px;
27
+ margin-left: bf-v-space.$bf-spacing-md-rem;
28
+ }
29
+
30
+ // add support for RTL languages
31
+ // Read more
32
+ // 1. http://bootstrap.rtlcss.com
33
+ // 2. https://rtlstyling.com/
34
+ *[dir='rtl'] & + label,
35
+ &[dir='rtl'] + label {
36
+ margin-left: 0;
37
+ margin-right: bf-v-space.$bf-spacing-md-px;
38
+ margin-right: bf-v-space.$bf-spacing-md-rem;
52
39
  }
53
40
 
54
- [type='radio'] {
55
- &:after {
56
- width: 1.8rem;
57
- height: 1.8rem;
41
+ &::after {
42
+ content: '';
43
+ display: block;
44
+ position: absolute;
45
+ }
46
+
47
+ &:checked {
48
+ background-color: bf-v-color.$bf-blue;
49
+ border-color: bf-v-color.$bf-black;
50
+ }
51
+ }
58
52
 
59
- left: -0.05rem;
60
- top: -0.05rem;
53
+ [type='radio'] {
54
+ &::after {
55
+ width: 1.8rem;
56
+ height: 1.8rem;
61
57
 
62
- border-radius: 50%;
63
- background: $bf-white;
58
+ left: -0.05rem;
59
+ top: -0.05rem;
64
60
 
65
- transform: scale(0.35);
66
- }
61
+ border-radius: 50%;
62
+ background: bf-v-color.$bf-white;
63
+
64
+ transform: scale(0.35);
67
65
  }
66
+ }
68
67
 
69
- [type='checkbox'] {
70
- &:after {
71
- width: 0.6rem;
72
- height: 0.8rem;
68
+ [type='checkbox'] {
69
+ &::after {
70
+ width: 0.6rem;
71
+ height: 0.8rem;
73
72
 
74
- border: 2px solid $bf-white;
75
- border-top: 0;
76
- border-left: 0;
73
+ border: 2px solid / bf-v-color.$bf-white;
74
+ border-top: 0;
75
+ border-left: 0;
77
76
 
78
- left: 35%;
79
- top: 20%;
77
+ left: 35%;
78
+ top: 20%;
80
79
 
81
- transform: rotate(43deg);
82
- }
80
+ transform: rotate(43deg);
83
81
  }
84
82
  }
@@ -1,99 +1,113 @@
1
+ @use '../variables/variables-colors' as bf-v-color;
2
+ @use '../variables/variables-texts' as bf-v-text;
3
+ @use '../variables/variables-spacing' as bf-v-space;
4
+ @use '../variables/variables-breakpoints' as bf-v-bp;
5
+ @use 'sass:color';
6
+
1
7
  // styling input range in modern browsers safely using the @supports CSS-at-rule
2
8
  // https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
3
9
  //
4
10
  // standalone CodePen demo https://codepen.io/marcop135/pen/JjGrNMx
5
11
 
6
- @supports (appearance: none) {
7
- [type='range'] {
8
- appearance: none;
9
- width: 100%;
10
- height: 1.4rem;
11
- }
12
+ [type='range'] {
13
+ appearance: none;
14
+ width: 100%;
15
+ height: 1.4rem;
16
+ }
12
17
 
13
- [type='range']::-webkit-slider-thumb {
14
- border: 0;
15
- appearance: none;
16
-
17
- width: 1.5rem;
18
- height: 1.5rem;
19
- margin-top: -0.25rem;
20
- background-color: $bf-blue;
21
- border-radius: 1.5rem;
22
- transition: background-color 0.15s ease-in-out,
23
- border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
24
-
25
- &:active {
26
- background-color: $bf-blue;
27
- }
18
+ [type='range']::-webkit-slider-thumb {
19
+ border: 0;
20
+ appearance: none;
21
+
22
+ width: 1.5rem;
23
+ height: 1.5rem;
24
+ margin-top: -0.25rem;
25
+ background-color: bf-v-color.$bf-blue;
26
+ border-radius: 1.5rem;
27
+ transition:
28
+ background-color 0.15s ease-in-out,
29
+ border-color 0.15s ease-in-out,
30
+ box-shadow 0.15s ease-in-out;
31
+
32
+ &:active {
33
+ background-color: bf-v-color.$bf-blue;
28
34
  }
35
+ }
29
36
 
30
- [type='range']::-moz-range-thumb {
31
- border: 0;
32
- appearance: none;
33
-
34
- width: 1.5rem;
35
- height: 1.5rem;
36
- background-color: $bf-blue;
37
- border-radius: 1.5rem;
38
- transition: background-color 0.15s ease-in-out,
39
- border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
40
-
41
- &:active {
42
- background-color: $bf-blue;
43
- }
37
+ [type='range']::-moz-range-thumb {
38
+ border: 0;
39
+ appearance: none;
40
+
41
+ width: 1.5rem;
42
+ height: 1.5rem;
43
+ background-color: bf-v-color.$bf-blue;
44
+ border-radius: 1.5rem;
45
+ transition:
46
+ background-color 0.15s ease-in-out,
47
+ border-color 0.15s ease-in-out,
48
+ box-shadow 0.15s ease-in-out;
49
+
50
+ &:active {
51
+ background-color: bf-v-color.$bf-blue;
44
52
  }
53
+ }
45
54
 
46
- [type='range']::-webkit-slider-runnable-track {
47
- color: transparent;
48
- border-color: transparent;
49
-
50
- width: 100%;
51
- height: 0.65rem;
52
- cursor: pointer;
53
- background-color: $bf-gray-light-extra;
54
- }
55
+ [type='range']::-webkit-slider-runnable-track {
56
+ color: transparent;
57
+ border-color: transparent;
55
58
 
56
- [type='range']::-moz-range-track {
57
- color: transparent;
58
- border-color: transparent;
59
+ width: 100%;
60
+ height: 0.65rem;
61
+ cursor: pointer;
62
+ background-color: bf-v-color.$bf-gray-light-extra;
63
+ }
59
64
 
60
- width: 100%;
61
- height: 0.65rem;
62
- cursor: pointer;
63
- background-color: $bf-gray-light-extra;
64
- }
65
+ [type='range']::-moz-range-track {
66
+ color: transparent;
67
+ border-color: transparent;
65
68
 
66
- [type='range']:focus {
67
- outline: none;
69
+ width: 100%;
70
+ height: 0.65rem;
71
+ cursor: pointer;
72
+ background-color: bf-v-color.$bf-gray-light-extra;
73
+ }
68
74
 
69
- &::-webkit-slider-thumb {
70
- box-shadow: 0 0 0 0.1rem $bf-white, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
71
- }
75
+ [type='range']:focus {
76
+ outline: none;
72
77
 
73
- &::-moz-slider-thumb {
74
- box-shadow: 0 0 0 0.1rem $bf-white, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
75
- }
78
+ &::-webkit-slider-thumb {
79
+ box-shadow:
80
+ 0 0 0 0.1rem / bf-v-color.$bf-white,
81
+ 0 0 0 0.2rem rgb(0 123 255 / 25%);
76
82
  }
77
83
 
78
- [type='range']::-moz-focus-outer {
79
- border: 0;
84
+ &::-moz-slider-thumb {
85
+ box-shadow:
86
+ 0 0 0 0.1rem / bf-v-color.$bf-white,
87
+ 0 0 0 0.2rem rgb(0 123 255 / 25%);
80
88
  }
89
+ }
81
90
 
82
- [type='range']:focus::-moz-range-thumb {
83
- box-shadow: 0 0 0 0.1rem $bf-white, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
84
- }
91
+ [type='range']::-moz-focus-outer {
92
+ border: 0;
93
+ }
94
+
95
+ [type='range']:focus::-moz-range-thumb {
96
+ box-shadow:
97
+ 0 0 0 0.1rem / bf-v-color.$bf-white,
98
+ 0 0 0 0.2rem rgb(0 123 255 / 25%);
99
+ }
85
100
 
86
- // disabled
101
+ // disabled
87
102
 
88
- [type='range']:disabled {
89
- pointer-events: none;
103
+ [type='range']:disabled {
104
+ pointer-events: none;
90
105
 
91
- &::-webkit-slider-thumb {
92
- background-color: $bf-gray-light;
93
- }
106
+ &::-webkit-slider-thumb {
107
+ background-color: bf-v-color.$bf-gray-light;
108
+ }
94
109
 
95
- &::-moz-slider-thumb {
96
- background-color: $bf-gray-light;
97
- }
110
+ &::-moz-slider-thumb {
111
+ background-color: bf-v-color.$bf-gray-light;
98
112
  }
99
113
  }
@@ -1,3 +1,9 @@
1
+ @use '../variables/variables-colors' as bf-v-color;
2
+ @use '../variables/variables-texts' as bf-v-text;
3
+ @use '../variables/variables-spacing' as bf-v-space;
4
+ @use '../variables/variables-breakpoints' as bf-v-bp;
5
+ @use 'sass:color';
6
+
1
7
  // custom <select> arrow and appearance with a base64 embedded SVG icon
2
8
  // https://css-tricks.com/probably-dont-base64-svg/#article-header-id-2
3
9
  //
@@ -8,7 +14,7 @@
8
14
  // ! :not and calc() are IE9+
9
15
  // https://caniuse.com/#feat=mdn-css_selectors_not
10
16
  // https://caniuse.com/#feat=calc
11
- //
17
+
12
18
  // ! 12px = the icon width/height, and must be in pixels because
13
19
  // calc() is just for values
14
20
  // https://css-tricks.com/a-complete-guide-to-calc-in-css/#0-calc-is-for-values
@@ -19,24 +25,20 @@
19
25
  // so, is not safe to style every kind of <select>
20
26
  //
21
27
  // remove the arrow and the appearance, especially on Webkit
22
- select:not([size]):not([multiple]) {
28
+ select:not([size], [multiple]) {
23
29
  appearance: none;
24
30
 
25
31
  // add a new svg arrow
26
- background: $bf-white
32
+ background: bf-v-color.$bf-white
27
33
  url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e")
28
34
  no-repeat right 0.85rem center/8px 10px;
29
35
 
30
36
  // space the arrow
31
- padding-right: $bf-spacing-lg-px + $bf-spacing-lg-px;
32
- padding-right: $bf-spacing-lg-rem + $bf-spacing-lg-rem;
37
+ padding-right: bf-v-space.$bf-spacing-lg-px + bf-v-space.$bf-spacing-lg-px;
38
+ padding-right: bf-v-space.$bf-spacing-lg-rem + bf-v-space.$bf-spacing-lg-rem;
33
39
  }
34
40
 
35
- // IE10+
36
- // The '::-ms-expand' CSS pseudo-element is a Microsoft extension that represents
37
- // the button of a <select> menu control that opens or closes the drop-down
38
- // menu. Typically it is a triangle that points downward.
39
- // https://developer.mozilla.org/en-US/docs/Web/CSS/::-ms-expand
41
+ // Legacy Edge browser support
40
42
  select::-ms-expand {
41
43
  display: none;
42
44
  }
@@ -48,16 +50,16 @@ select::-ms-expand {
48
50
  // Read more
49
51
  // 1. http://bootstrap.rtlcss.com
50
52
  // 2. https://rtlstyling.com/
51
- *[dir='rtl'] select:not([size]):not([multiple]),
52
- select[dir='rtl']:not([size]):not([multiple]) {
53
+ *[dir='rtl'] select:not([size], [multiple]),
54
+ select[dir='rtl']:not([size], [multiple]) {
53
55
  // move the arrow icon to the left
54
56
  background-position: left 0.85rem top 50%;
55
57
 
56
58
  // go back to default forms padding
57
- padding-right: ($bf-spacing-lg-px * 0.75);
58
- padding-right: ($bf-spacing-lg-rem * 0.75);
59
+ padding-right: (bf-v-space.$bf-spacing-lg-px * 0.75);
60
+ padding-right: (bf-v-space.$bf-spacing-lg-rem * 0.75);
59
61
 
60
62
  // add custom left padding, matching the custom LTR one
61
- padding-left: $bf-spacing-lg-px + $bf-spacing-lg-px;
62
- padding-left: $bf-spacing-lg-rem + $bf-spacing-lg-rem;
63
+ padding-left: bf-v-space.$bf-spacing-lg-px + bf-v-space.$bf-spacing-lg-px;
64
+ padding-left: bf-v-space.$bf-spacing-lg-rem + bf-v-space.$bf-spacing-lg-rem;
63
65
  }