@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 +3 -2
- package/src/components/css/card.css +0 -2
- package/src/components/css/prose-div.css +6 -6
- package/src/components/css/table.css +2 -2
- package/src/components/svelte/drawer.css +1 -0
- package/src/components/svelte/modal.css +4 -9
- package/src/components/svelte/popover.css +3 -4
- package/src/effects/gradients.css +15 -1
- package/src/layouts/micro/micro.css +2 -1
- package/src/tools/object.css +2 -5
- package/src/tools/transitions.css +6 -0
- package/src/type/font.css +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splendidlabz/styles",
|
|
3
|
-
"version": "4.3.
|
|
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",
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
|
|
6
6
|
> * + * {
|
|
7
|
-
margin-
|
|
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),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* Prevent scroll when modal is open */
|
|
3
3
|
html:has(.modal-content) {
|
|
4
4
|
@apply transition-scaffold;
|
|
5
|
-
|
|
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-
|
|
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
|
+
} */
|
package/src/tools/object.css
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
/*
|
|
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
|
}
|
|
@@ -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
|
+
} */
|