claritas-web-framework 8.5.8 → 8.5.9

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 (86) hide show
  1. package/.prettierrc +10 -10
  2. package/README.md +1 -1
  3. package/dist/index.css +1 -1
  4. package/index.html +20 -20
  5. package/index.js +2 -2
  6. package/package.json +33 -33
  7. package/sass/_functions.scss +55 -55
  8. package/sass/_helpers.scss +8 -8
  9. package/sass/_mixins.scss +12 -12
  10. package/sass/_modules.scss +30 -30
  11. package/sass/_reboot.scss +264 -264
  12. package/sass/_root.scss +56 -56
  13. package/sass/_utilities.scss +17 -17
  14. package/sass/_variables.scss +445 -445
  15. package/sass/helpers/_container.scss +11 -11
  16. package/sass/helpers/_embed.scss +36 -36
  17. package/sass/helpers/_grid.scss +53 -53
  18. package/sass/helpers/_image.scss +5 -5
  19. package/sass/helpers/_link.scss +15 -15
  20. package/sass/helpers/_rfs.scss +303 -303
  21. package/sass/helpers/_screenReader.scss +13 -13
  22. package/sass/helpers/_wrap.scss +5 -5
  23. package/sass/index.scss +12 -12
  24. package/sass/mixins/_breakpoints.scss +133 -133
  25. package/sass/mixins/_button.scss +116 -116
  26. package/sass/mixins/_caret.scss +41 -41
  27. package/sass/mixins/_clearfix.scss +7 -7
  28. package/sass/mixins/_colors.scss +23 -23
  29. package/sass/mixins/_container.scss +21 -21
  30. package/sass/mixins/_gradient.scss +55 -55
  31. package/sass/mixins/_grid.scss +156 -156
  32. package/sass/mixins/_group.scss +70 -70
  33. package/sass/mixins/_list.scss +18 -18
  34. package/sass/mixins/_screenReader.scss +22 -22
  35. package/sass/mixins/_wrap.scss +7 -7
  36. package/sass/modules/_alert.scss +60 -60
  37. package/sass/modules/_breadcrumbs.scss +43 -43
  38. package/sass/modules/_button.scss +170 -170
  39. package/sass/modules/_card.scss +107 -107
  40. package/sass/modules/_close.scss +59 -59
  41. package/sass/modules/_details.scss +48 -48
  42. package/sass/modules/_dialog.scss +47 -47
  43. package/sass/modules/_dropdown.scss +44 -43
  44. package/sass/modules/_form.scss +261 -261
  45. package/sass/modules/_list.scss +78 -78
  46. package/sass/modules/_loader.scss +183 -183
  47. package/sass/modules/_modal.scss +45 -45
  48. package/sass/modules/_nav.scss +136 -135
  49. package/sass/modules/_pill.scss +61 -61
  50. package/sass/modules/_table.scss +96 -96
  51. package/sass/modules/_tabs.scss +88 -93
  52. package/sass/modules/_tag.scss +72 -72
  53. package/sass/modules/_tile.scss +101 -101
  54. package/sass/modules/_tooltip.scss +108 -108
  55. package/sass/modules/form/_checkbox.scss +78 -78
  56. package/sass/modules/form/_file.scss +149 -149
  57. package/sass/modules/form/_formFieldGroup.scss +60 -60
  58. package/sass/modules/form/_output.scss +6 -6
  59. package/sass/modules/form/_progress.scss +55 -55
  60. package/sass/modules/form/_radio.scss +57 -57
  61. package/sass/modules/form/_range.scss +144 -144
  62. package/sass/modules/form/_select.scss +22 -22
  63. package/sass/modules/form/_text.scss +28 -28
  64. package/sass/modules/form/_textarea.scss +3 -3
  65. package/sass/modules/form/_toggle.scss +68 -68
  66. package/sass/utilities/_align.scss +25 -25
  67. package/sass/utilities/_border.scss +59 -59
  68. package/sass/utilities/_colors.scss +76 -76
  69. package/sass/utilities/_display.scss +25 -25
  70. package/sass/utilities/_flex.scss +65 -65
  71. package/sass/utilities/_float.scss +17 -17
  72. package/sass/utilities/_order.scss +23 -23
  73. package/sass/utilities/_overflow.scss +25 -25
  74. package/sass/utilities/_pointerEvents.scss +17 -17
  75. package/sass/utilities/_position.scss +59 -59
  76. package/sass/utilities/_shadow.scss +7 -7
  77. package/sass/utilities/_size.scss +118 -118
  78. package/sass/utilities/_spacing.scss +107 -107
  79. package/sass/utilities/_translate.scss +15 -15
  80. package/sass/utilities/_typography.scss +62 -62
  81. package/sass/utilities/_visibility.scss +17 -17
  82. package/sass/utilities/_zIndex.scss +15 -15
  83. package/tests.js +5 -5
  84. package/webpack.config.js +27 -27
  85. package/webpack.plugins.js +15 -15
  86. package/webpack.rules.js +8 -8
@@ -1,303 +1,303 @@
1
- @use "sass:math";
2
- @use "sass:meta";
3
- @use "sass:string";
4
-
5
- // stylelint-disable property-blacklist, scss/dollar-variable-default
6
-
7
- // SCSS RFS mixin
8
- //
9
- // Automated responsive values for font sizes, paddings, margins and much more
10
- //
11
- // Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)
12
-
13
- // Configuration
14
-
15
- // Base value
16
- $rfs-base-value: 1.25rem !default;
17
- $rfs-unit: rem !default;
18
-
19
- @if $rfs-unit != rem and $rfs-unit != px {
20
- @error "`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.";
21
- }
22
-
23
- // Breakpoint at where values start decreasing if screen width is smaller
24
- $rfs-breakpoint: 1200px !default;
25
- $rfs-breakpoint-unit: px !default;
26
-
27
- @if $rfs-breakpoint-unit != px and $rfs-breakpoint-unit != em and $rfs-breakpoint-unit != rem {
28
- @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
29
- }
30
-
31
- // Resize values based on screen height and width
32
- $rfs-two-dimensional: false !default;
33
-
34
- // Factor of decrease
35
- $rfs-factor: 10 !default;
36
-
37
- @if meta.type-of($rfs-factor) != number or $rfs-factor <= 1 {
38
- @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
39
- }
40
-
41
- // Mode. Possibilities: "min-media-query", "max-media-query"
42
- $rfs-mode: min-media-query !default;
43
-
44
- // Generate enable or disable classes. Possibilities: false, "enable" or "disable"
45
- $rfs-class: false !default;
46
-
47
- // 1 rem = $rfs-rem-value px
48
- $rfs-rem-value: 16 !default;
49
-
50
- // Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
51
- $rfs-safari-iframe-resize-bug-fix: false !default;
52
-
53
- // Disable RFS by setting $enable-rfs to false
54
- $enable-rfs: true !default;
55
-
56
- // Cache $rfs-base-value unit
57
- $rfs-base-value-unit: math.unit($rfs-base-value);
58
-
59
- // Remove px-unit from $rfs-base-value for calculations
60
- @if $rfs-base-value-unit == px {
61
- $rfs-base-value: math.div($rfs-base-value, $rfs-base-value * 0 + 1);
62
- } @else if $rfs-base-value-unit == rem {
63
- $rfs-base-value: math.div($rfs-base-value, $rfs-base-value * 0 + math.div(1, $rfs-rem-value));
64
- }
65
-
66
- // Cache $rfs-breakpoint unit to prevent multiple calls
67
- $rfs-breakpoint-unit-cache: math.unit($rfs-breakpoint);
68
-
69
- // Remove unit from $rfs-breakpoint for calculations
70
- @if $rfs-breakpoint-unit-cache == px {
71
- $rfs-breakpoint: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
72
- } @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
73
- $rfs-breakpoint: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + math.div(1, $rfs-rem-value));
74
- }
75
-
76
- // Calculate the media query value
77
- $rfs-mq-value: if(
78
- $rfs-breakpoint-unit == px,
79
- #{$rfs-breakpoint}px,
80
- #{math.div($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit}
81
- );
82
- $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
83
- $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
84
-
85
- // Internal mixin used to determine which media query needs to be used
86
- @mixin _rfs-media-query {
87
- @if $rfs-two-dimensional {
88
- @if $rfs-mode == max-media-query {
89
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
90
- @content;
91
- }
92
- } @else {
93
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
94
- @content;
95
- }
96
- }
97
- } @else {
98
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
99
- @content;
100
- }
101
- }
102
- }
103
-
104
- // Internal mixin that adds disable classes to the selector if needed.
105
- @mixin _rfs-rule {
106
- @if $rfs-class == disable and $rfs-mode == max-media-query {
107
- // Adding an extra class increases specificity, which prevents the media query to override the property
108
- &,
109
- .disable-rfs &,
110
- &.disable-rfs {
111
- @content;
112
- }
113
- } @else if $rfs-class == enable and $rfs-mode == min-media-query {
114
- .enable-rfs &,
115
- &.enable-rfs {
116
- @content;
117
- }
118
- } @else {
119
- @content;
120
- }
121
- }
122
-
123
- // Internal mixin that adds enable classes to the selector if needed.
124
- @mixin _rfs-media-query-rule {
125
- @if $rfs-class == enable {
126
- @if $rfs-mode == min-media-query {
127
- @content;
128
- }
129
-
130
- @include _rfs-media-query {
131
- .enable-rfs &,
132
- &.enable-rfs {
133
- @content;
134
- }
135
- }
136
- } @else {
137
- @if $rfs-class == disable and $rfs-mode == min-media-query {
138
- .disable-rfs &,
139
- &.disable-rfs {
140
- @content;
141
- }
142
- }
143
- @include _rfs-media-query {
144
- @content;
145
- }
146
- }
147
- }
148
-
149
- // Helper function to get the formatted non-responsive value
150
- @function rfs-value($values) {
151
- // Convert to list
152
- $values: if(meta.type-of($values) != list, ($values), $values);
153
-
154
- $val: "";
155
-
156
- // Loop over each value and calculate value
157
- @each $value in $values {
158
- @if $value == 0 {
159
- $val: $val + " 0";
160
- } @else {
161
- // Cache $value unit
162
- $unit: if(meta.type-of($value) == "number", math.unit($value), false);
163
-
164
- @if $unit == px {
165
- // Convert to rem if needed
166
- $val: $val + " " + if($rfs-unit == rem, #{math.div($value, $value * 0 + $rfs-rem-value)}rem, $value);
167
- } @else if $unit == rem {
168
- // Convert to px if needed
169
- $val: $val + " " + if($rfs-unit == px, #{math.div($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
170
- } @else {
171
- // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
172
- $val: $val + " " + $value;
173
- }
174
- }
175
- }
176
-
177
- // Remove first space
178
- @return string.unquote(string.slice($val, 2));
179
- }
180
-
181
- // Helper function to get the responsive value calculated by RFS
182
- @function rfs-fluid-value($values) {
183
- // Convert to list
184
- $values: if(meta.type-of($values) != list, ($values), $values);
185
-
186
- $val: "";
187
-
188
- // Loop over each value and calculate value
189
- @each $value in $values {
190
- @if $value == 0 {
191
- $val: $val + " 0";
192
- } @else {
193
- // Cache $value unit
194
- $unit: if(meta.type-of($value) == "number", math.unit($value), false);
195
-
196
- // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
197
- @if not $unit or $unit != px and $unit != rem {
198
- $val: $val + " " + $value;
199
- } @else {
200
- // Remove unit from $value for calculations
201
- $value: math.div($value, $value * 0 + if($unit == px, 1, math.div(1, $rfs-rem-value)));
202
-
203
- // Only add the media query if the value is greater than the minimum value
204
- @if math.abs($value) <= $rfs-base-value or not $enable-rfs {
205
- $val: $val + " " + if($rfs-unit == rem, #{math.div($value, $rfs-rem-value)}rem, #{$value}px);
206
- } @else {
207
- // Calculate the minimum value
208
- $value-min: $rfs-base-value + math.div(math.abs($value) - $rfs-base-value, $rfs-factor);
209
-
210
- // Calculate difference between $value and the minimum value
211
- $value-diff: math.abs($value) - $value-min;
212
-
213
- // Base value formatting
214
- $min-width: if($rfs-unit == rem, #{math.div($value-min, $rfs-rem-value)}rem, #{$value-min}px);
215
-
216
- // Use negative value if needed
217
- $min-width: if($value < 0, -$min-width, $min-width);
218
-
219
- // Use `vmin` if two-dimensional is enabled
220
- $variable-unit: if($rfs-two-dimensional, vmin, vw);
221
-
222
- // Calculate the variable width between 0 and $rfs-breakpoint
223
- $variable-width: #{math.div($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
224
-
225
- // Return the calculated value
226
- $val: $val + " calc(" + $min-width + if($value < 0, " - ", " + ") + $variable-width + ")";
227
- }
228
- }
229
- }
230
- }
231
-
232
- // Remove first space
233
- @return string.unquote(string.slice($val, 2));
234
- }
235
-
236
- // RFS mixin
237
- @mixin rfs($values, $property: font-size) {
238
- @if $values != null {
239
- $val: rfs-value($values);
240
- $fluidVal: rfs-fluid-value($values);
241
-
242
- // Do not print the media query if responsive & non-responsive values are the same
243
- @if $val == $fluidVal {
244
- #{$property}: $val;
245
- } @else {
246
- @include _rfs-rule {
247
- #{$property}: if($rfs-mode == max-media-query, $val, $fluidVal);
248
-
249
- // Include safari iframe resize fix if needed
250
- min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
251
- }
252
-
253
- @include _rfs-media-query-rule {
254
- #{$property}: if($rfs-mode == max-media-query, $fluidVal, $val);
255
- }
256
- }
257
- }
258
- }
259
-
260
- // Shorthand helper mixins
261
- @mixin font-size($value) {
262
- @include rfs($value);
263
- }
264
-
265
- @mixin padding($value) {
266
- @include rfs($value, padding);
267
- }
268
-
269
- @mixin padding-top($value) {
270
- @include rfs($value, padding-top);
271
- }
272
-
273
- @mixin padding-right($value) {
274
- @include rfs($value, padding-right);
275
- }
276
-
277
- @mixin padding-bottom($value) {
278
- @include rfs($value, padding-bottom);
279
- }
280
-
281
- @mixin padding-left($value) {
282
- @include rfs($value, padding-left);
283
- }
284
-
285
- @mixin margin($value) {
286
- @include rfs($value, margin);
287
- }
288
-
289
- @mixin margin-top($value) {
290
- @include rfs($value, margin-top);
291
- }
292
-
293
- @mixin margin-right($value) {
294
- @include rfs($value, margin-right);
295
- }
296
-
297
- @mixin margin-bottom($value) {
298
- @include rfs($value, margin-bottom);
299
- }
300
-
301
- @mixin margin-left($value) {
302
- @include rfs($value, margin-left);
303
- }
1
+ @use "sass:math";
2
+ @use "sass:meta";
3
+ @use "sass:string";
4
+
5
+ // stylelint-disable property-blacklist, scss/dollar-variable-default
6
+
7
+ // SCSS RFS mixin
8
+ //
9
+ // Automated responsive values for font sizes, paddings, margins and much more
10
+ //
11
+ // Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)
12
+
13
+ // Configuration
14
+
15
+ // Base value
16
+ $rfs-base-value: 1.25rem !default;
17
+ $rfs-unit: rem !default;
18
+
19
+ @if $rfs-unit != rem and $rfs-unit != px {
20
+ @error "`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.";
21
+ }
22
+
23
+ // Breakpoint at where values start decreasing if screen width is smaller
24
+ $rfs-breakpoint: 1200px !default;
25
+ $rfs-breakpoint-unit: px !default;
26
+
27
+ @if $rfs-breakpoint-unit != px and $rfs-breakpoint-unit != em and $rfs-breakpoint-unit != rem {
28
+ @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
29
+ }
30
+
31
+ // Resize values based on screen height and width
32
+ $rfs-two-dimensional: false !default;
33
+
34
+ // Factor of decrease
35
+ $rfs-factor: 10 !default;
36
+
37
+ @if meta.type-of($rfs-factor) != number or $rfs-factor <= 1 {
38
+ @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
39
+ }
40
+
41
+ // Mode. Possibilities: "min-media-query", "max-media-query"
42
+ $rfs-mode: min-media-query !default;
43
+
44
+ // Generate enable or disable classes. Possibilities: false, "enable" or "disable"
45
+ $rfs-class: false !default;
46
+
47
+ // 1 rem = $rfs-rem-value px
48
+ $rfs-rem-value: 16 !default;
49
+
50
+ // Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
51
+ $rfs-safari-iframe-resize-bug-fix: false !default;
52
+
53
+ // Disable RFS by setting $enable-rfs to false
54
+ $enable-rfs: true !default;
55
+
56
+ // Cache $rfs-base-value unit
57
+ $rfs-base-value-unit: math.unit($rfs-base-value);
58
+
59
+ // Remove px-unit from $rfs-base-value for calculations
60
+ @if $rfs-base-value-unit == px {
61
+ $rfs-base-value: math.div($rfs-base-value, $rfs-base-value * 0 + 1);
62
+ } @else if $rfs-base-value-unit == rem {
63
+ $rfs-base-value: math.div($rfs-base-value, $rfs-base-value * 0 + math.div(1, $rfs-rem-value));
64
+ }
65
+
66
+ // Cache $rfs-breakpoint unit to prevent multiple calls
67
+ $rfs-breakpoint-unit-cache: math.unit($rfs-breakpoint);
68
+
69
+ // Remove unit from $rfs-breakpoint for calculations
70
+ @if $rfs-breakpoint-unit-cache == px {
71
+ $rfs-breakpoint: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
72
+ } @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
73
+ $rfs-breakpoint: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + math.div(1, $rfs-rem-value));
74
+ }
75
+
76
+ // Calculate the media query value
77
+ $rfs-mq-value: if(
78
+ $rfs-breakpoint-unit == px,
79
+ #{$rfs-breakpoint}px,
80
+ #{math.div($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit}
81
+ );
82
+ $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
83
+ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
84
+
85
+ // Internal mixin used to determine which media query needs to be used
86
+ @mixin _rfs-media-query {
87
+ @if $rfs-two-dimensional {
88
+ @if $rfs-mode == max-media-query {
89
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
90
+ @content;
91
+ }
92
+ } @else {
93
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
94
+ @content;
95
+ }
96
+ }
97
+ } @else {
98
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
99
+ @content;
100
+ }
101
+ }
102
+ }
103
+
104
+ // Internal mixin that adds disable classes to the selector if needed.
105
+ @mixin _rfs-rule {
106
+ @if $rfs-class == disable and $rfs-mode == max-media-query {
107
+ // Adding an extra class increases specificity, which prevents the media query to override the property
108
+ &,
109
+ .disable-rfs &,
110
+ &.disable-rfs {
111
+ @content;
112
+ }
113
+ } @else if $rfs-class == enable and $rfs-mode == min-media-query {
114
+ .enable-rfs &,
115
+ &.enable-rfs {
116
+ @content;
117
+ }
118
+ } @else {
119
+ @content;
120
+ }
121
+ }
122
+
123
+ // Internal mixin that adds enable classes to the selector if needed.
124
+ @mixin _rfs-media-query-rule {
125
+ @if $rfs-class == enable {
126
+ @if $rfs-mode == min-media-query {
127
+ @content;
128
+ }
129
+
130
+ @include _rfs-media-query {
131
+ .enable-rfs &,
132
+ &.enable-rfs {
133
+ @content;
134
+ }
135
+ }
136
+ } @else {
137
+ @if $rfs-class == disable and $rfs-mode == min-media-query {
138
+ .disable-rfs &,
139
+ &.disable-rfs {
140
+ @content;
141
+ }
142
+ }
143
+ @include _rfs-media-query {
144
+ @content;
145
+ }
146
+ }
147
+ }
148
+
149
+ // Helper function to get the formatted non-responsive value
150
+ @function rfs-value($values) {
151
+ // Convert to list
152
+ $values: if(meta.type-of($values) != list, ($values), $values);
153
+
154
+ $val: "";
155
+
156
+ // Loop over each value and calculate value
157
+ @each $value in $values {
158
+ @if $value == 0 {
159
+ $val: $val + " 0";
160
+ } @else {
161
+ // Cache $value unit
162
+ $unit: if(meta.type-of($value) == "number", math.unit($value), false);
163
+
164
+ @if $unit == px {
165
+ // Convert to rem if needed
166
+ $val: $val + " " + if($rfs-unit == rem, #{math.div($value, $value * 0 + $rfs-rem-value)}rem, $value);
167
+ } @else if $unit == rem {
168
+ // Convert to px if needed
169
+ $val: $val + " " + if($rfs-unit == px, #{math.div($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
170
+ } @else {
171
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
172
+ $val: $val + " " + $value;
173
+ }
174
+ }
175
+ }
176
+
177
+ // Remove first space
178
+ @return string.unquote(string.slice($val, 2));
179
+ }
180
+
181
+ // Helper function to get the responsive value calculated by RFS
182
+ @function rfs-fluid-value($values) {
183
+ // Convert to list
184
+ $values: if(meta.type-of($values) != list, ($values), $values);
185
+
186
+ $val: "";
187
+
188
+ // Loop over each value and calculate value
189
+ @each $value in $values {
190
+ @if $value == 0 {
191
+ $val: $val + " 0";
192
+ } @else {
193
+ // Cache $value unit
194
+ $unit: if(meta.type-of($value) == "number", math.unit($value), false);
195
+
196
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
197
+ @if not $unit or $unit != px and $unit != rem {
198
+ $val: $val + " " + $value;
199
+ } @else {
200
+ // Remove unit from $value for calculations
201
+ $value: math.div($value, $value * 0 + if($unit == px, 1, math.div(1, $rfs-rem-value)));
202
+
203
+ // Only add the media query if the value is greater than the minimum value
204
+ @if math.abs($value) <= $rfs-base-value or not $enable-rfs {
205
+ $val: $val + " " + if($rfs-unit == rem, #{math.div($value, $rfs-rem-value)}rem, #{$value}px);
206
+ } @else {
207
+ // Calculate the minimum value
208
+ $value-min: $rfs-base-value + math.div(math.abs($value) - $rfs-base-value, $rfs-factor);
209
+
210
+ // Calculate difference between $value and the minimum value
211
+ $value-diff: math.abs($value) - $value-min;
212
+
213
+ // Base value formatting
214
+ $min-width: if($rfs-unit == rem, #{math.div($value-min, $rfs-rem-value)}rem, #{$value-min}px);
215
+
216
+ // Use negative value if needed
217
+ $min-width: if($value < 0, -$min-width, $min-width);
218
+
219
+ // Use `vmin` if two-dimensional is enabled
220
+ $variable-unit: if($rfs-two-dimensional, vmin, vw);
221
+
222
+ // Calculate the variable width between 0 and $rfs-breakpoint
223
+ $variable-width: #{math.div($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
224
+
225
+ // Return the calculated value
226
+ $val: $val + " calc(" + $min-width + if($value < 0, " - ", " + ") + $variable-width + ")";
227
+ }
228
+ }
229
+ }
230
+ }
231
+
232
+ // Remove first space
233
+ @return string.unquote(string.slice($val, 2));
234
+ }
235
+
236
+ // RFS mixin
237
+ @mixin rfs($values, $property: font-size) {
238
+ @if $values != null {
239
+ $val: rfs-value($values);
240
+ $fluidVal: rfs-fluid-value($values);
241
+
242
+ // Do not print the media query if responsive & non-responsive values are the same
243
+ @if $val == $fluidVal {
244
+ #{$property}: $val;
245
+ } @else {
246
+ @include _rfs-rule {
247
+ #{$property}: if($rfs-mode == max-media-query, $val, $fluidVal);
248
+
249
+ // Include safari iframe resize fix if needed
250
+ min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
251
+ }
252
+
253
+ @include _rfs-media-query-rule {
254
+ #{$property}: if($rfs-mode == max-media-query, $fluidVal, $val);
255
+ }
256
+ }
257
+ }
258
+ }
259
+
260
+ // Shorthand helper mixins
261
+ @mixin font-size($value) {
262
+ @include rfs($value);
263
+ }
264
+
265
+ @mixin padding($value) {
266
+ @include rfs($value, padding);
267
+ }
268
+
269
+ @mixin padding-top($value) {
270
+ @include rfs($value, padding-top);
271
+ }
272
+
273
+ @mixin padding-right($value) {
274
+ @include rfs($value, padding-right);
275
+ }
276
+
277
+ @mixin padding-bottom($value) {
278
+ @include rfs($value, padding-bottom);
279
+ }
280
+
281
+ @mixin padding-left($value) {
282
+ @include rfs($value, padding-left);
283
+ }
284
+
285
+ @mixin margin($value) {
286
+ @include rfs($value, margin);
287
+ }
288
+
289
+ @mixin margin-top($value) {
290
+ @include rfs($value, margin-top);
291
+ }
292
+
293
+ @mixin margin-right($value) {
294
+ @include rfs($value, margin-right);
295
+ }
296
+
297
+ @mixin margin-bottom($value) {
298
+ @include rfs($value, margin-bottom);
299
+ }
300
+
301
+ @mixin margin-left($value) {
302
+ @include rfs($value, margin-left);
303
+ }
@@ -1,13 +1,13 @@
1
- @use "./../mixins/screenReader" as *;
2
-
3
- .screen-reader {
4
- @include make-screen-reader(false);
5
- }
6
-
7
- .screen-reader--focusable {
8
- @include make-screen-reader(true);
9
- }
10
-
11
- .sr {
12
- @include make-screen-reader(true);
13
- }
1
+ @use "./../mixins/screenReader" as *;
2
+
3
+ .screen-reader {
4
+ @include make-screen-reader(false);
5
+ }
6
+
7
+ .screen-reader--focusable {
8
+ @include make-screen-reader(true);
9
+ }
10
+
11
+ .sr {
12
+ @include make-screen-reader(true);
13
+ }
@@ -1,5 +1,5 @@
1
- @use "./../mixins/wrap" as *;
2
-
3
- .wrap--overflow {
4
- @include make-wrap-overflow;
5
- }
1
+ @use "./../mixins/wrap" as *;
2
+
3
+ .wrap--overflow {
4
+ @include make-wrap-overflow;
5
+ }
package/sass/index.scss CHANGED
@@ -1,12 +1,12 @@
1
- @use "sass:color";
2
-
3
- @forward "./variables";
4
- @forward "./functions";
5
- @forward "./mixins";
6
- @forward "./helpers";
7
- @forward "./utilities";
8
- @forward "./modules";
9
- @forward "./reboot";
10
- @forward "./root";
11
-
12
- @import "modern-normalize/modern-normalize.css";
1
+ @use "sass:color";
2
+
3
+ @forward "./variables";
4
+ @forward "./functions";
5
+ @forward "./mixins";
6
+ @forward "./helpers";
7
+ @forward "./utilities";
8
+ @forward "./modules";
9
+ @forward "./reboot";
10
+ @forward "./root";
11
+
12
+ @import "modern-normalize/modern-normalize.css";