@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 +3 -2
- package/src/components/astro/fancylist.css +0 -1
- package/src/components/css/card.css +0 -2
- package/src/components/css/prose-div.css +6 -6
- package/src/components/css/prose.css +4 -4
- package/src/components/css/table.css +4 -8
- 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/frosted-glass.css +0 -1
- 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 +22 -0
- package/src/type/index.css +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splendidlabz/styles",
|
|
3
|
-
"version": "4.3.
|
|
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",
|
|
@@ -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),
|
|
@@ -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
|
-
|
|
72
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -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,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
|
+
}
|
package/src/type/index.css
CHANGED