@splendidlabz/styles 4.3.0 → 4.3.1

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.1",
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",
@@ -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),
@@ -52,9 +52,9 @@
52
52
  padding-inline-end: var(--cell-padding-x, 0.5rlh);
53
53
  text-align: left;
54
54
 
55
- &:last-child {
55
+ /* &:last-child {
56
56
  padding-inline-end: 0;
57
- }
57
+ } */
58
58
  }
59
59
  }
60
60
 
@@ -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 {
@@ -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,18 @@
1
+ @property --font-weight {
2
+ syntax: '<integer> | auto';
3
+ initial-value: 400;
4
+ inherits: true;
5
+ }
6
+
7
+ /*
8
+ @property --font-opsz {
9
+ syntax: '<integer> | auto';
10
+ initial-value: 25;
11
+ inherits: true;
12
+ }
13
+
14
+ @property --font-width {
15
+ syntax: '<integer> | auto';
16
+ initial-value: 100;
17
+ inherits: true;
18
+ } */