@semanticus/semanticus-css 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/NOTICE +16 -16
  2. package/README.md +128 -29
  3. package/dist/semanticus-no-utilities.css +11 -0
  4. package/dist/semanticus-semantics.css +3 -4
  5. package/dist/semanticus-utilities.css +11 -0
  6. package/dist/semanticus.css +4 -12
  7. package/dist/semanticus.palette.amber.css +1 -1
  8. package/dist/semanticus.palette.azure.css +1 -0
  9. package/dist/semanticus.palette.blue.css +1 -1
  10. package/dist/semanticus.palette.cyan.css +1 -1
  11. package/dist/semanticus.palette.fuchsia.css +1 -1
  12. package/dist/semanticus.palette.green.css +1 -1
  13. package/dist/semanticus.palette.grey.css +1 -1
  14. package/dist/semanticus.palette.indigo.css +1 -1
  15. package/dist/semanticus.palette.jade.css +1 -1
  16. package/dist/semanticus.palette.lime.css +1 -1
  17. package/dist/semanticus.palette.orange.css +1 -1
  18. package/dist/semanticus.palette.pink.css +1 -1
  19. package/dist/semanticus.palette.pumpkin.css +1 -1
  20. package/dist/semanticus.palette.purple.css +1 -1
  21. package/dist/semanticus.palette.red.css +1 -1
  22. package/dist/semanticus.palette.sand.css +1 -1
  23. package/dist/semanticus.palette.slate.css +1 -1
  24. package/dist/semanticus.palette.violet.css +1 -1
  25. package/dist/semanticus.palette.yellow.css +1 -1
  26. package/dist/semanticus.palette.zinc.css +1 -1
  27. package/dist/semanticus.size.pico.css +1 -1
  28. package/package.json +24 -15
  29. package/src/components/_card.css +84 -0
  30. package/src/{variants → components}/_sidebar.css +3 -5
  31. package/src/components/modules.css +2 -0
  32. package/src/index.css +8 -10
  33. package/src/no-utilities.css +22 -0
  34. package/src/palettes/amber.css +28 -53
  35. package/src/palettes/azure.css +31 -0
  36. package/src/palettes/blue.css +28 -53
  37. package/src/palettes/cyan.css +28 -53
  38. package/src/palettes/fuchsia.css +28 -53
  39. package/src/palettes/green.css +28 -53
  40. package/src/palettes/grey.css +28 -53
  41. package/src/palettes/indigo.css +28 -53
  42. package/src/palettes/jade.css +28 -53
  43. package/src/palettes/lime.css +28 -53
  44. package/src/palettes/orange.css +28 -53
  45. package/src/palettes/pink.css +28 -53
  46. package/src/palettes/pumpkin.css +28 -53
  47. package/src/palettes/purple.css +28 -53
  48. package/src/palettes/red.css +28 -53
  49. package/src/palettes/sand.css +28 -53
  50. package/src/palettes/slate.css +28 -53
  51. package/src/palettes/violet.css +28 -53
  52. package/src/palettes/yellow.css +28 -53
  53. package/src/palettes/zinc.css +28 -53
  54. package/src/semantics/attributes/_aria-busy.css +0 -3
  55. package/src/semantics/attributes/_hidden.css +0 -3
  56. package/src/semantics/attributes/_role-group-search.css +11 -14
  57. package/src/semantics/attributes/_role-toolbar.css +2 -5
  58. package/src/semantics/attributes/_role-tooltip.css +6 -9
  59. package/src/semantics/elements/_article.css +0 -3
  60. package/src/semantics/elements/_aside.css +1 -7
  61. package/src/semantics/elements/_blockquote.css +2 -2
  62. package/src/semantics/elements/_body.css +1 -4
  63. package/src/semantics/elements/_button.css +23 -26
  64. package/src/semantics/elements/_code.css +5 -8
  65. package/src/semantics/elements/_del.css +1 -1
  66. package/src/semantics/elements/_details.css +39 -40
  67. package/src/semantics/elements/_dialog.css +13 -17
  68. package/src/semantics/elements/_document.css +10 -4
  69. package/src/semantics/elements/_embedded.css +0 -3
  70. package/src/semantics/elements/_figure.css +0 -3
  71. package/src/semantics/elements/_footer.css +0 -3
  72. package/src/semantics/elements/_header.css +0 -3
  73. package/src/semantics/elements/_headings.css +7 -17
  74. package/src/semantics/elements/_hgroup.css +1 -1
  75. package/src/semantics/elements/_hr.css +1 -4
  76. package/src/semantics/elements/_input.css +33 -36
  77. package/src/semantics/elements/_ins.css +1 -1
  78. package/src/semantics/elements/_links.css +22 -18
  79. package/src/semantics/elements/_main.css +0 -4
  80. package/src/semantics/elements/_mark.css +2 -2
  81. package/src/semantics/elements/_nav.css +5 -8
  82. package/src/semantics/elements/_progress.css +5 -8
  83. package/src/semantics/elements/_section.css +0 -3
  84. package/src/semantics/elements/_small.css +3 -0
  85. package/src/semantics/elements/_table.css +3 -5
  86. package/src/semantics/elements/_type-checkbox-radio.css +19 -22
  87. package/src/semantics/elements/_type-color.css +2 -5
  88. package/src/semantics/elements/_type-date.css +1 -4
  89. package/src/semantics/elements/_type-file.css +7 -10
  90. package/src/semantics/elements/_type-range.css +11 -14
  91. package/src/semantics/elements/_type-search.css +6 -10
  92. package/src/semantics/index.css +2 -5
  93. package/src/semantics/modules.css +1 -7
  94. package/src/sizes/pico.css +20 -33
  95. package/src/utilities/_grid.css +306 -0
  96. package/src/utilities/_variables.css +27 -42
  97. package/src/utilities/borders/_border-radius.css +54 -79
  98. package/src/utilities/borders/_border-style.css +15 -5
  99. package/src/utilities/borders/_border-width.css +0 -28
  100. package/src/utilities/colors/_bg-colors.css +75 -0
  101. package/src/utilities/colors/_border-colors.css +17 -39
  102. package/src/utilities/colors/_subtle-colors.css +145 -0
  103. package/src/utilities/colors/_text-bg-colors.css +62 -0
  104. package/src/utilities/colors/_text-colors.css +32 -409
  105. package/src/utilities/effects/_focus-ring.css +33 -0
  106. package/src/utilities/effects/_shadows.css +0 -33
  107. package/src/utilities/index.css +16 -0
  108. package/src/utilities/layout/_misc.css +2 -5
  109. package/src/utilities/layout/{_grid.css → _ratio.css} +0 -19
  110. package/src/utilities/modules.css +9 -3
  111. package/src/utilities/sizing/_width.css +8 -0
  112. package/src/utilities/spacing/_gap.css +144 -144
  113. package/src/utilities/spacing/_margin.css +324 -324
  114. package/src/utilities/spacing/_padding.css +324 -324
  115. package/src/utilities/typography/_font-sizes.css +6 -6
  116. package/src/variables/_all.css +2 -20
  117. package/src/variables/_elements.css +29 -28
  118. package/src/variables/_theme.css +336 -0
  119. package/src/variants/_variables.css +24 -0
  120. package/src/variants/intent/_contrast.css +46 -0
  121. package/src/variants/intent/_danger.css +38 -0
  122. package/src/variants/intent/_info.css +38 -0
  123. package/src/variants/intent/_primary.css +38 -0
  124. package/src/variants/intent/_secondary.css +38 -0
  125. package/src/variants/intent/_success.css +38 -0
  126. package/src/variants/intent/_warning.css +38 -0
  127. package/src/variants/{_container.css → modifiers/_container.css} +3 -10
  128. package/src/variants/modifiers/_ghost.css +164 -0
  129. package/src/variants/modifiers/_striped.css +11 -0
  130. package/src/variants/modifiers/_subtle.css +133 -0
  131. package/src/variants/modules.css +12 -14
  132. package/src/_normalize.css +0 -214
  133. package/src/semantics/_misc.css +0 -3
  134. package/src/utilities/colors/_background-colors.css +0 -248
  135. package/src/variables/_colors.css +0 -355
  136. package/src/variables/_components.css +0 -330
  137. package/src/variables/_icons.css +0 -55
  138. package/src/variables/_layout.css +0 -123
  139. package/src/variants/_contained.css +0 -43
  140. package/src/variants/_contrast.css +0 -61
  141. package/src/variants/_ghost.css +0 -68
  142. package/src/variants/_pane-panel-card.css +0 -54
  143. package/src/variants/_secondary.css +0 -48
  144. package/src/variants/_striped.css +0 -10
@@ -0,0 +1,38 @@
1
+ :where(a:not([role="button"])),
2
+ [role="link"] {
3
+ &.info {
4
+ --color-text: oklch(from var(--color-info-text) l c h / var(--color-text-opacity));
5
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
6
+
7
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
8
+ --color-text: oklch(from var(--color-info-text-hover) l c h / var(--color-text-opacity));
9
+ }
10
+ }
11
+ }
12
+
13
+ :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
+ &.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
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
+ --color-background: oklch(from var(--color-info-fill-hover) l c h / var(--color-background-opacity));
21
+ --border-color: oklch(from var(--color-info-fill-hover) l c h / var(--color-border-opacity));
22
+ --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
23
+ }
24
+
25
+ &:focus,
26
+ &:is([aria-current]:not([aria-current="false"])):focus {
27
+ --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-info-focus-ring);
28
+ }
29
+ }
30
+ }
31
+
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
+ --dialog-fill: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
36
+ --dialog-border: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
37
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
38
+ }
@@ -0,0 +1,38 @@
1
+ :where(a:not([role="button"])),
2
+ [role="link"] {
3
+ &.primary {
4
+ --color-text: oklch(from var(--color-primary-text) l c h / var(--color-text-opacity));
5
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
6
+
7
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
8
+ --color-text: oklch(from var(--color-primary-text-hover) l c h / var(--color-text-opacity));
9
+ }
10
+ }
11
+ }
12
+
13
+ :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
+ &.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
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
+ --color-background: oklch(from var(--color-primary-fill-hover) l c h / var(--color-background-opacity));
21
+ --border-color: oklch(from var(--color-primary-fill-hover) l c h / var(--color-border-opacity));
22
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
23
+ }
24
+
25
+ &:focus,
26
+ &:is([aria-current]:not([aria-current="false"])):focus {
27
+ --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-primary-focus-ring);
28
+ }
29
+ }
30
+ }
31
+
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
+ --dialog-fill: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
36
+ --dialog-border: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
37
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
38
+ }
@@ -0,0 +1,38 @@
1
+ :where(a:not([role="button"])),
2
+ [role="link"] {
3
+ &.secondary {
4
+ --color-text: oklch(from var(--color-secondary-text) l c h / var(--color-text-opacity));
5
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
6
+
7
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
8
+ --color-text: oklch(from var(--color-secondary-text-hover) l c h / var(--color-text-opacity));
9
+ }
10
+ }
11
+ }
12
+
13
+ :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
+ &.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
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
+ --color-background: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-background-opacity));
21
+ --border-color: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-border-opacity));
22
+ --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
23
+ }
24
+
25
+ &:focus,
26
+ &:is([aria-current]:not([aria-current="false"])):focus {
27
+ --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-secondary-focus-ring);
28
+ }
29
+ }
30
+ }
31
+
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
+ --dialog-fill: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
36
+ --dialog-border: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
37
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
38
+ }
@@ -0,0 +1,38 @@
1
+ :where(a:not([role="button"])),
2
+ [role="link"] {
3
+ &.success {
4
+ --color-text: oklch(from var(--color-success-text) l c h / var(--color-text-opacity));
5
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
6
+
7
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
8
+ --color-text: oklch(from var(--color-success-text-hover) l c h / var(--color-text-opacity));
9
+ }
10
+ }
11
+ }
12
+
13
+ :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
+ &.success {
15
+ --color-background: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
16
+ --border-color: oklch(from var(--color-success-fill) l c h / var(--color-border-opacity));
17
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
18
+
19
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
+ --color-background: oklch(from var(--color-success-fill-hover) l c h / var(--color-background-opacity));
21
+ --border-color: oklch(from var(--color-success-fill-hover) l c h / var(--color-border-opacity));
22
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
23
+ }
24
+
25
+ &:focus,
26
+ &:is([aria-current]:not([aria-current="false"])):focus {
27
+ --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-success-focus-ring);
28
+ }
29
+ }
30
+ }
31
+
32
+ :is(.card, .pane, .panel).success {
33
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
34
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ --dialog-fill: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
36
+ --dialog-border: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
37
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
38
+ }
@@ -0,0 +1,38 @@
1
+ :where(a:not([role="button"])),
2
+ [role="link"] {
3
+ &.warning {
4
+ --color-text: oklch(from var(--color-warning-text) l c h / var(--color-text-opacity));
5
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
6
+
7
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
8
+ --color-text: oklch(from var(--color-warning-text-hover) l c h / var(--color-text-opacity));
9
+ }
10
+ }
11
+ }
12
+
13
+ :is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
14
+ &.warning {
15
+ --color-background: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
16
+ --border-color: oklch(from var(--color-warning-fill) l c h / var(--color-border-opacity));
17
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
18
+
19
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
20
+ --color-background: oklch(from var(--color-warning-fill-hover) l c h / var(--color-background-opacity));
21
+ --border-color: oklch(from var(--color-warning-fill-hover) l c h / var(--color-border-opacity));
22
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
23
+ }
24
+
25
+ &:focus,
26
+ &:is([aria-current]:not([aria-current="false"])):focus {
27
+ --shadow: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-size) var(--color-warning-focus-ring);
28
+ }
29
+ }
30
+ }
31
+
32
+ :is(.card, .pane, .panel).warning {
33
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
34
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ --dialog-fill: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
36
+ --dialog-border: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
37
+ --dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
38
+ }
@@ -1,21 +1,14 @@
1
- /**
2
- * Container
3
- * Responsive width container with horizontal padding
4
- */
5
1
  .container,
6
2
  .container-fluid {
7
3
  width: 100%;
8
- margin-right: auto;
9
- margin-left: auto;
10
- padding-right: var(--spacing);
11
- padding-left: var(--spacing);
4
+ margin-inline: auto;
5
+ padding-inline: var(--spacing);
12
6
  }
13
7
 
14
8
  .container {
15
9
  @media (--breakpoint-sm) {
16
10
  max-width: 510px;
17
- padding-right: 0;
18
- padding-left: 0;
11
+ padding-inline: calc(var(--spacing) / 2);
19
12
  }
20
13
 
21
14
  @media (--breakpoint-md) {
@@ -0,0 +1,164 @@
1
+ .ghost {
2
+ --color-background: transparent;
3
+
4
+ background-color: var(--color-background) !important;
5
+ }
6
+
7
+ :is(.card, .pane, .panel, button, [type="submit"], [type="button"], [role="button"]) {
8
+ &.ghost {
9
+ &.primary {
10
+ --color-background: transparent;
11
+ --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
12
+ --color-text: oklch(from var(--color-primary-text) l c h / var(--color-text-opacity));
13
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
14
+ }
15
+
16
+ &.secondary {
17
+ --color-background: transparent;
18
+ --border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
19
+ --color-text: oklch(from var(--color-secondary-text) l c h / var(--color-text-opacity));
20
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
21
+ }
22
+
23
+ &.contrast {
24
+ --color-background: transparent;
25
+ --border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
26
+ --color-text: oklch(from var(--color-contrast-text) l c h / var(--color-text-opacity));
27
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
28
+ }
29
+
30
+ &.success {
31
+ --color-background: transparent;
32
+ --border-color: oklch(from var(--color-success-fill) l c h / var(--color-border-opacity));
33
+ --color-text: oklch(from var(--color-success-text) l c h / var(--color-text-opacity));
34
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
35
+ }
36
+
37
+ &.info {
38
+ --color-background: transparent;
39
+ --border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
40
+ --color-text: oklch(from var(--color-info-text) l c h / var(--color-text-opacity));
41
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
42
+ }
43
+
44
+ &.warning {
45
+ --color-background: transparent;
46
+ --border-color: oklch(from var(--color-warning-fill) l c h / var(--color-border-opacity));
47
+ --color-text: oklch(from var(--color-warning-text) l c h / var(--color-text-opacity));
48
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
49
+ }
50
+
51
+ &.danger {
52
+ --color-background: transparent;
53
+ --border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
54
+ --color-text: oklch(from var(--color-danger-text) l c h / var(--color-text-opacity));
55
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
56
+ }
57
+ }
58
+ }
59
+
60
+ :is(button, [type="submit"], [type="button"], [role="button"]) {
61
+ &.ghost {
62
+ --color-background: transparent;
63
+ --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
64
+ --color-text: oklch(from var(--color-primary-text) l c h / var(--color-text-opacity));
65
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
66
+
67
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
68
+ --color-background: oklch(from var(--color-primary-fill-hover) l c h / var(--color-background-opacity));
69
+ --border-color: oklch(from var(--color-primary-fill-hover) l c h / var(--color-border-opacity));
70
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
71
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
72
+ }
73
+
74
+ &.secondary {
75
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
76
+ --color-background: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-background-opacity));
77
+ --border-color: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-border-opacity));
78
+ --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
79
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
80
+ }
81
+ }
82
+
83
+ &.contrast {
84
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
85
+ --color-background: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-background-opacity));
86
+ --border-color: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-border-opacity));
87
+ --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
88
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
89
+ }
90
+ }
91
+
92
+ &.success {
93
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
94
+ --color-background: oklch(from var(--color-success-fill-hover) l c h / var(--color-background-opacity));
95
+ --border-color: oklch(from var(--color-success-fill-hover) l c h / var(--color-border-opacity));
96
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
97
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
98
+ }
99
+ }
100
+
101
+ &.info {
102
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
103
+ --color-background: oklch(from var(--color-info-fill-hover) l c h / var(--color-background-opacity));
104
+ --border-color: oklch(from var(--color-info-fill-hover) l c h / var(--color-border-opacity));
105
+ --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
106
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
107
+ }
108
+ }
109
+
110
+ &.warning {
111
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
112
+ --color-background: oklch(from var(--color-warning-fill-hover) l c h / var(--color-background-opacity));
113
+ --border-color: oklch(from var(--color-warning-fill-hover) l c h / var(--color-border-opacity));
114
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
115
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
116
+
117
+ details &::after {
118
+ filter: brightness(0);
119
+ }
120
+ }
121
+ }
122
+
123
+ &.danger {
124
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
125
+ --color-background: oklch(from var(--color-danger-fill-hover) l c h / var(--color-background-opacity));
126
+ --border-color: oklch(from var(--color-danger-fill-hover) l c h / var(--color-border-opacity));
127
+ --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
128
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
129
+ }
130
+ }
131
+ }
132
+ }
133
+
134
+ :is(.card, .pane, .panel).ghost {
135
+ > header,
136
+ > footer {
137
+ --dialog-section-fill: light-dark(
138
+ color-mix(in srgb, var(--color-slate-50) 25%, white),
139
+ color-mix(in srgb, var(--color-slate-50), transparent 95%)
140
+ );
141
+ --dialog-section-border: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-zinc-350)), transparent 90%);
142
+ }
143
+ }
144
+
145
+ /* Reset buttons */
146
+ [type="reset"].ghost {
147
+ --color-background: transparent;
148
+ --border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
149
+ --color-text: oklch(from var(--color-secondary-text) l c h / var(--color-text-opacity));
150
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
151
+
152
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
153
+ --color-background: oklch(from var(--color-primary-fill-hover) l c h / var(--color-background-opacity));
154
+ --border-color: oklch(from var(--color-primary-fill-hover) l c h / var(--color-border-opacity));
155
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
156
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
157
+ }
158
+ }
159
+
160
+ /* Accordion - ghost buttons have transparent backgrounds with colored text,
161
+ so the chevron should remain dark to match the text color */
162
+ details summary[role="button"].ghost::after {
163
+ filter: none;
164
+ }
@@ -0,0 +1,11 @@
1
+ :root,
2
+ :host {
3
+ --table-row-fill-striped: oklch(from var(--color-zinc-500) l c h / 0.0375);
4
+ }
5
+
6
+ table.striped tbody tr:nth-child(odd) {
7
+ & th,
8
+ & td {
9
+ background-color: var(--table-row-fill-striped);
10
+ }
11
+ }
@@ -0,0 +1,133 @@
1
+ .subtle {
2
+ --subtle-opacity: 60%;
3
+ }
4
+
5
+ :is(.card, .pane, .panel, button, [type="submit"], [type="button"], [role="button"]) {
6
+ &.subtle {
7
+ &.primary {
8
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
9
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
10
+ --color-background: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-background-opacity));
11
+ --border-color: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-border-opacity));
12
+ }
13
+
14
+ &.secondary {
15
+ --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
16
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
17
+ --color-background: oklch(from var(--color-secondary-subtle-fill) l c h / var(--color-background-opacity));
18
+ --border-color: oklch(from var(--color-secondary-subtle-fill) l c h / var(--color-border-opacity));
19
+ }
20
+
21
+ &.contrast {
22
+ --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
23
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
24
+ --color-background: oklch(from var(--color-contrast-subtle-fill) l c h / var(--color-background-opacity));
25
+ --border-color: oklch(from var(--color-contrast-subtle-fill) l c h / var(--color-border-opacity));
26
+ }
27
+
28
+ &.success {
29
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
30
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
31
+ --color-background: oklch(from var(--color-success-subtle-fill) l c h / var(--color-background-opacity));
32
+ --border-color: oklch(from var(--color-success-subtle-fill) l c h / var(--color-border-opacity));
33
+ }
34
+
35
+ &.info {
36
+ --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
37
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
38
+ --color-background: oklch(from var(--color-info-subtle-fill) l c h / var(--color-background-opacity));
39
+ --border-color: oklch(from var(--color-info-subtle-fill) l c h / var(--color-border-opacity));
40
+ }
41
+
42
+ &.warning {
43
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
44
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
45
+ --color-background: oklch(from var(--color-warning-subtle-fill) l c h / var(--color-background-opacity));
46
+ --border-color: oklch(from var(--color-warning-subtle-fill) l c h / var(--color-border-opacity));
47
+ }
48
+
49
+ &.danger {
50
+ --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
51
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
52
+ --color-background: oklch(from var(--color-danger-subtle-fill) l c h / var(--color-background-opacity));
53
+ --border-color: oklch(from var(--color-danger-subtle-fill) l c h / var(--color-border-opacity));
54
+ }
55
+ }
56
+ }
57
+
58
+ :is(button, [type="submit"], [type="button"], [role="button"]) {
59
+ &.subtle {
60
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
61
+ --color-background: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-background-opacity));
62
+ --border-color: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-border-opacity));
63
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
64
+
65
+ &:is(.primary, [aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
66
+ --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
67
+ --color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
68
+ --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
69
+ }
70
+
71
+ &.secondary {
72
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
73
+ --color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
74
+ --color-background: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
75
+ --border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
76
+ }
77
+ }
78
+
79
+ &.contrast {
80
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
81
+ --color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
82
+ --color-background: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
83
+ --border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
84
+ }
85
+ }
86
+
87
+ &.success {
88
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
89
+ --color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
90
+ --color-background: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
91
+ --border-color: oklch(from var(--color-success-fill) l c h / var(--color-border-opacity));
92
+ }
93
+ }
94
+
95
+ &.info {
96
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
97
+ --color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
98
+ --color-background: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
99
+ --border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
100
+ }
101
+ }
102
+
103
+ &.warning {
104
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
105
+ --color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
106
+ --color-background: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
107
+ --border-color: oklch(from var(--color-warning-fill) l c h / var(--color-border-opacity));
108
+ }
109
+ }
110
+
111
+ &.danger {
112
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
113
+ --color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
114
+ --color-background: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
115
+ --border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ /* Reset buttons */
122
+ [type="reset"].subtle {
123
+ --color-text: var(--color-secondary-on-fill);
124
+ --color-background: var(--color-secondary-subtle-fill);
125
+ --border-color: var(--color-secondary-subtle-fill);
126
+ --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
127
+
128
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
129
+ --color-text: var(--color-secondary-on-fill);
130
+ --color-background: var(--color-secondary-fill);
131
+ --border-color: var(--color-secondary-fill);
132
+ }
133
+ }
@@ -1,16 +1,14 @@
1
- /**
2
- * Semanticus CSS Variants
3
- * Class-based variant styles that extend semantic elements
4
- * Used by the full version which imports global variables, normalize, and semantics separately
5
- */
1
+ @import "./_variables.css";
6
2
 
7
- @import "./_contained.css";
8
- @import "./_container.css";
9
- @import "./_contrast.css";
10
- @import "./_pane-panel-card.css";
11
- @import "./_secondary.css";
12
- @import "./_sidebar.css";
13
- @import "./_striped.css";
3
+ @import "./intent/_contrast.css";
4
+ @import "./intent/_danger.css";
5
+ @import "./intent/_info.css";
6
+ @import "./intent/_primary.css";
7
+ @import "./intent/_secondary.css";
8
+ @import "./intent/_success.css";
9
+ @import "./intent/_warning.css";
14
10
 
15
- /* Needs to be imported after other variants to override colors */
16
- @import "./_ghost.css";
11
+ @import "./modifiers/_container.css";
12
+ @import "./modifiers/_ghost.css";
13
+ @import "./modifiers/_striped.css";
14
+ @import "./modifiers/_subtle.css";