claritas-web-framework 8.5.8 → 8.5.91

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,133 +1,133 @@
1
- @use "sass:map";
2
- @use "sass:list";
3
- @use "./../variables" as *;
4
-
5
- // Breakpoint viewport sizes and media queries.
6
- // Breakpoints are defined as a map of (name: minimum width), order from small to large:
7
- // (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
8
- // The map defined in the `$breakpoints` global variable is used as the `$breakpoints` argument by default.
9
-
10
- // Name of the next breakpoint, or null for the last breakpoint.
11
- // >> breakpoint-next(sm)
12
- // md
13
- // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
14
- // md
15
- // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
16
- // md
17
-
18
- @function breakpoint-next($name, $breakpoints: $breakpoints, $breakpoint-names: map.keys($breakpoints)) {
19
- $n: list.index($breakpoint-names, $name);
20
-
21
- @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
22
- }
23
-
24
- // Minimum breakpoint width. Null for the smallest (first) breakpoint.
25
- // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
26
- // 576px
27
-
28
- @function breakpoint-min($name, $breakpoints: $breakpoints) {
29
- $min: map.get($breakpoints, $name);
30
-
31
- @return if($min != 0, $min, null);
32
- }
33
-
34
- // Maximum breakpoint width. Null for the largest (last) breakpoint.
35
- // The maximum value is calculated as the minimum of the next one less 0.02px
36
- // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
37
- // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
38
- // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
39
- // See https://bugs.webkit.org/show_bug.cgi?id=178261
40
- // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
41
- // 767.98px
42
-
43
- @function breakpoint-max($name, $breakpoints: $breakpoints) {
44
- $next: breakpoint-next($name, $breakpoints);
45
-
46
- @return if($next, breakpoint-min($next, $breakpoints) - 0.02, null);
47
- }
48
-
49
- // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
50
- // Useful for making responsive utilities.
51
- // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
52
- // "" (Returns a blank string)
53
- // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
54
- // "-sm"
55
-
56
- @function breakpoint-infix($name, $breakpoints: $breakpoints) {
57
- @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
58
- }
59
-
60
- // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
61
- // Makes the @content apply to the given breakpoint and wider.
62
-
63
- @mixin media-breakpoint-up($name, $breakpoints: $breakpoints) {
64
- $min: breakpoint-min($name, $breakpoints);
65
-
66
- @if $min {
67
- @media (min-width: $min) {
68
- @content;
69
- }
70
- } @else {
71
- @content;
72
- }
73
- }
74
-
75
- // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
76
- // Makes the @content apply to the given breakpoint and narrower.
77
-
78
- @mixin media-breakpoint-down($name, $breakpoints: $breakpoints) {
79
- $max: breakpoint-max($name, $breakpoints);
80
-
81
- @if $max {
82
- @media (max-width: $max) {
83
- @content;
84
- }
85
- } @else {
86
- @content;
87
- }
88
- }
89
-
90
- // Media that spans multiple breakpoint widths.
91
- // Makes the @content apply between the min and max breakpoints
92
-
93
- @mixin media-breakpoint-between($lower, $upper, $breakpoints: $breakpoints) {
94
- $min: breakpoint-min($lower, $breakpoints);
95
- $max: breakpoint-max($upper, $breakpoints);
96
-
97
- @if $min != null and $max != null {
98
- @media (min-width: $min) and (max-width: $max) {
99
- @content;
100
- }
101
- } @else if $max == null {
102
- @include breakpoints.media-breakpoint-up($lower, $breakpoints) {
103
- @content;
104
- }
105
- } @else if $min == null {
106
- @include media-breakpoint-down($upper, $breakpoints) {
107
- @content;
108
- }
109
- }
110
- }
111
-
112
- // Media between the breakpoint's minimum and maximum widths.
113
- // No minimum for the smallest breakpoint, and no maximum for the largest one.
114
- // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
115
-
116
- @mixin media-breakpoint-only($name, $breakpoints: $breakpoints) {
117
- $min: breakpoint-min($name, $breakpoints);
118
- $max: breakpoint-max($name, $breakpoints);
119
-
120
- @if $min != null and $max != null {
121
- @media (min-width: $min) and (max-width: $max) {
122
- @content;
123
- }
124
- } @else if $max == null {
125
- @include breakpoints.media-breakpoint-up($name, $breakpoints) {
126
- @content;
127
- }
128
- } @else if $min == null {
129
- @include media-breakpoint-down($name, $breakpoints) {
130
- @content;
131
- }
132
- }
133
- }
1
+ @use "sass:map";
2
+ @use "sass:list";
3
+ @use "./../variables" as *;
4
+
5
+ // Breakpoint viewport sizes and media queries.
6
+ // Breakpoints are defined as a map of (name: minimum width), order from small to large:
7
+ // (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
8
+ // The map defined in the `$breakpoints` global variable is used as the `$breakpoints` argument by default.
9
+
10
+ // Name of the next breakpoint, or null for the last breakpoint.
11
+ // >> breakpoint-next(sm)
12
+ // md
13
+ // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
14
+ // md
15
+ // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
16
+ // md
17
+
18
+ @function breakpoint-next($name, $breakpoints: $breakpoints, $breakpoint-names: map.keys($breakpoints)) {
19
+ $n: list.index($breakpoint-names, $name);
20
+
21
+ @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
22
+ }
23
+
24
+ // Minimum breakpoint width. Null for the smallest (first) breakpoint.
25
+ // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
26
+ // 576px
27
+
28
+ @function breakpoint-min($name, $breakpoints: $breakpoints) {
29
+ $min: map.get($breakpoints, $name);
30
+
31
+ @return if($min != 0, $min, null);
32
+ }
33
+
34
+ // Maximum breakpoint width. Null for the largest (last) breakpoint.
35
+ // The maximum value is calculated as the minimum of the next one less 0.02px
36
+ // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
37
+ // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
38
+ // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
39
+ // See https://bugs.webkit.org/show_bug.cgi?id=178261
40
+ // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
41
+ // 767.98px
42
+
43
+ @function breakpoint-max($name, $breakpoints: $breakpoints) {
44
+ $next: breakpoint-next($name, $breakpoints);
45
+
46
+ @return if($next, breakpoint-min($next, $breakpoints) - 0.02, null);
47
+ }
48
+
49
+ // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
50
+ // Useful for making responsive utilities.
51
+ // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
52
+ // "" (Returns a blank string)
53
+ // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
54
+ // "-sm"
55
+
56
+ @function breakpoint-infix($name, $breakpoints: $breakpoints) {
57
+ @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
58
+ }
59
+
60
+ // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
61
+ // Makes the @content apply to the given breakpoint and wider.
62
+
63
+ @mixin media-breakpoint-up($name, $breakpoints: $breakpoints) {
64
+ $min: breakpoint-min($name, $breakpoints);
65
+
66
+ @if $min {
67
+ @media (min-width: $min) {
68
+ @content;
69
+ }
70
+ } @else {
71
+ @content;
72
+ }
73
+ }
74
+
75
+ // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
76
+ // Makes the @content apply to the given breakpoint and narrower.
77
+
78
+ @mixin media-breakpoint-down($name, $breakpoints: $breakpoints) {
79
+ $max: breakpoint-max($name, $breakpoints);
80
+
81
+ @if $max {
82
+ @media (max-width: $max) {
83
+ @content;
84
+ }
85
+ } @else {
86
+ @content;
87
+ }
88
+ }
89
+
90
+ // Media that spans multiple breakpoint widths.
91
+ // Makes the @content apply between the min and max breakpoints
92
+
93
+ @mixin media-breakpoint-between($lower, $upper, $breakpoints: $breakpoints) {
94
+ $min: breakpoint-min($lower, $breakpoints);
95
+ $max: breakpoint-max($upper, $breakpoints);
96
+
97
+ @if $min != null and $max != null {
98
+ @media (min-width: $min) and (max-width: $max) {
99
+ @content;
100
+ }
101
+ } @else if $max == null {
102
+ @include breakpoints.media-breakpoint-up($lower, $breakpoints) {
103
+ @content;
104
+ }
105
+ } @else if $min == null {
106
+ @include media-breakpoint-down($upper, $breakpoints) {
107
+ @content;
108
+ }
109
+ }
110
+ }
111
+
112
+ // Media between the breakpoint's minimum and maximum widths.
113
+ // No minimum for the smallest breakpoint, and no maximum for the largest one.
114
+ // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
115
+
116
+ @mixin media-breakpoint-only($name, $breakpoints: $breakpoints) {
117
+ $min: breakpoint-min($name, $breakpoints);
118
+ $max: breakpoint-max($name, $breakpoints);
119
+
120
+ @if $min != null and $max != null {
121
+ @media (min-width: $min) and (max-width: $max) {
122
+ @content;
123
+ }
124
+ } @else if $max == null {
125
+ @include breakpoints.media-breakpoint-up($name, $breakpoints) {
126
+ @content;
127
+ }
128
+ } @else if $min == null {
129
+ @include media-breakpoint-down($name, $breakpoints) {
130
+ @content;
131
+ }
132
+ }
133
+ }
@@ -1,116 +1,116 @@
1
- @use "sass:color";
2
- @use "./../variables" as *;
3
- @use "./../functions" as *;
4
-
5
- @mixin button-variant(
6
- $main,
7
- $value,
8
- $color: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l),
9
- $color-disabled: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l, 75%)
10
- ) {
11
- --button-color: #{$color};
12
- --button-hover-color: #{$color};
13
- --button-focus-color: #{$color};
14
- --button-active-color: #{$color};
15
- --button-disabled-color: #{$color-disabled};
16
- --button-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
17
- --button-hover-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
18
- --button-focus-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
19
- --button-active-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
20
- --button-disabled-border-color: color-mix(in oklab, var(--#{$main}), hsl(0 0% 0% / 5%) #{$border-shade-percentage});
21
- --button-background: var(--#{$main});
22
- --button-hover-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
23
- --button-focus-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
24
- --button-active-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
25
- --button-disabled-background: hsl(from var(--#{$main}) h s l / #{$button-disabled-border-alpha});
26
- --button-box-shadow: 0 0 0 0.125em transparent;
27
- --button-hover-box-shadow: 0 0 0 0.125em transparent;
28
- --button-focus-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
29
- --button-active-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
30
- --button-disabled-box-shadow: 0 0 0 0.125em transparent;
31
- }
32
-
33
- @mixin button-variant-outline(
34
- $main,
35
- $value,
36
- $color: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l),
37
- $border-color: var(--#{$main}),
38
- $border-color-disabled: color-mix(in oklab, var(--#{$main}), hsl(0 0% 0% / 5%) #{$border-shade-percentage})
39
- ) {
40
- --button-color: var(--#{$main});
41
- --button-hover-color: #{$color};
42
- --button-focus-color: #{$color};
43
- --button-active-color: #{$color};
44
- --button-disabled-color: hsl(from var(--#{$main}) h s l / #{$button-disabled-border-alpha});
45
- --button-border-color: #{$border-color};
46
- --button-hover-border-color: #{$border-color};
47
- --button-focus-border-color: #{$border-color};
48
- --button-active-border-color: #{$border-color};
49
- --button-disabled-border-color: #{$border-color-disabled};
50
- --button-background: #{$button-outline-background};
51
- --button-hover-background: var(--#{$main});
52
- --button-focus-background: var(--#{$main});
53
- --button-active-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
54
- --button-disabled-background: transparent;
55
- --button-box-shadow: 0 0 0 0.125em transparent;
56
- --button-hover-box-shadow: 0 0 0 0.125em transparent;
57
- --button-focus-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
58
- --button-active-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
59
- --button-disabled-box-shadow: 0 0 0 0.125em transparent;
60
- }
61
-
62
- @mixin button-variant-link($color) {
63
- --button-color: var(--#{$color});
64
- --button-hover-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
65
- --button-focus-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
66
- --button-active-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
67
- --button-disabled-color: hsl(from var(--#{$color}) h s l / #{$color-disabled-alpha});
68
- --button-border-color: transparent;
69
- --button-hover-border-color: transparent;
70
- --button-focus-border-color: transparent;
71
- --button-active-border-color: transparent;
72
- --button-disabled-border-color: transparent;
73
- --button-background: transparent;
74
- --button-hover-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
75
- --button-focus-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
76
- --button-active-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
77
- --button-disabled-background: transparent;
78
- --button-box-shadow: none;
79
- --button-hover-box-shadow: none;
80
- --button-focus-box-shadow: none;
81
- --button-active-box-shadow: none;
82
- --button-disabled-box-shadow: none;
83
- }
84
-
85
- @mixin button-variant-unstyled($color) {
86
- --button-color: var(--#{$color});
87
- --button-hover-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
88
- --button-focus-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
89
- --button-active-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
90
- --button-disabled-color: hsl(from var(--#{$color}) h s l / #{$color-disabled-alpha});
91
- --button-border-color: transparent;
92
- --button-hover-border-color: transparent;
93
- --button-focus-border-color: transparent;
94
- --button-active-border-color: transparent;
95
- --button-disabled-border-color: transparent;
96
- --button-background: transparent;
97
- --button-hover-background: transparent;
98
- --button-focus-background: transparent;
99
- --button-active-background: transparent;
100
- --button-disabled-background: transparent;
101
- --button-box-shadow: none;
102
- --button-hover-box-shadow: none;
103
- --button-focus-box-shadow: none;
104
- --button-active-box-shadow: none;
105
- --button-disabled-box-shadow: none;
106
- --button-padding-x: 0;
107
- --button-padding-y: 0;
108
- --button-small-padding-x: 0;
109
- --button-small-padding-y: 0;
110
- --button-large-padding-x: 0;
111
- --button-large-padding-y: 0;
112
- --button-hover-text-decoration: underline;
113
- --button-border-radius: 0;
114
- --button-small-border-radius: 0;
115
- --button-large-border-radius: 0;
116
- }
1
+ @use "sass:color";
2
+ @use "./../variables" as *;
3
+ @use "./../functions" as *;
4
+
5
+ @mixin button-variant(
6
+ $main,
7
+ $value,
8
+ $color: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l),
9
+ $color-disabled: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l, 75%)
10
+ ) {
11
+ --button-color: #{$color};
12
+ --button-hover-color: #{$color};
13
+ --button-focus-color: #{$color};
14
+ --button-active-color: #{$color};
15
+ --button-disabled-color: #{$color-disabled};
16
+ --button-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
17
+ --button-hover-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
18
+ --button-focus-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
19
+ --button-active-border-color: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-hover-percentage});
20
+ --button-disabled-border-color: color-mix(in oklab, var(--#{$main}), hsl(0 0% 0% / 5%) #{$border-shade-percentage});
21
+ --button-background: var(--#{$main});
22
+ --button-hover-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
23
+ --button-focus-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
24
+ --button-active-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
25
+ --button-disabled-background: hsl(from var(--#{$main}) h s l / #{$button-disabled-border-alpha});
26
+ --button-box-shadow: 0 0 0 0.125em transparent;
27
+ --button-hover-box-shadow: 0 0 0 0.125em transparent;
28
+ --button-focus-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
29
+ --button-active-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
30
+ --button-disabled-box-shadow: 0 0 0 0.125em transparent;
31
+ }
32
+
33
+ @mixin button-variant-outline(
34
+ $main,
35
+ $value,
36
+ $color: color-flip($main, $value, $button-color-flip-threshold, $button-color-flip-l),
37
+ $border-color: var(--#{$main}),
38
+ $border-color-disabled: color-mix(in oklab, var(--#{$main}), hsl(0 0% 0% / 5%) #{$border-shade-percentage})
39
+ ) {
40
+ --button-color: var(--#{$main});
41
+ --button-hover-color: #{$color};
42
+ --button-focus-color: #{$color};
43
+ --button-active-color: #{$color};
44
+ --button-disabled-color: hsl(from var(--#{$main}) h s l / #{$button-disabled-border-alpha});
45
+ --button-border-color: #{$border-color};
46
+ --button-hover-border-color: #{$border-color};
47
+ --button-focus-border-color: #{$border-color};
48
+ --button-active-border-color: #{$border-color};
49
+ --button-disabled-border-color: #{$border-color-disabled};
50
+ --button-background: #{$button-outline-background};
51
+ --button-hover-background: var(--#{$main});
52
+ --button-focus-background: var(--#{$main});
53
+ --button-active-background: color-mix(in oklab, var(--#{$main}), #000 #{$border-shade-percentage});
54
+ --button-disabled-background: transparent;
55
+ --button-box-shadow: 0 0 0 0.125em transparent;
56
+ --button-hover-box-shadow: 0 0 0 0.125em transparent;
57
+ --button-focus-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
58
+ --button-active-box-shadow: 0 0 0 0.125em hsl(from var(--#{$main}) h s l / 20%);
59
+ --button-disabled-box-shadow: 0 0 0 0.125em transparent;
60
+ }
61
+
62
+ @mixin button-variant-link($color) {
63
+ --button-color: var(--#{$color});
64
+ --button-hover-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
65
+ --button-focus-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
66
+ --button-active-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
67
+ --button-disabled-color: hsl(from var(--#{$color}) h s l / #{$color-disabled-alpha});
68
+ --button-border-color: transparent;
69
+ --button-hover-border-color: transparent;
70
+ --button-focus-border-color: transparent;
71
+ --button-active-border-color: transparent;
72
+ --button-disabled-border-color: transparent;
73
+ --button-background: transparent;
74
+ --button-hover-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
75
+ --button-focus-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
76
+ --button-active-background: hsl(from var(--#{$color}) h s l / #{$button-hover-background-alpha});
77
+ --button-disabled-background: transparent;
78
+ --button-box-shadow: none;
79
+ --button-hover-box-shadow: none;
80
+ --button-focus-box-shadow: none;
81
+ --button-active-box-shadow: none;
82
+ --button-disabled-box-shadow: none;
83
+ }
84
+
85
+ @mixin button-variant-unstyled($color) {
86
+ --button-color: var(--#{$color});
87
+ --button-hover-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
88
+ --button-focus-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
89
+ --button-active-color: color-mix(in oklab, var(--#{$color}), #000 #{$link-shade-percentage});
90
+ --button-disabled-color: hsl(from var(--#{$color}) h s l / #{$color-disabled-alpha});
91
+ --button-border-color: transparent;
92
+ --button-hover-border-color: transparent;
93
+ --button-focus-border-color: transparent;
94
+ --button-active-border-color: transparent;
95
+ --button-disabled-border-color: transparent;
96
+ --button-background: transparent;
97
+ --button-hover-background: transparent;
98
+ --button-focus-background: transparent;
99
+ --button-active-background: transparent;
100
+ --button-disabled-background: transparent;
101
+ --button-box-shadow: none;
102
+ --button-hover-box-shadow: none;
103
+ --button-focus-box-shadow: none;
104
+ --button-active-box-shadow: none;
105
+ --button-disabled-box-shadow: none;
106
+ --button-padding-x: 0;
107
+ --button-padding-y: 0;
108
+ --button-small-padding-x: 0;
109
+ --button-small-padding-y: 0;
110
+ --button-large-padding-x: 0;
111
+ --button-large-padding-y: 0;
112
+ --button-hover-text-decoration: underline;
113
+ --button-border-radius: 0;
114
+ --button-small-border-radius: 0;
115
+ --button-large-border-radius: 0;
116
+ }
@@ -1,41 +1,41 @@
1
- @use "./../variables" as *;
2
-
3
- @mixin make-caret($left: false, $position: calc(var(--spacer) * 0.5)) {
4
- position: relative;
5
-
6
- &::after {
7
- position: absolute;
8
- content: "";
9
- inset: 50% auto auto;
10
- transform: translateY(-50%);
11
- width: 0;
12
- height: 0;
13
- border-left: calc(var(--spacer) * 0.25) solid transparent;
14
- border-right: calc(var(--spacer) * 0.25) solid transparent;
15
- pointer-events: none;
16
-
17
- @if $left {
18
- left: $position;
19
- } @else {
20
- right: $position;
21
- }
22
- }
23
- }
24
-
25
- @mixin make-caret-down($left: false, $color: "body-color", $position: calc(var(--spacer) * 0.5)) {
26
- @include make-caret($left);
27
-
28
- &::after {
29
- border-bottom: 0;
30
- border-top: calc(var(--spacer) * 0.25) solid hsl(from var(--#{$color}) h s l);
31
- }
32
- }
33
-
34
- @mixin make-caret-up($left: false, $color: "body-color", $position: calc(var(--spacer) * 0.5)) {
35
- @include make-caret($left);
36
-
37
- &::after {
38
- border-top: 0;
39
- border-bottom: calc(var(--spacer) * 0.25) solid hsl(from var(--#{$color}) h s l);
40
- }
41
- }
1
+ @use "./../variables" as *;
2
+
3
+ @mixin make-caret($left: false, $position: calc(var(--spacer) * 0.5)) {
4
+ position: relative;
5
+
6
+ &::after {
7
+ position: absolute;
8
+ content: "";
9
+ inset: 50% auto auto;
10
+ transform: translateY(-50%);
11
+ width: 0;
12
+ height: 0;
13
+ border-left: calc(var(--spacer) * 0.25) solid transparent;
14
+ border-right: calc(var(--spacer) * 0.25) solid transparent;
15
+ pointer-events: none;
16
+
17
+ @if $left {
18
+ left: $position;
19
+ } @else {
20
+ right: $position;
21
+ }
22
+ }
23
+ }
24
+
25
+ @mixin make-caret-down($left: false, $color: "body-color", $position: calc(var(--spacer) * 0.5)) {
26
+ @include make-caret($left);
27
+
28
+ &::after {
29
+ border-bottom: 0;
30
+ border-top: calc(var(--spacer) * 0.25) solid hsl(from var(--#{$color}) h s l);
31
+ }
32
+ }
33
+
34
+ @mixin make-caret-up($left: false, $color: "body-color", $position: calc(var(--spacer) * 0.5)) {
35
+ @include make-caret($left);
36
+
37
+ &::after {
38
+ border-top: 0;
39
+ border-bottom: calc(var(--spacer) * 0.25) solid hsl(from var(--#{$color}) h s l);
40
+ }
41
+ }
@@ -1,7 +1,7 @@
1
- @mixin clearfix() {
2
- &::after {
3
- display: block;
4
- content: "";
5
- clear: both;
6
- }
7
- }
1
+ @mixin clearfix() {
2
+ &::after {
3
+ display: block;
4
+ content: "";
5
+ clear: both;
6
+ }
7
+ }
@@ -1,23 +1,23 @@
1
- @use "sass:color";
2
- @use "./../variables" as *;
3
- @use "./../functions" as *;
4
-
5
- @mixin define-color-variables($title, $color) {
6
- --#{$title}-h: #{color.channel($color, "hue", $space: hsl)};
7
- --#{$title}-s: #{color.channel($color, "saturation", $space: hsl)};
8
- --#{$title}-l: #{color.channel($color, "lightness", $space: hsl)};
9
- }
10
-
11
- @mixin make-color($title) {
12
- --color: var(--#{$title});
13
- --color-hover: color-mix(in oklab, var(--#{$title}), #000 #{$link-shade-percentage});
14
- --color-disabled: hsl(from var(--#{$title}) h s l / #{$color-disabled-alpha});
15
- }
16
-
17
- @mixin make-background-color($title) {
18
- --background-color: var(--#{$title});
19
- }
20
-
21
- @mixin make-border-color($title) {
22
- --border-color: var(--#{$title});
23
- }
1
+ @use "sass:color";
2
+ @use "./../variables" as *;
3
+ @use "./../functions" as *;
4
+
5
+ @mixin define-color-variables($title, $color) {
6
+ --#{$title}-h: #{color.channel($color, "hue", $space: hsl)};
7
+ --#{$title}-s: #{color.channel($color, "saturation", $space: hsl)};
8
+ --#{$title}-l: #{color.channel($color, "lightness", $space: hsl)};
9
+ }
10
+
11
+ @mixin make-color($title) {
12
+ --color: var(--#{$title});
13
+ --color-hover: color-mix(in oklab, var(--#{$title}), #000 #{$link-shade-percentage});
14
+ --color-disabled: hsl(from var(--#{$title}) h s l / #{$color-disabled-alpha});
15
+ }
16
+
17
+ @mixin make-background-color($title) {
18
+ --background-color: var(--#{$title});
19
+ }
20
+
21
+ @mixin make-border-color($title) {
22
+ --border-color: var(--#{$title});
23
+ }