@semanticus/semanticus-css 1.1.0 → 1.2.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.
@@ -1,10 +1,10 @@
1
1
  .ghost {
2
2
  --color-background: transparent;
3
3
 
4
- background-color: var(--color-background) !important;
4
+ background-color: var(--color-background);
5
5
  }
6
6
 
7
- :is(.card, .pane, [role="status"], [role="alert"], button, [type="submit"], [type="button"], [role="button"]) {
7
+ :not([role="link"], a:not([role="button"])) {
8
8
  &.ghost {
9
9
  &.primary {
10
10
  --color-background: transparent;
@@ -1,11 +1,11 @@
1
- :root,
2
- :host {
3
- --table-row-fill-striped: oklch(from var(--color-zinc-500) l c h / 0.0375);
4
- }
1
+ .striped {
2
+ > :not(table):nth-child(odd) {
3
+ background-color: color-mix(in srgb, var(--color-background), var(--color-hover-effect) 15%);
4
+ }
5
5
 
6
- table.striped tbody tr:nth-child(odd) {
7
- & th,
8
- & td {
9
- background-color: var(--table-row-fill-striped);
6
+ > tbody > tr:nth-child(odd) {
7
+ &:is(th, td) {
8
+ background-color: color-mix(in srgb, var(--color-background), var(--color-hover-effect) 15%);
9
+ }
10
10
  }
11
11
  }
@@ -2,7 +2,7 @@
2
2
  --subtle-opacity: 60%;
3
3
  }
4
4
 
5
- :is(.card, .pane, [role="status"], [role="alert"], button, [type="submit"], [type="button"], [role="button"]) {
5
+ :not([role="link"], a:not([role="button"])) {
6
6
  &.subtle {
7
7
  &.primary {
8
8
  --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
@@ -62,7 +62,7 @@
62
62
  --border-color: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-border-opacity));
63
63
  --color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
64
64
 
65
- &:is(.primary, [aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
65
+ &:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
66
66
  --color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
67
67
  --color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
68
68
  --border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
@@ -1,19 +0,0 @@
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,137 +0,0 @@
1
- [role="search"],
2
- [role="group"] {
3
- border-radius: var(--radius);
4
- box-shadow: var(--group-shadow, 0 0 0 rgba(0, 0, 0, 0));
5
- display: inline-flex;
6
- gap: 0;
7
- margin-bottom: var(--spacing);
8
- position: relative;
9
- transition: box-shadow var(--transition);
10
- vertical-align: middle;
11
- width: 100%;
12
-
13
- & > *:not(details),
14
- & input:not([type="checkbox"], [type="radio"]),
15
- & select {
16
- position: relative;
17
- flex: 1 1 auto;
18
- margin-bottom: 0;
19
-
20
- &:not(:first-child) {
21
- margin-left: calc(var(--border-size) * -1);
22
- border-top-left-radius: 0;
23
- border-bottom-left-radius: 0;
24
- }
25
-
26
- &:not(:last-child) {
27
- border-top-right-radius: 0;
28
- border-bottom-right-radius: 0;
29
- }
30
-
31
- &:focus {
32
- z-index: 2;
33
- }
34
- }
35
-
36
- & button,
37
- & [type="submit"],
38
- & [type="reset"],
39
- & [type="button"],
40
- & [role="button"] {
41
- width: auto;
42
- }
43
-
44
- /* Details dropdown inside group */
45
- & > details {
46
- position: relative;
47
- margin-bottom: 0;
48
- /* Constrain details height to just the button, not the dropdown menu */
49
- height: calc(
50
- 1rem * var(--line-height) + var(--input-spacing-vertical) *
51
- 2 + var(--border-size) * 2
52
- );
53
- overflow: visible;
54
-
55
- &:not(:first-child) {
56
- margin-left: calc(var(--border-size) * -1);
57
-
58
- & > summary {
59
- border-top-left-radius: 0;
60
- border-bottom-left-radius: 0;
61
- }
62
- }
63
-
64
- &:not(:last-child) > summary {
65
- border-top-right-radius: 0;
66
- border-bottom-right-radius: 0;
67
- }
68
-
69
- & > summary:focus {
70
- z-index: 2;
71
- }
72
-
73
- /* Ensure consistent height with other form elements in the group */
74
- & > summary[role="button"] {
75
- display: flex;
76
- align-items: center;
77
- height: 100%;
78
-
79
- &::after {
80
- height: calc(1rem * var(--line-height, 1.5));
81
- }
82
- }
83
- }
84
- }
85
-
86
- @supports selector(:has(*)) {
87
- [role="search"],
88
- [role="group"] {
89
- &:has(
90
- button:focus,
91
- [type="submit"]:focus,
92
- [type="button"]:focus,
93
- [role="button"]:focus
94
- ) {
95
- --group-shadow: var(--group-shadow-focus-button);
96
-
97
- & input:not([type="checkbox"], [type="radio"]),
98
- & select {
99
- border-color: transparent;
100
- }
101
- }
102
-
103
- &:has(input:not([type="submit"], [type="button"]):focus, select:focus) {
104
- --group-shadow: var(--group-shadow-focus-input);
105
-
106
- & button,
107
- & [type="submit"],
108
- & [type="button"],
109
- & [role="button"] {
110
- --button-shadow: 0 0 0 var(--border-size)
111
- var(--color-primary-fill);
112
- --button-shadow-hover: 0 0 0 var(--border-size)
113
- var(--color-primary-fill-hover);
114
- }
115
- }
116
-
117
- & button:focus,
118
- & [type="submit"]:focus,
119
- & [type="reset"]:focus,
120
- & [type="button"]:focus,
121
- & [role="button"]:focus {
122
- box-shadow: none;
123
- }
124
- }
125
- }
126
-
127
- [role="search"] {
128
- & > :first-child {
129
- border-top-left-radius: 5rem;
130
- border-bottom-left-radius: 5rem;
131
- }
132
-
133
- & > :last-child {
134
- border-top-right-radius: 5rem;
135
- border-bottom-right-radius: 5rem;
136
- }
137
- }