@splendidlabz/styles 4.3.1 → 4.4.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": "@splendidlabz/styles",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "Zell Liew <zellwk@gmail.com>",
@@ -16,7 +16,6 @@
16
16
  column-gap: inherit;
17
17
 
18
18
  /* Positions the Emoji */
19
-
20
19
  /* This is kind of brute-forced at the moment. */
21
20
  :where(.emoji),
22
21
  > :where(astro-slot, astro-island) > :where(.emoji) {
@@ -54,14 +54,14 @@
54
54
 
55
55
  > :where(:first-child) {
56
56
  border-radius: 0;
57
- border-top-left-radius: var(--radius);
58
- border-bottom-left-radius: var(--radius);
57
+ border-top-left-radius: calc(var(--radius) - var(--border-width));
58
+ border-bottom-left-radius: calc(var(--radius) - var(--border-width));
59
59
  }
60
60
 
61
61
  > :where(:last-child) {
62
62
  border-radius: 0;
63
- border-top-right-radius: var(--radius);
64
- border-bottom-right-radius: var(--radius);
63
+ border-top-right-radius: calc(var(--radius) - var(--border-width));
64
+ border-bottom-right-radius: calc(var(--radius) - var(--border-width));
65
65
  }
66
66
  }
67
67
 
@@ -79,14 +79,14 @@
79
79
  border-style: var(--border-style);
80
80
  }
81
81
 
82
- > :first-child {
83
- border-top-left-radius: var(--radius);
84
- border-top-right-radius: var(--radius);
82
+ > :where(:first-child) {
83
+ border-top-left-radius: calc(var(--radius) - var(--border-width));
84
+ border-top-right-radius: calc(var(--radius) - var(--border-width));
85
85
  }
86
86
 
87
- > :last-child {
88
- border-bottom-left-radius: var(--radius);
89
- border-bottom-right-radius: var(--radius);
87
+ > :where(:last-child) {
88
+ border-bottom-left-radius: calc(var(--radius) - var(--border-width));
89
+ border-bottom-right-radius: calc(var(--radius) - var(--border-width));
90
90
  }
91
91
  }
92
92
 
@@ -62,15 +62,20 @@
62
62
  text-decoration: underline;
63
63
  }
64
64
 
65
- > img,
66
- figure img {
65
+ :where(> img),
66
+ :where(> figure img) {
67
67
  border: 1px solid oklch(90% 0 0deg);
68
68
  border-radius: var(--radius);
69
69
  }
70
70
 
71
- &.fancylist,
72
- & .fancylist {
71
+ :where(.fancylist) {
72
+ margin-left: 1em;
73
73
  padding-left: 0;
74
74
  }
75
75
  }
76
76
  }
77
+
78
+ @utility prose-tight {
79
+ @apply prose;
80
+ gap: 1em;
81
+ }
@@ -4,7 +4,7 @@
4
4
  * {
5
5
  fill: var(--fill-color);
6
6
  stroke: var(--stroke-color); /* Fallback to text color */
7
- stroke-width: var(--stroke-width);
7
+ stroke-width: var(--stroke-width, revert-layer);
8
8
  }
9
9
  }
10
10
 
@@ -4,10 +4,7 @@
4
4
  @utility table-scaffold {
5
5
  & {
6
6
  width: 100%;
7
-
8
- /* font: inherit; Not sure if needed? */
9
- font-variant-numeric: lining-nums tabular-nums slashed-zero
10
- diagonal-fractions;
7
+ font-variant-numeric: lining-nums tabular-nums slashed-zero;
11
8
  }
12
9
  }
13
10
 
@@ -111,7 +108,7 @@ table {
111
108
  }
112
109
 
113
110
  &:not(:has(thead)) tr {
114
- tr:nth-child(2n + 3) {
111
+ &:nth-child(2n + 3) {
115
112
  background-color: var(--alt-row-color);
116
113
  }
117
114
  }
@@ -122,7 +119,6 @@ table {
122
119
  }
123
120
 
124
121
  /* Row Headers */
125
-
126
122
  /* Not adding border-right because it's a bit too much if table-layout is auto */
127
123
  th:where([scope='group'], [scope='row']) {
128
124
  @apply table-header-column;
@@ -16,7 +16,8 @@ Variables:
16
16
 
17
17
  :where(.callout-header) {
18
18
  padding-block: 0.375rem;
19
- border-bottom: 1px solid var(--divider-color, var(--border-color));
19
+ border-bottom: var(--border-width) solid
20
+ var(--divider-color, var(--border-color));
20
21
  border-top-left-radius: inherit;
21
22
  border-top-right-radius: inherit;
22
23
  color: var(--text-callout-header, var(--text-color));
@@ -1,7 +1,6 @@
1
1
  @utility status {
2
2
  & {
3
3
  @apply border-scaffold;
4
- margin-top: 1rem;
5
4
  padding: 1rem;
6
5
  color: var(--text-color);
7
6
  background-color: var(--bg-color);
@@ -7,7 +7,6 @@
7
7
  @apply transition-scaffold-extended;
8
8
  position: relative;
9
9
  backdrop-filter: blur(var(--blur, 16px));
10
- border: inherit;
11
10
  }
12
11
  }
13
12
 
@@ -13,22 +13,27 @@
13
13
 
14
14
  @utility scrollbars-on {
15
15
  @layer base {
16
- :root {
16
+ & {
17
17
  @media (prefers-color-scheme: light) {
18
- --scrollbar-thumb-color: var(--scrollbar-thumb-color-light);
19
- --scrollbar-track-color: var(--scrollbar-track-color-light);
18
+ --_thumb-fallback-color: var(--scrollbar-thumb-color-light);
19
+ --_track-fallback-color: var(--scrollbar-track-color-light);
20
20
  }
21
21
 
22
22
  @media (prefers-color-scheme: dark) {
23
- --scrollbar-thumb-color: var(--scrollbar-thumb-color-dark);
24
- --scrollbar-track-color: var(--scrollbar-track-color-dark);
23
+ --_thumb-fallback-color: var(--scrollbar-thumb-color-dark);
24
+ --_track-fallback-color: var(--scrollbar-track-color-dark);
25
25
  }
26
26
  }
27
27
 
28
+ &,
28
29
  * {
29
30
  scroll-behavior: var(--scroll-behavior);
30
31
  scrollbar-width: var(--scrollbar-width);
31
- scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
32
+ scrollbar-color: var(
33
+ --scrollbar-thumb-color,
34
+ var(--_thumb-fallback-color)
35
+ )
36
+ var(--scrollbar-track-color, var(--_track-fallback-color));
32
37
 
33
38
  /* Works on Chrome, Edge, and Safari */
34
39
  &::-webkit-scrollbar {
@@ -49,6 +49,7 @@
49
49
  }
50
50
 
51
51
  a:where(:not(.button)) {
52
+ @apply pigment-without-border;
52
53
  --bg-color: transparent;
53
54
  --border-color: transparent;
54
55
  }
@@ -54,7 +54,7 @@
54
54
  }
55
55
  }
56
56
 
57
- /* This is for honeypot */
57
+ /* Honeypot */
58
58
  .form-field-helper {
59
59
  display: none !important;
60
60
  }
@@ -67,12 +67,12 @@
67
67
  @apply grid-scaffold;
68
68
  grid-template-columns:
69
69
  repeat(calc(var(--cols) - 1), minmax(0, 1fr))
70
- minmax(0, auto);
70
+ minmax(0, var(--sbw, auto));
71
71
  }
72
72
 
73
73
  @utility grid-auto-fr {
74
74
  @apply grid-scaffold;
75
- grid-template-columns: minmax(0, auto) repeat(
75
+ grid-template-columns: minmax(0, var(--sbw, auto)) repeat(
76
76
  calc(var(--cols) - 1),
77
77
  minmax(0, 1fr)
78
78
  );
@@ -74,17 +74,17 @@
74
74
  * Functional Utilities *
75
75
  *********************/
76
76
  @utility nudge-* {
77
- --nudge: --value([length]);
77
+ --nudge: --value([*]);
78
78
  --nudge: calc(var(--spacing) * --value(integer));
79
79
  }
80
80
 
81
81
  @utility nudge-x-* {
82
- --nudge-x: --value([length]);
82
+ --nudge-x: --value([*]);
83
83
  --nudge-x: calc(var(--spacing) * --value(integer));
84
84
  }
85
85
 
86
86
  @utility nudge-y-* {
87
- --nudge-y: --value([length]);
87
+ --nudge-y: --value([*]);
88
88
  --nudge-y: calc(var(--spacing) * --value(integer));
89
89
  }
90
90
 
@@ -31,7 +31,6 @@ Usage with the Fill System
31
31
  *********************/
32
32
  @utility pigment-scaffold {
33
33
  & {
34
- @apply border-scaffold;
35
34
  @apply transition-scaffold;
36
35
  --_bgc: var(--bg-color);
37
36
  --_tc: var(--text-color, currentcolor);
@@ -132,7 +131,16 @@ Usage with the Fill System
132
131
  * Actual pigment utility *
133
132
  *********************/
134
133
 
134
+ @utility pigment-without-border {
135
+ @apply pigment-scaffold;
136
+ @apply pigment-hover-scaffold;
137
+ @apply pigment-focus-scaffold;
138
+ @apply pigment-active-scaffold;
139
+ @apply pigment-selected-scaffold;
140
+ }
141
+
135
142
  @utility pigment {
143
+ @apply border-scaffold;
136
144
  @apply pigment-scaffold;
137
145
  @apply pigment-hover-scaffold;
138
146
  @apply pigment-focus-scaffold;
@@ -149,6 +157,7 @@ Usage with the Fill System
149
157
  }
150
158
 
151
159
  @utility pigment-with-svg {
160
+ @apply border-scaffold;
152
161
  @apply pigment-scaffold;
153
162
  @apply pigment-svg-scaffold;
154
163
  @apply pigment-hover-scaffold;
@@ -13,7 +13,7 @@
13
13
  var(--transition-easing);
14
14
  --transition-props:
15
15
  background, border, color, display, fill, opacity, outline, stroke,
16
- transform;
16
+ transform, translate, scale, rotate, skew, perspective;
17
17
  transition: var(--transition-values);
18
18
  transition-property: var(--transition-props);
19
19
  }
@@ -24,8 +24,8 @@
24
24
  @apply transition-scaffold;
25
25
  --transition-props:
26
26
  backdrop-filter, background, border, color, display, fill, filter, gap,
27
- opacity, outline, overlay, stroke, transform;
28
- transition-behavior: allow-discrete;
27
+ opacity, outline, overlay, stroke, transform, translate, scale, rotate,
28
+ skew, perspective;
29
29
  }
30
30
  }
31
31
 
package/src/type/font.css CHANGED
@@ -4,15 +4,19 @@
4
4
  inherits: true;
5
5
  }
6
6
 
7
- /*
8
- @property --font-opsz {
7
+ @property --font-slant {
9
8
  syntax: '<integer> | auto';
10
- initial-value: 25;
9
+ initial-value: 0;
11
10
  inherits: true;
12
11
  }
13
12
 
14
- @property --font-width {
13
+ @property --font-opsz {
15
14
  syntax: '<integer> | auto';
16
- initial-value: 100;
15
+ initial-value: 25;
17
16
  inherits: true;
18
- } */
17
+ }
18
+
19
+ @utility font-weight-* {
20
+ --font-weight: --value([integer]);
21
+ font-weight: var(--font-weight);
22
+ }
@@ -1,3 +1,4 @@
1
1
  @import './font-position.css';
2
2
  @import './text-relative.css';
3
3
  @import './text-edge.css';
4
+ @import './font.css';
@@ -27,7 +27,6 @@
27
27
  --text-21: 6.75rem; /* 108px */
28
28
  --text-22: 7.5rem; /* 120px */
29
29
 
30
-
31
30
  /* EM Values */
32
31
  --text-1e: 0.625em; /* 10px */
33
32
  --text-2e: 0.6875em; /* 11px */
@@ -2,7 +2,9 @@
2
2
  *********************/
3
3
  @theme {
4
4
  --radius-0.5: calc(var(--spacing) * 0.5);
5
+ --radius-0.75r: calc(var(--radius) * 0.75);
5
6
  --radius-1: calc(var(--spacing) * 1);
7
+ --radius-1.25: calc(var(--spacing) * 1.25);
6
8
  --radius-1.5: calc(var(--spacing) * 1.5);
7
9
  --radius-2: calc(var(--spacing) * 2);
8
10
  --radius-2.5: calc(var(--spacing) * 2.5);