@splendidlabz/styles 4.0.1 → 4.1.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 +3 -3
- package/src/components/astro/fancylist.css +12 -6
- package/src/components/css/card.css +78 -37
- package/src/components/css/hero-heading.css +2 -1
- package/src/components/css/prose.css +8 -5
- package/src/components/svelte/accordion.css +18 -1
- package/src/components/svelte/modal.css +1 -1
- package/src/components/svelte/popover.css +1 -1
- package/src/effects/{fancy-box.css → fancybox.css} +3 -4
- package/src/effects/index.css +1 -1
- package/src/form/input.css +1 -0
- package/src/generic/anchors-and-buttons.css +4 -0
- package/src/layouts/macro/grid.css +7 -2
- package/src/layouts/micro/divider.css +4 -3
- package/src/layouts/micro/index.css +1 -0
- package/src/layouts/micro/inner-spacing.css +39 -0
- package/src/layouts/micro/micro.css +2 -0
- package/src/layouts/position/edge.css +64 -34
- package/src/tools/index.css +1 -1
- package/src/tools/pigment.css +56 -72
- package/src/tools/scaffolds.css +119 -0
- package/src/tools/transitions.css +18 -2
- package/src/type/index.css +1 -0
- package/src/type/text-relative.css +53 -0
- package/src/variables/font.css +29 -0
- package/src/variables/radius.css +40 -40
- package/src/variables/variables.css +0 -2
- package/dist/no-tw/layouts.css +0 -1278
- package/dist/no-tw/styles.css +0 -2018
- package/dist/styles.css +0 -1383
- package/src/tools/border.css +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splendidlabz/styles",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Zell Liew <zellwk@gmail.com>",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"build": "npm run build-styles & npm run build-layouts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@splendidlabz/utils": "1.
|
|
26
|
+
"@splendidlabz/utils": "1.6.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@splendidlabz/stylelint-config": "3.0
|
|
29
|
+
"@splendidlabz/stylelint-config": "3.1.0",
|
|
30
30
|
"@tailwindcss/cli": "^4.1.3",
|
|
31
31
|
"lightningcss-cli": "^1.29.3",
|
|
32
32
|
"tailwindcss": "^4.1.3",
|
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
--svg-width: 1em;
|
|
4
4
|
--svg-height: 1lh;
|
|
5
5
|
display: grid;
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
/* grid-template-columns: auto 1fr; */
|
|
7
8
|
column-gap: 0.5em;
|
|
8
9
|
|
|
9
10
|
:where(li) {
|
|
10
11
|
grid-column: 1 / -1;
|
|
11
12
|
display: grid;
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
/* grid-template-columns: subgrid; */
|
|
15
|
+
grid-template-columns: auto 1fr;
|
|
16
|
+
column-gap: inherit;
|
|
13
17
|
|
|
14
18
|
/* Positions the Emoji */
|
|
15
19
|
|
|
@@ -19,10 +23,12 @@
|
|
|
19
23
|
font-size: 0.75em;
|
|
20
24
|
line-height: 1lh;
|
|
21
25
|
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
:where(ul) {
|
|
28
|
+
grid-column: 2;
|
|
29
|
+
display: grid;
|
|
30
|
+
column-gap: inherit;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
}
|
|
@@ -1,56 +1,97 @@
|
|
|
1
|
+
@utility box {
|
|
2
|
+
@apply card;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
@utility card {
|
|
2
6
|
& {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
border-radius: var(--radius);
|
|
7
|
+
@apply border-scaffold;
|
|
8
|
+
@apply padding-scaffold;
|
|
6
9
|
}
|
|
7
10
|
}
|
|
8
11
|
|
|
9
|
-
@utility card-
|
|
12
|
+
@utility card-divided {
|
|
10
13
|
& {
|
|
11
|
-
@apply
|
|
14
|
+
@apply border-scaffold;
|
|
15
|
+
position: relative;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
padding: var(--padding, 1rlh);
|
|
17
|
+
&:is(&) {
|
|
18
|
+
gap: 0;
|
|
19
|
+
padding: 0;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
>
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
> *:not(&),
|
|
23
|
+
> :where(astro-slot, astro-island, astro-content) > *:not(&) {
|
|
24
|
+
@apply padding-scaffold;
|
|
25
|
+
--fallback-padding: 1rlh;
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
/* Increase specificity to overwrite padding and gap utilities used on card-split. */
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
gap: 0;
|
|
28
|
-
padding: 0;
|
|
27
|
+
/* @apply inner-radius; */
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
/* Raise for nicer focus ring */
|
|
30
|
+
&:focus-visible {
|
|
31
|
+
z-index: 2;
|
|
33
32
|
}
|
|
34
|
-
}
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
&:not(:focus-visible) {
|
|
35
|
+
--z-index: 1;
|
|
36
|
+
animation: z-index-hack var(--transition-duration)
|
|
37
|
+
var(--transition-delay);
|
|
38
|
+
}
|
|
41
39
|
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
@utility card-divided-horizontal {
|
|
44
|
+
@apply horizontal;
|
|
45
|
+
@apply divider-between-y;
|
|
46
|
+
|
|
47
|
+
> * {
|
|
48
|
+
border-width: 0;
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> :where(:not(:first-child)) {
|
|
53
|
+
border-left-width: var(--border-width);
|
|
54
|
+
border-color: var(--_bc, var(--border-color));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
> :where(:first-child) {
|
|
58
|
+
border-radius: 0;
|
|
59
|
+
border-top-left-radius: var(--radius);
|
|
60
|
+
border-bottom-left-radius: var(--radius);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
> :where(:last-child) {
|
|
64
|
+
border-radius: 0;
|
|
65
|
+
border-top-right-radius: var(--radius);
|
|
66
|
+
border-bottom-right-radius: var(--radius);
|
|
48
67
|
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
@utility card-divided-vertical {
|
|
71
|
+
@apply vertical;
|
|
72
|
+
@apply divider-between-x;
|
|
73
|
+
|
|
74
|
+
> * {
|
|
75
|
+
border-width: 0;
|
|
76
|
+
border-radius: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
> :where(:not(:first-child)) {
|
|
80
|
+
border-top-width: var(--border-width);
|
|
81
|
+
border-style: var(--border-style);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
> :first-child {
|
|
85
|
+
border-top-left-radius: var(--radius);
|
|
86
|
+
border-top-right-radius: var(--radius);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
> :last-child {
|
|
90
|
+
border-bottom-left-radius: var(--radius);
|
|
91
|
+
border-bottom-right-radius: var(--radius);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@utility card-split {
|
|
96
|
+
@apply card-divided;
|
|
56
97
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@utility hero-heading {
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
gap: 0.
|
|
7
|
+
gap: var(--gap, 0.5lh);
|
|
8
8
|
max-width: 100%;
|
|
9
9
|
|
|
10
10
|
> .eyebrow {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
& {
|
|
30
30
|
@apply hero-heading;
|
|
31
31
|
align-self: center;
|
|
32
|
+
align-items: center;
|
|
32
33
|
margin-inline: auto;
|
|
33
34
|
text-align: center;
|
|
34
35
|
}
|
|
@@ -7,22 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
/* 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). */
|
|
9
9
|
> * + :where(h2),
|
|
10
|
-
> * + :where(astro-island, astro-slot) > :where(
|
|
10
|
+
> * + :where(astro-island, astro-slot) > :where(h2):first-child {
|
|
11
11
|
margin-top: 1.5rlh;
|
|
12
12
|
scroll-margin-top: 1.5rlh;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
> * + :where(h3),
|
|
16
|
-
> * + :where(astro-island, astro-slot) > :where(
|
|
16
|
+
> * + :where(astro-island, astro-slot) > :where(h3):first-child {
|
|
17
17
|
margin-top: 1rlh;
|
|
18
18
|
margin-bottom: -0.5rlh;
|
|
19
19
|
scroll-margin-top: 1rlh;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
> * + :where(h4, h5, h6),
|
|
23
|
-
> *
|
|
24
|
-
+ :where(astro-island, astro-slot)
|
|
25
|
-
> :where(:where(h4, h5, h6):first-child) {
|
|
23
|
+
> * + :where(astro-island, astro-slot) > :where(h4, h5, h6):first-child {
|
|
26
24
|
margin-top: 1rlh;
|
|
27
25
|
margin-bottom: -1rlh;
|
|
28
26
|
scroll-margin-top: 1rlh;
|
|
@@ -68,5 +66,10 @@
|
|
|
68
66
|
border: 1px solid oklch(90% 0 0deg);
|
|
69
67
|
border-radius: var(--radius);
|
|
70
68
|
}
|
|
69
|
+
|
|
70
|
+
&.fancylist,
|
|
71
|
+
& .fancylist {
|
|
72
|
+
padding-left: 0;
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
@utility accordion-stack {
|
|
2
|
+
@apply card-divided card-divided-vertical;
|
|
3
|
+
|
|
4
|
+
.accordion-button {
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
@utility accordion {
|
|
10
|
+
&:not(.accordion-stack &) {
|
|
11
|
+
@apply border-scaffold;
|
|
12
|
+
}
|
|
13
|
+
|
|
2
14
|
svg {
|
|
3
15
|
transition: var(--transition-values);
|
|
4
16
|
transition-property: var(--transition-props);
|
|
@@ -12,6 +24,7 @@
|
|
|
12
24
|
@utility accordion-button {
|
|
13
25
|
& {
|
|
14
26
|
@apply padding-scaffold;
|
|
27
|
+
--border-width: 0;
|
|
15
28
|
display: flex;
|
|
16
29
|
justify-content: space-between;
|
|
17
30
|
align-items: start;
|
|
@@ -33,5 +46,9 @@
|
|
|
33
46
|
}
|
|
34
47
|
|
|
35
48
|
@utility accordion-content {
|
|
36
|
-
padding
|
|
49
|
+
@apply padding-scaffold;
|
|
50
|
+
|
|
51
|
+
&:not(.accordion-stack &) {
|
|
52
|
+
padding-top: 0;
|
|
53
|
+
}
|
|
37
54
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--text-color: white; */
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@utility
|
|
12
|
+
@utility fancybox {
|
|
13
13
|
& {
|
|
14
14
|
@apply border-scaffold;
|
|
15
15
|
--a: var(--arrow-angle, 90deg);
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
overflow: visible;
|
|
29
29
|
position: relative;
|
|
30
30
|
z-index: 0;
|
|
31
|
-
padding: 0.5em; /* To remove */
|
|
32
31
|
border-width: var(--b);
|
|
33
32
|
border-color: transparent;
|
|
34
33
|
color: var(--text-color);
|
|
@@ -40,9 +39,9 @@
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
@utility
|
|
42
|
+
@utility fancybox-arrow {
|
|
44
43
|
& {
|
|
45
|
-
@apply
|
|
44
|
+
@apply fancybox;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
&.arrow-top,
|
package/src/effects/index.css
CHANGED
package/src/form/input.css
CHANGED
|
@@ -64,12 +64,17 @@
|
|
|
64
64
|
*********************/
|
|
65
65
|
@utility grid-fr-auto {
|
|
66
66
|
@apply grid-scaffold;
|
|
67
|
-
grid-template-columns:
|
|
67
|
+
grid-template-columns:
|
|
68
|
+
repeat(calc(var(--cols) - 1), minmax(0, 1fr))
|
|
69
|
+
minmax(0, auto);
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
@utility grid-auto-fr {
|
|
71
73
|
@apply grid-scaffold;
|
|
72
|
-
grid-template-columns: minmax(0, auto)
|
|
74
|
+
grid-template-columns: minmax(0, auto) repeat(
|
|
75
|
+
calc(var(--cols) - 1),
|
|
76
|
+
minmax(0, 1fr)
|
|
77
|
+
);
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
@utility grid-with-breakout {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
@utility divider-y {
|
|
35
35
|
& {
|
|
36
36
|
@apply divider-scaffold;
|
|
37
|
+
flex-grow: 0;
|
|
37
38
|
flex-direction: column;
|
|
38
39
|
|
|
39
40
|
&::before,
|
|
@@ -63,9 +64,9 @@
|
|
|
63
64
|
row-gap: 0;
|
|
64
65
|
|
|
65
66
|
> * + *,
|
|
66
|
-
> * + *:where(astro-island, astro-slot) > * {
|
|
67
|
+
> * + *:where(astro-island, astro-slot):not(:first-of-type) > * {
|
|
67
68
|
border-top-width: var(--border-width, 1px);
|
|
68
|
-
border-color: var(--border-color);
|
|
69
|
+
border-color: var(--_bc, var(--border-color));
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
> * + *,
|
|
78
79
|
> * + *:where(astro-island, astro-slot) > * {
|
|
79
80
|
border-left-width: var(--border-width, 1px);
|
|
80
|
-
border-color: var(--border-color);
|
|
81
|
+
border-color: var(--_bc, var(--border-color));
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*********************
|
|
2
|
+
* Inner Margin *
|
|
3
|
+
*********************/
|
|
4
|
+
@utility im-* {
|
|
5
|
+
& > * {
|
|
6
|
+
margin: calc(var(--spacing) * --value(integer));
|
|
7
|
+
margin: calc(--value([length]));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@utility im-x-* {
|
|
12
|
+
margin-inline: calc(var(--spacing) * --value(integer));
|
|
13
|
+
margin-inline: calc(--value([length]));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@utility im-y-* {
|
|
17
|
+
margin-block: calc(var(--spacing) * --value(integer));
|
|
18
|
+
margin-block: calc(--value([length]));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*********************
|
|
22
|
+
* Inner Padding *
|
|
23
|
+
*********************/
|
|
24
|
+
@utility ip-* {
|
|
25
|
+
& > * {
|
|
26
|
+
padding: calc(var(--spacing) * --value(integer));
|
|
27
|
+
padding: calc(--value([length]));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@utility ip-x-* {
|
|
32
|
+
padding-inline: calc(var(--spacing) * --value(integer));
|
|
33
|
+
padding-inline: calc(--value([length]));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@utility ip-y-* {
|
|
37
|
+
padding-block: calc(var(--spacing) * --value(integer));
|
|
38
|
+
padding-block: calc(--value([length]));
|
|
39
|
+
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@apply micro;
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: row;
|
|
17
|
+
flex-wrap: nowrap;
|
|
17
18
|
gap: var(--gap-y, var(--gap)) var(--gap-x, var(--gap));
|
|
18
19
|
|
|
19
20
|
> .spacer {
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
@apply micro;
|
|
28
29
|
display: flex;
|
|
29
30
|
flex-direction: column;
|
|
31
|
+
flex-wrap: nowrap;
|
|
30
32
|
gap: var(--gap-y, var(--gap)) var(--gap-x, var(--gap));
|
|
31
33
|
|
|
32
34
|
> .spacer {
|