@semanticus/semanticus-css 1.0.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semanticus/semanticus-css",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "lightweight CSS framework that prioritizes semantic HTML and ARIA-focused accessibility, with a small set of atomic utilities",
5
5
  "author": "Joao Goncalves",
6
6
  "style": "./dist/semanticus.css",
@@ -1,6 +1,5 @@
1
1
  .card,
2
- .pane,
3
- .panel {
2
+ .pane {
4
3
  --shadow: var(--dialog-shadow);
5
4
  --color-background: var(--dialog-fill);
6
5
  --border-color: var(--dialog-border);
@@ -12,7 +11,6 @@
12
11
  border: var(--border-size) solid var(--border-color);
13
12
  background: var(--color-background);
14
13
  box-shadow: var(--shadow);
15
- position: relative;
16
14
 
17
15
  > header,
18
16
  > footer {
@@ -20,65 +18,30 @@
20
18
  margin-inline: calc(var(--spacing) * -1);
21
19
  padding-inline: var(--spacing);
22
20
  background-color: var(--dialog-section-fill);
21
+ display: flex;
22
+ gap: calc(var(--nav-link-gap) * 1.5);
23
+ align-items: center;
23
24
  }
24
25
 
26
+ /* Header styling */
25
27
  > header {
26
28
  margin-top: calc(var(--spacing) * -1);
27
29
  border-bottom: var(--border-size) solid var(--dialog-section-border);
28
30
  border-top-right-radius: var(--radius);
29
31
  border-top-left-radius: var(--radius);
32
+ justify-content: space-between;
30
33
  }
31
34
 
35
+ /* Footer styling */
32
36
  > footer {
33
37
  margin-bottom: calc(var(--spacing) * -1);
34
38
  border-top: var(--border-size) solid var(--dialog-section-border);
35
39
  border-bottom-right-radius: var(--radius);
36
40
  border-bottom-left-radius: var(--radius);
37
- display: flex;
38
41
  justify-content: end;
39
- gap: calc(var(--nav-link-gap) * 1.5);
40
42
  }
41
43
 
42
- > :last-child:is(hgroup) {
44
+ > :last-child:is(hgroup, h1, h2, h3, h4, h5, h6) {
43
45
  margin-bottom: 0;
44
46
  }
45
-
46
- /* Close button styling */
47
- [rel="prev"] {
48
- margin: 0;
49
- padding: 0;
50
- position: absolute;
51
- display: block;
52
- width: 1rem;
53
- height: 1rem;
54
- top: var(--spacing);
55
- right: var(--spacing);
56
- border: none;
57
- border-radius: 0;
58
- background-image: var(--icon-close);
59
- background-position: center;
60
- background-size: auto 1rem;
61
- background-repeat: no-repeat;
62
- background-color: transparent;
63
- box-shadow: none;
64
- opacity: 0.5;
65
- transition: opacity var(--transition);
66
-
67
- &:hover {
68
- opacity: 1;
69
- }
70
- }
71
- }
72
-
73
- .pane,
74
- .panel {
75
- --dialog-shadow: none;
76
- --shadow: none;
77
- }
78
-
79
- .pane {
80
- --dialog-border: transparent;
81
- --border-color: transparent;
82
-
83
- border-radius: 0;
84
47
  }
@@ -0,0 +1,59 @@
1
+ /* Base styles shared by all .icon-* classes */
2
+ [class^="icon-"],
3
+ [class*=" icon-"] {
4
+ display: inline-block;
5
+ width: 1em;
6
+ height: 1em;
7
+ margin: 0;
8
+ padding: 0;
9
+ border: none;
10
+ border-radius: 0;
11
+ background-color: currentColor;
12
+ background-image: none;
13
+ mask-position: center;
14
+ mask-size: contain;
15
+ mask-repeat: no-repeat;
16
+ vertical-align: -.199em;
17
+ align-self: center;
18
+ color: inherit;
19
+ }
20
+
21
+ .icon-checkbox {
22
+ mask-image: var(--icon-checkbox);
23
+ }
24
+
25
+ .icon-chevron {
26
+ mask-image: var(--icon-chevron);
27
+ }
28
+
29
+ .icon-close {
30
+ mask-image: var(--icon-close);
31
+ }
32
+
33
+ .icon-date {
34
+ mask-image: var(--icon-date);
35
+ }
36
+
37
+ .icon-invalid {
38
+ mask-image: var(--icon-invalid);
39
+ }
40
+
41
+ .icon-loading {
42
+ mask-image: var(--icon-loading);
43
+ }
44
+
45
+ .icon-minus {
46
+ mask-image: var(--icon-minus);
47
+ }
48
+
49
+ .icon-search {
50
+ mask-image: var(--icon-search);
51
+ }
52
+
53
+ .icon-time {
54
+ mask-image: var(--icon-time);
55
+ }
56
+
57
+ .icon-valid {
58
+ mask-image: var(--icon-valid);
59
+ }
@@ -0,0 +1,19 @@
1
+ /* Please see src/components/_card.css, since .pane shares most of its styling with .card */
2
+
3
+ .pane {
4
+ --dialog-shadow: none;
5
+ --shadow: none;
6
+ --dialog-border: transparent;
7
+ --border-color: transparent;
8
+ --color-background: light-dark(
9
+ color-mix(in srgb, var(--color-slate-50) 25%, white),
10
+ color-mix(in srgb, var(--color-slate-50), transparent 95%)
11
+ );
12
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
13
+
14
+ border-radius: 0;
15
+
16
+ > :is(header, footer) {
17
+ border-radius: 0;
18
+ }
19
+ }
@@ -1,2 +1,5 @@
1
1
  @import "./_card.css";
2
+ @import "./_container.css";
3
+ @import "./_icons.css";
4
+ @import "./_pane.css";
2
5
  @import "./_sidebar.css";
package/src/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Semanticus CSS v0.9.0 (https://semanticus.design/)
2
+ * Semanticus CSS v1.1.0 (https://semanticus.design/)
3
3
  *
4
4
  * A ARIA-centric, semantic HTML — enhanced with components and variants and utilities
5
5
  *
@@ -0,0 +1,25 @@
1
+ /* Buttons and button-like elements */
2
+ :is(button, [type=submit], [type=button], [type=reset], [role=button])[aria-disabled=true],
3
+ fieldset[aria-disabled=true] :is(button, [type=submit], [type=button], [type=reset], [role=button]) {
4
+ opacity: 0.5;
5
+ pointer-events: none;
6
+ }
7
+
8
+ /* Links */
9
+ a[aria-disabled=true],
10
+ [role=link][aria-disabled=true] {
11
+ opacity: 0.5;
12
+ pointer-events: none;
13
+ }
14
+
15
+ /* Form controls */
16
+ :is(input:not([type=submit], [type=button], [type=reset]), select, textarea)[aria-disabled=true],
17
+ fieldset[aria-disabled=true] :is(input:not([type=submit], [type=button], [type=reset]), select, textarea) {
18
+ opacity: var(--input-opacity-disabled);
19
+ pointer-events: none;
20
+ }
21
+
22
+ /* Switch color adjustment */
23
+ [type=checkbox][role=switch][aria-disabled=true] {
24
+ --color-background: var(--border-color);
25
+ }
@@ -0,0 +1,123 @@
1
+ [role="status"],
2
+ [role="alert"] {
3
+ --color-background: light-dark(
4
+ color-mix(in srgb, var(--color-slate-50) 25%, white),
5
+ color-mix(in srgb, var(--color-slate-50), transparent 95%)
6
+ );
7
+ --border-color: var(--dialog-border);
8
+ --alert-size: var(--border-size);
9
+
10
+ color: var(--color-text);
11
+ padding: var(--spacing);
12
+ margin-bottom: var(--spacing);
13
+ border-radius: var(--radius);
14
+ border: var(--border-size) solid var(--border-color);
15
+ border-inline-start-width: var(--alert-size);
16
+ border-inline-start-color: var(--dialog-border);
17
+ background: var(--color-background);
18
+ position: relative;
19
+
20
+ &:is(.ghost, .subtle) {
21
+ --alert-size: calc(var(--border-size) * 4);
22
+ }
23
+
24
+ /* Opening animation using @starting-style (Chrome 117+, Firefox 129+, Safari 17.4+) */
25
+ /* Gracefully degrades to instant appearance in unsupported browsers */
26
+ transition: opacity 0.2s ease-in-out, top 0.2s ease-in-out, right 0.2s ease-in-out, left 0.2s ease-in-out, bottom 0.2s ease-in-out;
27
+
28
+ &[popover] {
29
+ display: none;
30
+ box-shadow: var(--shadow);
31
+ left: unset;
32
+ right: 0;
33
+ bottom: 0;
34
+ top: unset;
35
+ margin: var(--spacing);
36
+
37
+ &:popover-open {
38
+ display: flex;
39
+ }
40
+
41
+ &[data-placement="top-start"] {
42
+ left: 0;
43
+ right: unset;
44
+ top: 0;
45
+ bottom: unset;
46
+ }
47
+
48
+ &[data-placement="top-center"] {
49
+ right: 50%;
50
+ transform: translateX(50%);
51
+ top: 0;
52
+ bottom: unset;
53
+ }
54
+
55
+ &[data-placement="top-end"] {
56
+ right: 0;
57
+ top: 0;
58
+ bottom: unset;
59
+ }
60
+
61
+ &[data-placement="middle-start"] {
62
+ left: 0;
63
+ right: unset;
64
+ bottom: 50%;
65
+ transform: translateY(50%);
66
+ }
67
+
68
+ &[data-placement="middle-center"] {
69
+ right: 50%;
70
+ transform: translate(50%, 50%);
71
+ bottom: 50%;
72
+ }
73
+
74
+ &[data-placement="middle-end"] {
75
+ right: 0;
76
+ bottom: 50%;
77
+ transform: translateY(50%);
78
+ }
79
+
80
+ &[data-placement="bottom-start"] {
81
+ left: 0;
82
+ right: unset;
83
+ bottom: 0;
84
+ }
85
+
86
+ &[data-placement="bottom-center"] {
87
+ right: 50%;
88
+ transform: translateX(50%);
89
+ bottom: 0;
90
+ }
91
+
92
+ &[data-placement="bottom-end"] {
93
+ right: 0;
94
+ bottom: 0;
95
+ }
96
+ }
97
+ }
98
+
99
+ @starting-style {
100
+ :is([role="status"], [role="alert"]):popover-open {
101
+ opacity: 0;
102
+
103
+ &:not([data-placement]) {
104
+ right: -20px;
105
+ }
106
+
107
+ &[data-placement$="start"] {
108
+ left: -20px;
109
+ }
110
+
111
+ &[data-placement="top-center"] {
112
+ top: -20px;
113
+ }
114
+
115
+ &[data-placement="bottom-center"] {
116
+ bottom: -20px;
117
+ }
118
+
119
+ &[data-placement$="end"] {
120
+ right: -20px;
121
+ }
122
+ }
123
+ }
@@ -4,7 +4,7 @@
4
4
  width: fit-content;
5
5
  }
6
6
 
7
- :not(a, button, input, [role=button])[aria-describedby] {
7
+ :not(a, button, dialog, input, [role=button])[aria-describedby] {
8
8
  border-bottom: 1px dotted;
9
9
  text-decoration: none;
10
10
  cursor: help;
@@ -75,8 +75,7 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
75
75
  }
76
76
 
77
77
  [type=reset],
78
- [type=file]::file-selector-button,
79
- [aria-label="Close"] {
78
+ [type=file]::file-selector-button {
80
79
  --color-background: var(--color-secondary-fill);
81
80
  --border-color: var(--color-secondary-fill);
82
81
  --color-text: var(--color-secondary-on-fill);
@@ -84,15 +83,13 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
84
83
  }
85
84
 
86
85
  [type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
87
- [type=file]::file-selector-button:is(:hover, :active, :focus),
88
- [aria-label="Close"]:is(:hover, :active, :focus) {
86
+ [type=file]::file-selector-button:is(:hover, :active, :focus) {
89
87
  --color-background: var(--color-secondary-fill-hover);
90
88
  --border-color: var(--color-secondary-fill-hover);
91
89
  --color-text: var(--color-secondary-on-fill);
92
90
  }
93
91
 
94
92
  [type=reset]:focus,
95
- [aria-label="Close"]:focus,
96
93
  [type=reset]:is([aria-current]:not([aria-current=false])):focus,
97
94
  [type=file]::file-selector-button:focus {
98
95
  --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-secondary-focus-ring);
@@ -19,7 +19,7 @@ dialog {
19
19
  border-radius: var(--radius);
20
20
  background: var(--dialog-fill);
21
21
  box-shadow: var(--dialog-shadow);
22
- border: 0;
22
+ border: var(--border-size) solid var(--border-color);
23
23
 
24
24
  /* Opening animation using @starting-style (Chrome 117+, Firefox 129+, Safari 17.4+) */
25
25
  /* Gracefully degrades to instant appearance in unsupported browsers */
@@ -52,6 +52,9 @@ dialog {
52
52
  margin-inline: calc(var(--spacing) * -1);
53
53
  padding-inline: var(--spacing);
54
54
  background-color: var(--dialog-section-fill);
55
+ display: flex;
56
+ gap: calc(var(--nav-link-gap) * 1.5);
57
+ align-items: center;
55
58
  }
56
59
 
57
60
  /* Header styling */
@@ -60,6 +63,7 @@ dialog {
60
63
  border-bottom: var(--border-size) solid var(--dialog-section-border);
61
64
  border-top-right-radius: var(--radius);
62
65
  border-top-left-radius: var(--radius);
66
+ justify-content: space-between;
63
67
  }
64
68
 
65
69
  /* Footer styling */
@@ -68,35 +72,11 @@ dialog {
68
72
  border-top: var(--border-size) solid var(--dialog-section-border);
69
73
  border-bottom-right-radius: var(--radius);
70
74
  border-bottom-left-radius: var(--radius);
71
- display: flex;
72
75
  justify-content: end;
73
- gap: calc(var(--nav-link-gap) * 1.5);
74
76
  }
75
77
 
76
- /* Close button styling */
77
- [rel=prev] {
78
- margin: 0;
79
- padding: 0;
80
- position: absolute;
81
- display: block;
82
- width: 1rem;
83
- height: 1rem;
84
- top: calc(var(--spacing) * .66);
85
- right: var(--spacing);
86
- border: none;
87
- border-radius: 0;
88
- background-image: var(--icon-close);
89
- background-position: center;
90
- background-size: auto 1rem;
91
- background-repeat: no-repeat;
92
- background-color: transparent;
93
- box-shadow: none;
94
- opacity: 0.5;
95
- transition: opacity var(--transition);
96
-
97
- &:hover {
98
- opacity: 1;
99
- }
78
+ > :last-child:is(hgroup, h1, h2, h3, h4, h5, h6) {
79
+ margin-bottom: 0;
100
80
  }
101
81
  }
102
82
 
@@ -1,7 +1,9 @@
1
1
  @import "./attributes/_aria-busy.css";
2
+ @import "./attributes/_aria-disabled.css";
2
3
  @import "./attributes/_hidden.css";
3
4
  @import "./attributes/_popover.css";
4
5
  @import "./attributes/_role-group-search.css";
6
+ @import "./attributes/_role-status-alert.css";
5
7
  @import "./attributes/_role-toolbar.css";
6
8
  @import "./attributes/_role-tooltip.css";
7
9
 
@@ -266,15 +266,15 @@
266
266
  /* === ICONS === */
267
267
  body {
268
268
  --icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
269
- --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
270
269
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
271
- --icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
272
- --icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
273
- --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
274
270
  --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
271
+ --icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
272
+ --icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(197, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
275
273
  --icon-loading: url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E");
274
+ --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
275
+ --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
276
+ --icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
276
277
  --icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(43, 122, 76)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
277
- --icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(197, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
278
278
 
279
279
  @container style(--theme: dark) {
280
280
  --icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(110, 213, 157)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
@@ -10,12 +10,15 @@
10
10
  }
11
11
  }
12
12
 
13
+ .contrast:not([role="link"], a:not([role="button"])) {
14
+ --color-background: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
15
+ --border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
16
+ --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
17
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
18
+ }
19
+
13
20
  :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
21
  &.contrast {
15
- --color-background: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
16
- --border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
17
- --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
18
-
19
22
  &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
23
  --color-background: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-background-opacity));
21
24
  --border-color: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-border-opacity));
@@ -29,9 +32,7 @@
29
32
  }
30
33
  }
31
34
 
32
- :is(.card, .pane, .panel).contrast {
33
- --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
34
- --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ :is(.card, .pane, [role="status"], [role="alert"]).contrast {
35
36
  --dialog-fill: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
36
37
  --dialog-border: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
37
38
  --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-50), var(--color-slate-900)), transparent 90%);
@@ -10,12 +10,15 @@
10
10
  }
11
11
  }
12
12
 
13
+ .danger:not([role="link"], a:not([role="button"])) {
14
+ --color-background: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
15
+ --border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
16
+ --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
17
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
18
+ }
19
+
13
20
  :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
21
  &.danger {
15
- --color-background: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
16
- --border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
17
- --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
18
-
19
22
  &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
23
  --color-background: oklch(from var(--color-danger-fill-hover) l c h / var(--color-background-opacity));
21
24
  --border-color: oklch(from var(--color-danger-fill-hover) l c h / var(--color-border-opacity));
@@ -29,9 +32,7 @@
29
32
  }
30
33
  }
31
34
 
32
- :is(.card, .pane, .panel).danger {
33
- --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
34
- --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ :is(.card, .pane, [role="status"], [role="alert"]).danger {
35
36
  --dialog-fill: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
36
37
  --dialog-border: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
37
38
  --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
@@ -10,12 +10,15 @@
10
10
  }
11
11
  }
12
12
 
13
+ .info:not([role="link"], a:not([role="button"])) {
14
+ --color-background: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
15
+ --border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
16
+ --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
17
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
18
+ }
19
+
13
20
  :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
21
  &.info {
15
- --color-background: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
16
- --border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
17
- --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
18
-
19
22
  &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
23
  --color-background: oklch(from var(--color-info-fill-hover) l c h / var(--color-background-opacity));
21
24
  --border-color: oklch(from var(--color-info-fill-hover) l c h / var(--color-border-opacity));
@@ -29,9 +32,7 @@
29
32
  }
30
33
  }
31
34
 
32
- :is(.card, .pane, .panel).info {
33
- --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
34
- --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ :is(.card, .pane, [role="status"], [role="alert"]).info {
35
36
  --dialog-fill: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
36
37
  --dialog-border: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
37
38
  --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
@@ -10,12 +10,15 @@
10
10
  }
11
11
  }
12
12
 
13
+ .primary:not([role="link"], a:not([role="button"])) {
14
+ --color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
15
+ --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
16
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
17
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
18
+ }
19
+
13
20
  :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
21
  &.primary {
15
- --color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
16
- --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
17
- --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
18
-
19
22
  &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
23
  --color-background: oklch(from var(--color-primary-fill-hover) l c h / var(--color-background-opacity));
21
24
  --border-color: oklch(from var(--color-primary-fill-hover) l c h / var(--color-border-opacity));
@@ -29,9 +32,7 @@
29
32
  }
30
33
  }
31
34
 
32
- :is(.card, .pane, .panel).primary {
33
- --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
34
- --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ :is(.card, .pane, [role="status"], [role="alert"]).primary {
35
36
  --dialog-fill: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
36
37
  --dialog-border: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
37
38
  --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
@@ -10,12 +10,15 @@
10
10
  }
11
11
  }
12
12
 
13
+ .secondary:not([role="link"], a:not([role="button"])) {
14
+ --color-background: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
15
+ --border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
16
+ --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
17
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
18
+ }
19
+
13
20
  :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
21
  &.secondary {
15
- --color-background: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
16
- --border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
17
- --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
18
-
19
22
  &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
23
  --color-background: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-background-opacity));
21
24
  --border-color: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-border-opacity));
@@ -29,9 +32,7 @@
29
32
  }
30
33
  }
31
34
 
32
- :is(.card, .pane, .panel).secondary {
33
- --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
34
- --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ :is(.card, .pane, [role="status"], [role="alert"]).secondary {
35
36
  --dialog-fill: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
36
37
  --dialog-border: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
37
38
  --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);