bullframe.css 3.8.2 → 4.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 (103) hide show
  1. package/.browserslistrc +5 -5
  2. package/.stylelintrc.json +10 -0
  3. package/CHANGELOG.md +12 -6
  4. package/LICENSE +20 -20
  5. package/README.md +15 -146
  6. package/dist/css/bullframe-classless-dark-prefers.css +357 -425
  7. package/dist/css/bullframe-classless-dark-prefers.min.css +2 -3
  8. package/dist/css/bullframe-classless-dark-prefers.min.css.map +1 -1
  9. package/dist/css/bullframe-classless-dark.css +328 -412
  10. package/dist/css/bullframe-classless-dark.min.css +2 -3
  11. package/dist/css/bullframe-classless-dark.min.css.map +1 -1
  12. package/dist/css/bullframe-classless.css +237 -293
  13. package/dist/css/bullframe-classless.min.css +2 -2
  14. package/dist/css/bullframe-classless.min.css.map +1 -1
  15. package/dist/css/bullframe-dark-prefers.css +468 -633
  16. package/dist/css/bullframe-dark-prefers.min.css +2 -2
  17. package/dist/css/bullframe-dark-prefers.min.css.map +1 -1
  18. package/dist/css/bullframe-dark.css +402 -593
  19. package/dist/css/bullframe-dark.min.css +2 -2
  20. package/dist/css/bullframe-dark.min.css.map +1 -1
  21. package/dist/css/bullframe-utilities.css +67 -105
  22. package/dist/css/bullframe-utilities.min.css +1 -1
  23. package/dist/css/bullframe-utilities.min.css.map +1 -1
  24. package/dist/css/bullframe.css +288 -455
  25. package/dist/css/bullframe.min.css +1 -1
  26. package/dist/css/bullframe.min.css.map +1 -1
  27. package/docs/test/css/style.css +130 -130
  28. package/docs/test/icons/safari-pinned-tab.svg +28 -28
  29. package/docs/test/js/vendor/html5shiv.js +335 -335
  30. package/docs/test/js/vendor/ie10-viewport-bug-workaround.js +20 -20
  31. package/gulpfile.js +5 -2
  32. package/index.html +2 -11
  33. package/package.json +12 -6
  34. package/src/scss/bullframe-classless-dark-prefers.scss +5 -5
  35. package/src/scss/bullframe-classless-dark.scss +5 -5
  36. package/src/scss/bullframe-classless.scss +1 -9
  37. package/src/scss/bullframe-dark-prefers.scss +4 -4
  38. package/src/scss/bullframe-dark.scss +4 -4
  39. package/src/scss/bullframe-utilities.scss +1 -1
  40. package/src/scss/bullframe.scss +0 -7
  41. package/src/scss/forms/_forms-normalization.scss +4 -2
  42. package/src/scss/forms/_forms-styling-radio-checkbox.scss +84 -85
  43. package/src/scss/forms/_forms-styling-range.scss +99 -103
  44. package/src/scss/forms/_forms-styling-select.scss +63 -63
  45. package/src/scss/forms/_forms-styling.scss +119 -121
  46. package/src/scss/miscellaneous/_misc-focus.scss +0 -1
  47. package/src/scss/miscellaneous/_misc-layout.scss +1 -24
  48. package/src/scss/mixins/_mixin-grid-flex.scss +83 -83
  49. package/src/scss/mixins/_mixin-layout.scss +42 -42
  50. package/src/scss/mixins/_mixin-texts.scss +38 -37
  51. package/src/scss/typography/_typography-blockquotes.scss +23 -23
  52. package/src/scss/typography/_typography-headings.scss +43 -43
  53. package/src/scss/typography/_typography-html-body.scss +72 -72
  54. package/src/scss/typography/_typography-misc.scss +3 -3
  55. package/src/scss/typography/_typography-monospaced-elements.scss +50 -56
  56. package/src/scss/utilities/_utility-buttons.scss +71 -71
  57. package/src/scss/utilities/_utility-embeds.scss +34 -34
  58. package/src/scss/utilities/_utility-filters.scss +24 -24
  59. package/src/scss/utilities/_utility-form-states.scss +80 -80
  60. package/src/scss/utilities/_utility-global-dark-classless.scss +157 -169
  61. package/src/scss/utilities/_utility-global-dark-prefers-classless.scss +3 -3
  62. package/src/scss/utilities/_utility-global-dark-prefers.scss +3 -3
  63. package/src/scss/utilities/_utility-global-dark-scrollbars.scss +29 -29
  64. package/src/scss/utilities/_utility-global-dark.scss +213 -224
  65. package/src/scss/utilities/_utility-grid-system.scss +204 -204
  66. package/src/scss/utilities/_utility-layout.scss +195 -196
  67. package/src/scss/utilities/_utility-lists.scss +17 -17
  68. package/src/scss/utilities/_utility-print.scss +101 -111
  69. package/src/scss/utilities/_utility-reduced-motion.scss +29 -29
  70. package/src/scss/utilities/_utility-tables.scss +40 -40
  71. package/src/scss/utilities/_utility-texts.scss +199 -199
  72. package/src/scss/utilities/_utility-z-index.scss +82 -82
  73. package/src/scss/variables/_variables-breakpoints.scss +5 -5
  74. package/src/scss/variables/_variables-colors.scss +31 -31
  75. package/src/scss/variables/_variables-spacing.scss +25 -25
  76. package/src/scss/variables/_variables-texts.scss +12 -12
  77. package/dist/css/bullframe-classless-dark-ie10+.css +0 -1321
  78. package/dist/css/bullframe-classless-dark-ie10+.min.css +0 -4
  79. package/dist/css/bullframe-classless-dark-ie10+.min.css.map +0 -1
  80. package/dist/css/bullframe-classless-dark-prefers-ie10+.css +0 -1301
  81. package/dist/css/bullframe-classless-dark-prefers-ie10+.min.css +0 -4
  82. package/dist/css/bullframe-classless-dark-prefers-ie10+.min.css.map +0 -1
  83. package/dist/css/bullframe-classless-ie10+.css +0 -1084
  84. package/dist/css/bullframe-classless-ie10+.min.css +0 -3
  85. package/dist/css/bullframe-classless-ie10+.min.css.map +0 -1
  86. package/dist/css/bullframe-dark-ie10+.css +0 -2569
  87. package/dist/css/bullframe-dark-ie10+.min.css +0 -3
  88. package/dist/css/bullframe-dark-ie10+.min.css.map +0 -1
  89. package/dist/css/bullframe-dark-prefers-ie10+.css +0 -2541
  90. package/dist/css/bullframe-dark-prefers-ie10+.min.css +0 -3
  91. package/dist/css/bullframe-dark-prefers-ie10+.min.css.map +0 -1
  92. package/dist/css/bullframe-ie10+.css +0 -2250
  93. package/dist/css/bullframe-ie10+.min.css +0 -2
  94. package/dist/css/bullframe-ie10+.min.css.map +0 -1
  95. package/docs/images-readme/browserstack-logo.png +0 -0
  96. package/src/scss/bullframe-classless-dark-ie10+.scss +0 -5
  97. package/src/scss/bullframe-classless-dark-prefers-ie10+.scss +0 -5
  98. package/src/scss/bullframe-classless-ie10+.scss +0 -43
  99. package/src/scss/bullframe-dark-ie10+.scss +0 -4
  100. package/src/scss/bullframe-dark-prefers-ie10+.scss +0 -4
  101. package/src/scss/bullframe-ie10+.scss +0 -121
  102. package/src/scss/forms/_forms-styling-ie-hacks.scss +0 -56
  103. package/src/scss/forms/_forms-styling-select-ie-hacks.scss +0 -30
@@ -1,20 +1,20 @@
1
- /*!
2
- * IE10 viewport hack for Surface/desktop Windows 8 bug
3
- * Copyright 2014-2015 Twitter, Inc.
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
- */
6
-
7
- // See the Getting Started docs for more information:
8
- // http://getbootstrap.com/getting-started/#support-ie10-width
9
-
10
- (function() {
11
- "use strict";
12
-
13
- if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
14
- var msViewportStyle = document.createElement("style");
15
- msViewportStyle.appendChild(
16
- document.createTextNode("@-ms-viewport{width:auto!important}")
17
- );
18
- document.querySelector("head").appendChild(msViewportStyle);
19
- }
20
- })();
1
+ /*!
2
+ * IE10 viewport hack for Surface/desktop Windows 8 bug
3
+ * Copyright 2014-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+
7
+ // See the Getting Started docs for more information:
8
+ // http://getbootstrap.com/getting-started/#support-ie10-width
9
+
10
+ (function() {
11
+ "use strict";
12
+
13
+ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
14
+ var msViewportStyle = document.createElement("style");
15
+ msViewportStyle.appendChild(
16
+ document.createTextNode("@-ms-viewport{width:auto!important}")
17
+ );
18
+ document.querySelector("head").appendChild(msViewportStyle);
19
+ }
20
+ })();
package/gulpfile.js CHANGED
@@ -8,8 +8,11 @@
8
8
  // instead of gulp.series()
9
9
  const { src, dest, watch, series, parallel } = require('gulp');
10
10
 
11
+ // Upgrade gulp-sass to v5
12
+ // https://github.com/dlmanning/gulp-sass/tree/master#migrating-to-version-5
13
+ const sass = require('gulp-sass')(require('sass'));
14
+
11
15
  // Import all the Gulp-related packages we want to use
12
- const sass = require('gulp-sass');
13
16
  const postcss = require('gulp-postcss');
14
17
  const autoprefixer = require('autoprefixer');
15
18
  const cssnano = require('cssnano');
@@ -55,7 +58,7 @@ function scssTask() {
55
58
  .pipe(
56
59
  replace(
57
60
  '@charset "UTF-8";',
58
- '/*! bullframe.css v3.8.2 | MIT License | https://github.com/marcop135/bullframe.css */'
61
+ '/*! bullframe.css v4.0.0 | MIT License | https://github.com/marcop135/bullframe.css */'
59
62
  )
60
63
  )
61
64
 
package/index.html CHANGED
@@ -19,14 +19,10 @@
19
19
  <meta name="msapplication-TileColor" content="#da532c" />
20
20
  <meta name="theme-color" content="#f95c1f" />
21
21
 
22
- <link rel="stylesheet" href="./dist/css/bullframe-dark-prefers.min.css?v3.8.1" />
22
+ <link rel="stylesheet" href="./dist/css/bullframe-dark-prefers.min.css?v4.0.0" />
23
23
 
24
24
  <!-- this is just for a nicer demo -->
25
25
  <link rel="stylesheet" href="./docs/test/css/style.css" />
26
-
27
- <!-- enable HTML5 elements in all browsers, and fix IE10 viewport on Windows 8 -->
28
- <script src="./docs/test/js/vendor/html5shiv.js?v3.7.3"></script>
29
- <script src="./docs/test/js/vendor/ie10-viewport-bug-workaround.js?v1..0"></script>
30
26
  </head>
31
27
 
32
28
  <body class="bf-responsive-typography bf-reduced-motion">
@@ -34,7 +30,7 @@
34
30
  <div class="bf-container bf-container--break-md">
35
31
  <header class="bf-t-center bf-m-b-3">
36
32
  <h1>bullframe<span>.css</span></h1>
37
- <p class="bf-lead">Solid, fluid, IE-friendly Sass (SCSS) framework</p>
33
+ <p class="bf-lead">Solid, fluid, cross-browser Sass (SCSS) framework</p>
38
34
  <a class="bf-btn bf-btn--primary" href="https://github.com/marcop135/bullframe.css/archive/master.zip"
39
35
  role="button">Download</a>
40
36
  <a class="bf-btn" href="https://github.com/marcop135/bullframe.css" role="button">GitHub</a>
@@ -50,11 +46,6 @@
50
46
  CSS build in use:<br />
51
47
  <mark><code>bullframe-dark-prefers.min.css</code></mark>
52
48
  </p>
53
- <p class="bf-t-center">
54
- Polyfills:<br />
55
- <code>html5shiv.js v3.7.3</code><br />
56
- <code>ie10-viewport-bug-workaround.js v1..0</code>
57
- </p>
58
49
  <p class="bf-t-center">
59
50
  <code>&lt;body&gt;</code> classes:<br />
60
51
  <code>.bf-responsive-typography</code><br />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bullframe.css",
3
- "version": "3.8.2",
3
+ "version": "4.0.0",
4
4
  "description": "Solid, fluid, IE-friendly Sass (SCSS) framework",
5
5
  "jsdelivr": "dist/css/bullframe.css",
6
6
  "unpkg": "dist/css/bullframe.css",
@@ -44,14 +44,20 @@
44
44
  },
45
45
  "homepage": "https://marcop135.github.io/bullframe.css/",
46
46
  "devDependencies": {
47
- "browser-sync": "^2.26.14",
48
- "cssnano": "^5.0.6",
47
+ "browser-sync": "^2.27.10",
48
+ "cssnano": "^5.1.12",
49
49
  "gulp": "^4.0.2",
50
50
  "gulp-autoprefixer": "^8.0.0",
51
- "gulp-postcss": "^9.0.0",
51
+ "gulp-postcss": "^9.0.1",
52
52
  "gulp-rename": "2.0.0",
53
53
  "gulp-replace": "^1.1.3",
54
- "gulp-sass": "^4.1.0"
54
+ "gulp-sass": "^5.1.0",
55
+ "sass": "^1.54.4",
56
+ "stylelint": "^14.10.0",
57
+ "stylelint-config-recommended": "^9.0.0",
58
+ "stylelint-config-sass-guidelines": "^9.0.1"
55
59
  },
56
- "dependencies": {}
60
+ "dependencies": {
61
+ "stylelint-scss": "^4.3.0"
62
+ }
57
63
  }
@@ -1,5 +1,5 @@
1
- /*! custom build: bullframe-classless-dark-prefers */
2
- // https://css-tricks.com/no-class-css-frameworks/
3
-
4
- @import 'bullframe-classless';
5
- @import 'utilities/utility-global-dark-prefers-classless';
1
+ /*! custom build: bullframe-classless-dark-prefers */
2
+ // https://css-tricks.com/no-class-css-frameworks/
3
+
4
+ @import 'bullframe-classless';
5
+ @import 'utilities/utility-global-dark-prefers-classless';
@@ -1,5 +1,5 @@
1
- /*! custom build: bullframe-classless-dark */
2
- // https://css-tricks.com/no-class-css-frameworks/
3
-
4
- @import 'bullframe-classless';
5
- @import 'utilities/utility-global-dark-classless';
1
+ /*! custom build: bullframe-classless-dark */
2
+ // https://css-tricks.com/no-class-css-frameworks/
3
+
4
+ @import 'bullframe-classless';
5
+ @import 'utilities/utility-global-dark-classless';
@@ -30,21 +30,13 @@
30
30
  // all about form elements
31
31
  @import 'forms/forms-normalization';
32
32
  @import 'forms/forms-styling';
33
- @import 'forms/forms-styling-ie-hacks';
34
33
  @import 'forms/forms-styling-select';
35
- @import 'forms/forms-styling-select-ie-hacks';
36
34
  @import 'forms/forms-styling-radio-checkbox';
35
+ @import 'forms/forms-styling-range';
37
36
 
38
37
  // <table> and his elements
39
38
  @import 'miscellaneous/misc-tables';
40
39
 
41
- // improve several ARIA roles appearance
42
- @import 'miscellaneous/misc-accessibility';
43
-
44
- // shamy quick fixes...
45
- // https://csswizardry.com/2013/04/shame-css/
46
- @import 'miscellaneous/misc-shame';
47
-
48
40
  // this is just quick way to customise your styles
49
41
  // below these styles, you shouldn't override nothing but remove them
50
42
  // commented by default
@@ -1,4 +1,4 @@
1
- /*! custom build: bullframe-dark-prefers */
2
-
3
- @import 'bullframe';
4
- @import 'utilities/utility-global-dark-prefers';
1
+ /*! custom build: bullframe-dark-prefers */
2
+
3
+ @import 'bullframe';
4
+ @import 'utilities/utility-global-dark-prefers';
@@ -1,4 +1,4 @@
1
- /*! custom build: bullframe-dark */
2
-
3
- @import 'bullframe';
4
- @import 'utilities/utility-global-dark';
1
+ /*! custom build: bullframe-dark */
2
+
3
+ @import 'bullframe';
4
+ @import 'utilities/utility-global-dark';
@@ -1,4 +1,4 @@
1
- /*! bullframe.css v3.8.2 | MIT License | https://github.com/marcop135/bullframe.css */
1
+ /*! bullframe.css v4.0.0 | MIT License | https://github.com/marcop135/bullframe.css */
2
2
  /* custom build: bullframe-utilities */
3
3
 
4
4
  // colors, spacing and breakpoint variables
@@ -30,9 +30,7 @@
30
30
  // all about form elements
31
31
  @import 'forms/forms-normalization';
32
32
  @import 'forms/forms-styling';
33
- @import 'forms/forms-styling-ie-hacks';
34
33
  @import 'forms/forms-styling-select';
35
- @import 'forms/forms-styling-select-ie-hacks';
36
34
  @import 'forms/forms-styling-radio-checkbox';
37
35
  @import 'forms/forms-styling-range';
38
36
 
@@ -61,11 +59,6 @@
61
59
  // clearfix, sr-only, float, inline/block/flex, and more
62
60
  @import 'utilities/utility-layout';
63
61
 
64
- // CSS filters
65
- // https://developer.mozilla.org/en-US/docs/Web/CSS/filter
66
- // https://caniuse.com/css-filters
67
- @import 'utilities/utility-filters';
68
-
69
62
  @import 'utilities/utility-z-index';
70
63
 
71
64
  // reset margins and paddings adding a class
@@ -150,8 +150,10 @@ select {
150
150
  word-wrap: normal;
151
151
  }
152
152
 
153
- [list]::-webkit-calendar-picker-indicator {
154
- display: none;
153
+ // Taken from Bootstrap Reboot v5.2
154
+ // 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([type='week']):not([type='time'])::-webkit-calendar-picker-indicator {
156
+ display: none !important;
155
157
  }
156
158
 
157
159
  optgroup {
@@ -1,85 +1,84 @@
1
- // heavily inspired by '2020 toggles' by Aaron Iker
2
- // https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
3
- // https://codepen.io/aaroniker/pen/ZEYoxEY?editors=0100
4
- //
5
- // currently (June 2020), a few modern browsers support the "@supports" media rules
6
- // https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
7
- // https://caniuse.com/#feat=mdn-css_at-rules_supports_selector
8
- //
9
- // Anyway are safe and future-friendly because more browser compatibility
10
- // will come
11
-
12
- @supports (appearance: none) {
13
- [type='checkbox'],
14
- [type='radio'] {
15
- appearance: none;
16
-
17
- height: 1.8rem;
18
- width: 1.8rem;
19
-
20
- vertical-align: top;
21
- position: relative;
22
-
23
- border: 1px solid $bf-gray;
24
-
25
- + label {
26
- line-height: 1.8rem;
27
- vertical-align: top;
28
- margin-left: $bf-spacing-md-px;
29
- margin-left: $bf-spacing-md-rem;
30
- }
31
-
32
- // add support for RTL languages
33
- // Read more
34
- // 1. http://bootstrap.rtlcss.com
35
- // 2. https://rtlstyling.com/
36
- *[dir='rtl'] & + label,
37
- &[dir='rtl'] + label {
38
- margin-left: 0;
39
- margin-right: $bf-spacing-md-px;
40
- margin-right: $bf-spacing-md-rem;
41
- }
42
-
43
- &:after {
44
- content: '';
45
- display: block;
46
- position: absolute;
47
- }
48
-
49
- &:checked {
50
- background-color: $bf-blue;
51
- border-color: $bf-black;
52
- }
53
- }
54
-
55
- [type='radio'] {
56
- &:after {
57
- width: 1.8rem;
58
- height: 1.8rem;
59
-
60
- left: -.05rem;
61
- top: -.05rem;
62
-
63
- border-radius: 50%;
64
- background: $bf-white;
65
-
66
- transform: scale(.35);
67
- }
68
- }
69
-
70
- [type='checkbox'] {
71
- &:after {
72
- width: .6rem;
73
- height: .8rem;
74
-
75
- border: 2px solid $bf-white;
76
- border-top: 0;
77
- border-left: 0;
78
-
79
- left: 35%;
80
- top: 20%;
81
-
82
- transform: rotate(43deg);
83
- }
84
- }
85
- }
1
+ // heavily inspired by '2020 toggles' by Aaron Iker
2
+ // https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
3
+ // 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
+
16
+ height: 1.8rem;
17
+ width: 1.8rem;
18
+
19
+ 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
+ }
52
+ }
53
+
54
+ [type='radio'] {
55
+ &:after {
56
+ width: 1.8rem;
57
+ height: 1.8rem;
58
+
59
+ left: -0.05rem;
60
+ top: -0.05rem;
61
+
62
+ border-radius: 50%;
63
+ background: $bf-white;
64
+
65
+ transform: scale(0.35);
66
+ }
67
+ }
68
+
69
+ [type='checkbox'] {
70
+ &:after {
71
+ width: 0.6rem;
72
+ height: 0.8rem;
73
+
74
+ border: 2px solid $bf-white;
75
+ border-top: 0;
76
+ border-left: 0;
77
+
78
+ left: 35%;
79
+ top: 20%;
80
+
81
+ transform: rotate(43deg);
82
+ }
83
+ }
84
+ }
@@ -1,103 +1,99 @@
1
- // styling input range in modern browsers safely using the @supports CSS-at-rule
2
- // https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
3
- //
4
- // standalone CodePen demo https://codepen.io/marcop135/pen/JjGrNMx
5
-
6
- @supports (appearance: none) {
7
- [type='range'] {
8
- appearance: none;
9
- width: 100%;
10
- height: 1.4rem;
11
- }
12
-
13
- [type='range']::-webkit-slider-thumb {
14
- border: 0;
15
- appearance: none;
16
-
17
- width: 1.5rem;
18
- height: 1.5rem;
19
- margin-top: -.25rem;
20
- background-color: $bf-blue;
21
- border-radius: 1.5rem;
22
- transition: background-color .15s ease-in-out,
23
- border-color .15s ease-in-out, box-shadow .15s ease-in-out;
24
-
25
- &:active {
26
- background-color: $bf-blue;
27
- }
28
- }
29
-
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 .15s ease-in-out,
39
- border-color .15s ease-in-out, box-shadow .15s ease-in-out;
40
-
41
- &:active {
42
- background-color: $bf-blue;
43
- }
44
- }
45
-
46
- [type='range']::-webkit-slider-runnable-track {
47
- color: transparent;
48
- border-color: transparent;
49
-
50
- width: 100%;
51
- height: .65rem;
52
- cursor: pointer;
53
- background-color: $bf-gray-light-extra;
54
- }
55
-
56
- [type='range']::-moz-range-track {
57
- color: transparent;
58
- border-color: transparent;
59
-
60
- width: 100%;
61
- height: .65rem;
62
- cursor: pointer;
63
- background-color: $bf-gray-light-extra;
64
- }
65
-
66
- [type='range']:focus {
67
- outline: none;
68
-
69
- &::-webkit-slider-thumb {
70
- box-shadow: 0 0 0 .1rem $bf-white, 0 0 0 .2rem rgba(0, 123, 255, .25);
71
- }
72
-
73
- &::-moz-slider-thumb {
74
- box-shadow: 0 0 0 .1rem $bf-white, 0 0 0 .2rem rgba(0, 123, 255, .25);
75
- }
76
- }
77
-
78
- [type='range']::-moz-focus-outer {
79
- border: 0;
80
- }
81
-
82
- [type='range']:focus::-webkit-slider-thumb {
83
- box-shadow: 0 0 0 .1rem $bf-white, 0 0 0 .2rem rgba(0, 123, 255, .25);
84
- }
85
-
86
- [type='range']:focus::-moz-range-thumb {
87
- box-shadow: 0 0 0 .1rem $bf-white, 0 0 0 .2rem rgba(0, 123, 255, .25);
88
- }
89
-
90
- // disabled
91
-
92
- [type='range']:disabled {
93
- pointer-events: none;
94
-
95
- &::-webkit-slider-thumb {
96
- background-color: $bf-gray-light;
97
- }
98
-
99
- &::-moz-slider-thumb {
100
- background-color: $bf-gray-light;
101
- }
102
- }
103
- }
1
+ // styling input range in modern browsers safely using the @supports CSS-at-rule
2
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
3
+ //
4
+ // standalone CodePen demo https://codepen.io/marcop135/pen/JjGrNMx
5
+
6
+ @supports (appearance: none) {
7
+ [type='range'] {
8
+ appearance: none;
9
+ width: 100%;
10
+ height: 1.4rem;
11
+ }
12
+
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
+ }
28
+ }
29
+
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
+ }
44
+ }
45
+
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
+
56
+ [type='range']::-moz-range-track {
57
+ color: transparent;
58
+ border-color: transparent;
59
+
60
+ width: 100%;
61
+ height: 0.65rem;
62
+ cursor: pointer;
63
+ background-color: $bf-gray-light-extra;
64
+ }
65
+
66
+ [type='range']:focus {
67
+ outline: none;
68
+
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
+ }
72
+
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
+ }
76
+ }
77
+
78
+ [type='range']::-moz-focus-outer {
79
+ border: 0;
80
+ }
81
+
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
+ }
85
+
86
+ // disabled
87
+
88
+ [type='range']:disabled {
89
+ pointer-events: none;
90
+
91
+ &::-webkit-slider-thumb {
92
+ background-color: $bf-gray-light;
93
+ }
94
+
95
+ &::-moz-slider-thumb {
96
+ background-color: $bf-gray-light;
97
+ }
98
+ }
99
+ }