@splendidlabz/styles 4.3.0 → 4.3.2

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.0",
3
+ "version": "4.3.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "Zell Liew <zellwk@gmail.com>",
@@ -12,7 +12,8 @@
12
12
  ".": "./src/styles.css",
13
13
  "./components": "./src/components/index.css",
14
14
  "./layouts/no-tw": "./dist/no-tw/styles.css",
15
- "./scripts": "./scripts/index.js"
15
+ "./scripts": "./scripts/index.js",
16
+ "./scripts/*": "./scripts/*.js"
16
17
  },
17
18
  "scripts": {
18
19
  "lint": "stylelint '**/*.{css,scss}' --fix",
@@ -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) {
@@ -24,8 +24,6 @@
24
24
  @apply padding-scaffold;
25
25
  --fallback-padding: 1rlh;
26
26
 
27
- /* @apply inner-radius; */
28
-
29
27
  /* Raise for nicer focus ring */
30
28
  &:focus-visible {
31
29
  z-index: 2;
@@ -4,21 +4,21 @@
4
4
  max-width: 100%;
5
5
 
6
6
  > * + * {
7
- margin-block: 1lh;
7
+ margin-top: calc(var(--spacing) * 4);
8
8
  }
9
9
 
10
10
  /* Using padding instead of margin, so #targets will leave some whitespace above when scrolling to the component. (We can also use scroll-margin-top + margin-top... but this is simpler). */
11
11
  > * + :where(h2),
12
12
  > * + :where(astro-island, astro-slot) > :where(h2):first-child {
13
- margin-top: calc(var(--spacing) * 6);
14
- scroll-margin-top: calc(var(--spacing) * 6);
13
+ margin-top: var(--h2-margin-top, calc(var(--spacing) * 6));
14
+ scroll-margin-top: var(--h2-margin-top, calc(var(--spacing) * 6));
15
15
  }
16
16
 
17
17
  > * + :where(h3),
18
18
  > * + :where(astro-island, astro-slot) > :where(h3):first-child {
19
- margin-top: calc(var(--spacing) * 4);
20
- margin-bottom: calc(var(--spacing) * -2);
21
- scroll-margin-top: calc(var(--spacing) * 4);
19
+ margin-top: var(--h3-margin-top, calc(var(--spacing) * 4));
20
+ margin-bottom: var(--h3-margin-bottom, calc(var(--spacing) * -2));
21
+ scroll-margin-top: var(--h3-margin-top, calc(var(--spacing) * 4));
22
22
  }
23
23
 
24
24
  > * + :where(h4, h5, h6),
@@ -62,14 +62,14 @@
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
  }
@@ -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
 
@@ -52,9 +49,9 @@
52
49
  padding-inline-end: var(--cell-padding-x, 0.5rlh);
53
50
  text-align: left;
54
51
 
55
- &:last-child {
52
+ /* &:last-child {
56
53
  padding-inline-end: 0;
57
- }
54
+ } */
58
55
  }
59
56
  }
60
57
 
@@ -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;
@@ -7,6 +7,7 @@
7
7
 
8
8
  /* // Note to self: */
9
9
  /* // Need to create another Class to contain default z-index for Absolute Drawers — so this doesn't show above it. */
10
+
10
11
  @utility drawer-content {
11
12
  overflow-y: auto;
12
13
  z-index: 100;
@@ -2,7 +2,7 @@
2
2
  /* Prevent scroll when modal is open */
3
3
  html:has(.modal-content) {
4
4
  @apply transition-scaffold;
5
- --transition-props: overflow;
5
+ transition-property: overflow;
6
6
  transition-duration: 300ms;
7
7
  }
8
8
 
@@ -20,11 +20,7 @@
20
20
 
21
21
  /* Base/Closing Style */
22
22
  .modal-content {
23
- /* @apply border-scaffold; */
24
23
  margin: auto;
25
- padding: 1lh;
26
- color: var(--text-color);
27
- background: var(--bg-color, white);
28
24
  }
29
25
 
30
26
  .modal-content::backdrop {
@@ -34,17 +30,16 @@
34
30
  .modal-content,
35
31
  .modal-content::backdrop {
36
32
  @apply transition-scaffold-extended;
37
- --transition-duration: 300ms;
38
- --transition-easing: ease-in;
39
33
  opacity: 0;
40
- transition-property: var(--transition-props);
34
+ transition-duration: 300ms;
35
+ transition-timing-function: ease-in;
41
36
  }
42
37
 
43
38
  /* Opened Style */
44
39
  .modal-content[open],
45
40
  .modal-content[open]::backdrop {
46
- --transition-easing: ease-out;
47
41
  opacity: 1;
42
+ transition-timing-function: ease-out;
48
43
  }
49
44
 
50
45
  .modal-content[open]::backdrop {
@@ -2,14 +2,13 @@
2
2
  [popover] {
3
3
  @apply border-scaffold;
4
4
  @apply transition-scaffold-extended;
5
- --transition-duration: 300ms;
6
- --transition-easing: ease-out;
7
5
  position: absolute;
8
6
  max-width: 100%;
9
- padding: 1rem;
10
7
  color: var(--text-color);
11
8
  background: var(--bg-color, white);
12
9
  opacity: 0;
10
+ transition-duration: 300ms;
11
+ transition-timing-function: ease-out;
13
12
  }
14
13
 
15
14
  [popover]:not(:popover-open) {
@@ -17,8 +16,8 @@
17
16
  }
18
17
 
19
18
  [popover]:popover-open {
20
- --transition-easing: ease-in;
21
19
  opacity: 1;
20
+ transition-timing-function: ease-in;
22
21
  }
23
22
 
24
23
  @starting-style {
@@ -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
 
@@ -19,7 +19,6 @@
19
19
  }
20
20
 
21
21
  /* These don't work in Tailwind 4 and we need to adjust them */
22
-
23
22
  @utility tw-gradient {
24
23
  --tw-gradient:
25
24
  var(--tw-gradient-from) var(--tw-gradient-from-position),
@@ -116,3 +115,18 @@
116
115
  );
117
116
  }
118
117
  }
118
+
119
+ /*********************
120
+ * Functional Utiliites for Gradients *
121
+ *********************/
122
+ @utility gradient-angle-* {
123
+ --gradient-angle: --value([angle]);
124
+ }
125
+
126
+ /* @utility gradient-position-* {
127
+ --gradient-position: --value([position]);
128
+ }
129
+
130
+ @utility gradient-shape-* {
131
+ --gradient-shape: --value([shape]);
132
+ } */
@@ -17,7 +17,8 @@
17
17
  flex-wrap: nowrap;
18
18
  gap: var(--gap-y, var(--gap)) var(--gap-x, var(--gap));
19
19
 
20
- > .spacer {
20
+ > .spacer,
21
+ > :where(.contents) > .spacer {
21
22
  margin-inline-start: auto;
22
23
  }
23
24
  }
@@ -1,9 +1,6 @@
1
- /* Temp rework. Have to really figure this one out first... */
1
+ /* Object doesn't work correctly in Safari unless height is given. https://stackoverflow.com/questions/60192601/object-fit-cover-not-working-correctly-on-safari */
2
2
  @utility object-background {
3
- /* position: absolute;
4
- inset: 0;
5
- z-index: -1;
6
3
  width: 100%;
7
- height: 100%; */
4
+ height: 100%;
8
5
  object-fit: cover;
9
6
  }
@@ -1,3 +1,9 @@
1
+ /* @property --transition-props {
2
+ syntax: '<string>';
3
+ inherits: false;
4
+ initial-value: '';
5
+ } */
6
+
1
7
  /*********************
2
8
  * Default transition properties and values *
3
9
  *********************/
@@ -0,0 +1,22 @@
1
+ @property --font-weight {
2
+ syntax: '<integer> | auto';
3
+ initial-value: 400;
4
+ inherits: true;
5
+ }
6
+
7
+ @property --font-slant {
8
+ syntax: '<integer> | auto';
9
+ initial-value: 0;
10
+ inherits: true;
11
+ }
12
+
13
+ @property --font-opsz {
14
+ syntax: '<integer> | auto';
15
+ initial-value: 25;
16
+ inherits: true;
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';