@astrojs/starlight 0.33.2 → 0.34.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/CHANGELOG.md +98 -0
- package/components/AnchorHeading.astro +53 -0
- package/components/Banner.astro +14 -12
- package/components/ContentNotice.astro +13 -11
- package/components/ContentPanel.astro +17 -15
- package/components/EditLink.astro +10 -8
- package/components/Footer.astro +30 -28
- package/components/Header.astro +54 -51
- package/components/Hero.astro +60 -58
- package/components/MobileMenuFooter.astro +19 -16
- package/components/MobileMenuToggle.astro +41 -37
- package/components/MobileTableOfContents.astro +71 -69
- package/components/Page.astro +8 -8
- package/components/PageFrame.astro +61 -57
- package/components/PageSidebar.astro +33 -31
- package/components/PageTitle.astro +8 -6
- package/components/Pagination.astro +38 -36
- package/components/Search.astro +277 -272
- package/components/Select.astro +50 -46
- package/components/SidebarPersister.astro +4 -2
- package/components/SidebarSublist.astro +78 -76
- package/components/SiteTitle.astro +17 -15
- package/components/SkipLink.astro +17 -15
- package/components/SocialIcons.astro +9 -7
- package/components/TableOfContents/TableOfContentsList.astro +49 -47
- package/components/TwoColumnContent.astro +32 -30
- package/index.ts +11 -4
- package/integrations/expressive-code/index.ts +2 -0
- package/integrations/heading-links.ts +104 -0
- package/integrations/virtual-user-config.ts +9 -0
- package/package.json +8 -3
- package/schemas/head.ts +2 -2
- package/schemas/i18n.ts +2 -0
- package/style/anchor-links.css +125 -0
- package/style/asides.css +46 -44
- package/style/layers.css +1 -0
- package/style/markdown.css +195 -189
- package/style/print.css +30 -35
- package/style/props.css +180 -178
- package/style/reset.css +42 -40
- package/style/util.css +51 -49
- package/translations/ar.json +2 -1
- package/translations/ca.json +2 -1
- package/translations/cs.json +2 -1
- package/translations/da.json +2 -1
- package/translations/de.json +2 -1
- package/translations/en.json +2 -1
- package/translations/es.json +2 -1
- package/translations/fa.json +2 -1
- package/translations/fr.json +2 -1
- package/translations/gl.json +2 -1
- package/translations/he.json +2 -1
- package/translations/hi.json +2 -1
- package/translations/id.json +2 -1
- package/translations/it.json +2 -1
- package/translations/ja.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/lv.json +2 -1
- package/translations/nb.json +2 -1
- package/translations/nl.json +2 -1
- package/translations/pl.json +2 -1
- package/translations/pt.json +2 -1
- package/translations/ro.json +2 -1
- package/translations/ru.json +2 -1
- package/translations/sk.json +2 -1
- package/translations/sv.json +2 -1
- package/translations/tr.json +2 -1
- package/translations/uk.json +2 -1
- package/translations/vi.json +2 -1
- package/translations/zh-CN.json +2 -1
- package/translations/zh-TW.json +2 -1
- package/user-components/Badge.astro +118 -116
- package/user-components/Card.astro +44 -42
- package/user-components/CardGrid.astro +20 -18
- package/user-components/FileTree.astro +105 -103
- package/user-components/Icon.astro +7 -5
- package/user-components/LinkButton.astro +43 -41
- package/user-components/LinkCard.astro +45 -43
- package/user-components/Steps.astro +65 -61
- package/user-components/Tabs.astro +35 -33
- package/utils/head.ts +12 -4
- package/utils/starlight-page.ts +16 -19
- package/utils/user-config.ts +14 -0
- package/virtual-internal.d.ts +2 -0
- package/style/shiki.css +0 -13
|
@@ -8,127 +8,129 @@ const html = processFileTree(fileTreeHtml, Astro.locals.t('fileTree.directory'))
|
|
|
8
8
|
<starlight-file-tree set:html={html} class="not-content" data-pagefind-ignore />
|
|
9
9
|
|
|
10
10
|
<style>
|
|
11
|
-
starlight
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
starlight-file-tree :global(.directory > details) {
|
|
26
|
-
border: 0;
|
|
27
|
-
padding: 0;
|
|
28
|
-
padding-inline-start: var(--x-space);
|
|
29
|
-
background: transparent;
|
|
30
|
-
}
|
|
11
|
+
@layer starlight.components {
|
|
12
|
+
starlight-file-tree {
|
|
13
|
+
--x-space: 1.5rem;
|
|
14
|
+
--y-space: 0.125rem;
|
|
15
|
+
--y-pad: 0;
|
|
16
|
+
|
|
17
|
+
display: block;
|
|
18
|
+
border: 1px solid var(--sl-color-gray-5);
|
|
19
|
+
padding: 1rem;
|
|
20
|
+
background-color: var(--sl-color-gray-6);
|
|
21
|
+
font-size: var(--sl-text-xs);
|
|
22
|
+
font-family: var(--__sl-font-mono);
|
|
23
|
+
overflow-x: auto;
|
|
24
|
+
}
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
max-width: 100%;
|
|
39
|
-
}
|
|
26
|
+
starlight-file-tree :global(.directory > details) {
|
|
27
|
+
border: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
padding-inline-start: var(--x-space);
|
|
30
|
+
background: transparent;
|
|
31
|
+
}
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
starlight-file-tree :global(.directory > details > summary) {
|
|
34
|
+
margin-inline-start: calc(-1 * var(--x-space));
|
|
35
|
+
border: 0;
|
|
36
|
+
padding: var(--y-pad) 0.625rem;
|
|
37
|
+
font-weight: normal;
|
|
38
|
+
color: var(--sl-color-white);
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
}
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
fill: currentColor;
|
|
51
|
-
}
|
|
42
|
+
starlight-file-tree :global(.directory > details > summary::marker),
|
|
43
|
+
starlight-file-tree :global(.directory > details > summary::-webkit-details-marker) {
|
|
44
|
+
color: var(--sl-color-gray-3);
|
|
45
|
+
}
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
starlight-file-tree :global(.directory > details > summary:hover),
|
|
48
|
+
starlight-file-tree :global(.directory > details > summary:hover .tree-icon) {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
color: var(--sl-color-text-accent);
|
|
51
|
+
fill: currentColor;
|
|
52
|
+
}
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
starlight-file-tree :global(.directory > details > summary:hover ~ ul) {
|
|
55
|
+
border-color: var(--sl-color-gray-4);
|
|
56
|
+
}
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
padding: 0;
|
|
65
|
-
padding-inline-start: 0.125rem;
|
|
66
|
-
list-style: none;
|
|
67
|
-
}
|
|
58
|
+
starlight-file-tree :global(.directory > details > summary:hover .highlight .tree-icon) {
|
|
59
|
+
fill: currentColor;
|
|
60
|
+
}
|
|
68
61
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
starlight-file-tree :global(ul) {
|
|
63
|
+
margin-inline-start: 0.5rem;
|
|
64
|
+
border-inline-start: 1px solid var(--sl-color-gray-5);
|
|
65
|
+
padding: 0;
|
|
66
|
+
padding-inline-start: 0.125rem;
|
|
67
|
+
list-style: none;
|
|
68
|
+
}
|
|
74
69
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
starlight-file-tree > :global(ul) {
|
|
71
|
+
margin: 0;
|
|
72
|
+
border: 0;
|
|
73
|
+
padding: 0;
|
|
74
|
+
}
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
starlight-file-tree :global(li) {
|
|
77
|
+
margin: var(--y-space) 0;
|
|
78
|
+
padding: var(--y-pad) 0;
|
|
79
|
+
}
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
max-width: calc(100% - 1rem);
|
|
90
|
-
}
|
|
81
|
+
starlight-file-tree :global(.file) {
|
|
82
|
+
margin-inline-start: calc(var(--x-space) - 0.125rem);
|
|
83
|
+
color: var(--sl-color-white);
|
|
84
|
+
}
|
|
91
85
|
|
|
92
|
-
@media (min-width: 30em) {
|
|
93
86
|
starlight-file-tree :global(.tree-entry) {
|
|
94
|
-
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: flex-start;
|
|
89
|
+
flex-wrap: wrap;
|
|
90
|
+
max-width: calc(100% - 1rem);
|
|
95
91
|
}
|
|
96
|
-
}
|
|
97
92
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
@media (min-width: 30em) {
|
|
94
|
+
starlight-file-tree :global(.tree-entry) {
|
|
95
|
+
flex-wrap: nowrap;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
99
|
+
starlight-file-tree :global(.tree-entry > :first-child) {
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
106
102
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
min-width: 12rem;
|
|
112
|
-
}
|
|
103
|
+
starlight-file-tree :global(.empty) {
|
|
104
|
+
color: var(--sl-color-gray-3);
|
|
105
|
+
padding-inline-start: 0.375rem;
|
|
106
|
+
}
|
|
113
107
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
108
|
+
starlight-file-tree :global(.comment) {
|
|
109
|
+
color: var(--sl-color-gray-3);
|
|
110
|
+
padding-inline-start: 1.625rem;
|
|
111
|
+
max-width: 24rem;
|
|
112
|
+
min-width: 12rem;
|
|
113
|
+
}
|
|
121
114
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
starlight-file-tree :global(.highlight) {
|
|
116
|
+
display: inline-block;
|
|
117
|
+
border-radius: 0.25rem;
|
|
118
|
+
padding-inline-end: 0.5rem;
|
|
119
|
+
color: var(--sl-color-text-invert);
|
|
120
|
+
background-color: var(--sl-color-text-accent);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
starlight-file-tree :global(svg) {
|
|
124
|
+
display: inline;
|
|
125
|
+
fill: var(--sl-color-gray-3);
|
|
126
|
+
vertical-align: middle;
|
|
127
|
+
margin-inline: 0.25rem 0.375rem;
|
|
128
|
+
width: 0.875rem;
|
|
129
|
+
height: 0.875rem;
|
|
130
|
+
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
starlight-file-tree :global(.highlight svg.tree-icon) {
|
|
133
|
+
fill: currentColor;
|
|
134
|
+
}
|
|
133
135
|
}
|
|
134
136
|
</style>
|
|
@@ -31,10 +31,12 @@ const a11yAttrs = label ? ({ 'aria-label': label } as const) : ({ 'aria-hidden':
|
|
|
31
31
|
</>
|
|
32
32
|
|
|
33
33
|
<style define:vars={{ 'sl-icon-color': color, 'sl-icon-size': size }}>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
@layer starlight.components {
|
|
35
|
+
svg {
|
|
36
|
+
color: var(--sl-icon-color);
|
|
37
|
+
font-size: var(--sl-icon-size, 1em);
|
|
38
|
+
width: 1em;
|
|
39
|
+
height: 1em;
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
</style>
|
|
@@ -26,51 +26,53 @@ const {
|
|
|
26
26
|
</a>
|
|
27
27
|
|
|
28
28
|
<style>
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
@layer starlight.components {
|
|
30
|
+
.sl-link-button {
|
|
31
|
+
align-items: center;
|
|
32
|
+
border: 1px solid transparent;
|
|
33
|
+
border-radius: 999rem;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
font-size: var(--sl-text-sm);
|
|
36
|
+
gap: 0.5em;
|
|
37
|
+
line-height: 1.1875;
|
|
38
|
+
outline-offset: 0.25rem;
|
|
39
|
+
padding: 0.4375rem 1.125rem;
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
.sl-link-button.primary {
|
|
44
|
+
background: var(--sl-color-text-accent);
|
|
45
|
+
border-color: var(--sl-color-text-accent);
|
|
46
|
+
color: var(--sl-color-black);
|
|
47
|
+
}
|
|
48
|
+
.sl-link-button.primary:hover {
|
|
49
|
+
color: var(--sl-color-black);
|
|
50
|
+
}
|
|
51
|
+
.sl-link-button.secondary {
|
|
52
|
+
border-color: inherit;
|
|
53
|
+
color: var(--sl-color-white);
|
|
54
|
+
}
|
|
55
|
+
.sl-link-button.minimal {
|
|
56
|
+
color: var(--sl-color-white);
|
|
57
|
+
padding-inline: 0;
|
|
58
|
+
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
.sl-link-button :global(svg) {
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
@media (min-width: 50rem) {
|
|
65
|
+
.sl-link-button {
|
|
66
|
+
font-size: var(--sl-text-base);
|
|
67
|
+
padding: 0.9375rem 1.25rem;
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
|
-
}
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
:global(.sl-markdown-content) .sl-link-button {
|
|
72
|
+
margin-inline-end: 1rem;
|
|
73
|
+
}
|
|
74
|
+
:global(.sl-markdown-content) .sl-link-button:not(:where(p *)) {
|
|
75
|
+
margin-block: 1rem;
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
</style>
|
|
@@ -21,56 +21,58 @@ const { title, description, ...attributes } = Astro.props;
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<style>
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
@layer starlight.components {
|
|
25
|
+
.sl-link-card {
|
|
26
|
+
display: grid;
|
|
27
|
+
grid-template-columns: 1fr auto;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
border: 1px solid var(--sl-color-gray-5);
|
|
30
|
+
border-radius: 0.5rem;
|
|
31
|
+
padding: 1rem;
|
|
32
|
+
box-shadow: var(--sl-shadow-sm);
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
a {
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
line-height: var(--sl-line-height-headings);
|
|
39
|
+
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
/* a11y fix for https://github.com/withastro/starlight/issues/487 */
|
|
42
|
+
a::before {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
inset: 0;
|
|
46
|
+
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
.stack {
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
.title {
|
|
54
|
+
color: var(--sl-color-white);
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
font-size: var(--sl-text-lg);
|
|
57
|
+
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
.description {
|
|
60
|
+
color: var(--sl-color-gray-3);
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
.icon {
|
|
65
|
+
color: var(--sl-color-gray-3);
|
|
66
|
+
}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
/* Hover state */
|
|
69
|
+
.sl-link-card:hover {
|
|
70
|
+
background: var(--sl-color-gray-7, var(--sl-color-gray-6));
|
|
71
|
+
border-color: var(--sl-color-gray-2);
|
|
72
|
+
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
.sl-link-card:hover .icon {
|
|
75
|
+
color: var(--sl-color-white);
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
</style>
|
|
@@ -8,79 +8,83 @@ const { html } = processSteps(content);
|
|
|
8
8
|
<Fragment set:html={html} />
|
|
9
9
|
|
|
10
10
|
<style is:global>
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
@layer starlight.components {
|
|
12
|
+
.sl-steps {
|
|
13
|
+
--bullet-size: calc(var(--sl-line-height) * 1rem);
|
|
14
|
+
--bullet-margin: 0.375rem;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
list-style: none;
|
|
17
|
+
counter-reset: steps-counter var(--sl-steps-start, 0);
|
|
18
|
+
padding-inline-start: 0;
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
.sl-steps > li {
|
|
22
|
+
counter-increment: steps-counter;
|
|
23
|
+
position: relative;
|
|
24
|
+
padding-inline-start: calc(var(--bullet-size) + 1rem);
|
|
25
|
+
/* HACK: Keeps any `margin-bottom` inside the `<li>`’s padding box to avoid gaps in the hairline border. */
|
|
26
|
+
padding-bottom: 1px;
|
|
27
|
+
/* Prevent bullets from touching in short list items. */
|
|
28
|
+
min-height: calc(var(--bullet-size) + var(--bullet-margin));
|
|
29
|
+
}
|
|
30
|
+
.sl-steps > li + li {
|
|
31
|
+
/* Remove margin between steps. */
|
|
32
|
+
margin-top: 0;
|
|
33
|
+
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
/* Custom list marker element. */
|
|
36
|
+
.sl-steps > li::before {
|
|
37
|
+
content: counter(steps-counter);
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 0;
|
|
40
|
+
inset-inline-start: 0;
|
|
41
|
+
width: var(--bullet-size);
|
|
42
|
+
height: var(--bullet-size);
|
|
43
|
+
line-height: var(--bullet-size);
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
font-size: var(--sl-text-xs);
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
text-align: center;
|
|
48
|
+
color: var(--sl-color-white);
|
|
49
|
+
background-color: var(--sl-color-gray-6);
|
|
50
|
+
border-radius: 99rem;
|
|
51
|
+
box-shadow: inset 0 0 0 1px var(--sl-color-gray-5);
|
|
52
|
+
}
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
/* Vertical guideline linking list numbers. */
|
|
55
|
+
.sl-steps > li::after {
|
|
56
|
+
--guide-width: 1px;
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: calc(var(--bullet-size) + var(--bullet-margin));
|
|
60
|
+
bottom: var(--bullet-margin);
|
|
61
|
+
inset-inline-start: calc((var(--bullet-size) - var(--guide-width)) / 2);
|
|
62
|
+
width: var(--guide-width);
|
|
63
|
+
background-color: var(--sl-color-hairline-light);
|
|
64
|
+
}
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
@layer starlight.content {
|
|
68
|
+
/* Adjust first item inside a step so that it aligns vertically with the number
|
|
66
69
|
even if using a larger font size (e.g. a heading) */
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
.sl-steps > li > :first-child {
|
|
71
|
+
/*
|
|
69
72
|
The `lh` unit is not yet supported by all browsers in our support matrix
|
|
70
73
|
— see https://caniuse.com/mdn-css_types_length_lh
|
|
71
74
|
In unsupported browsers we approximate this using our known line-heights.
|
|
72
75
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
--lh: calc(1em * var(--sl-line-height));
|
|
77
|
+
--shift-y: calc(0.5 * (var(--bullet-size) - var(--lh)));
|
|
78
|
+
transform: translateY(var(--shift-y));
|
|
79
|
+
margin-bottom: var(--shift-y);
|
|
80
|
+
}
|
|
81
|
+
.sl-steps > li > :first-child:where(h1, h2, h3, h4, h5, h6) {
|
|
82
|
+
--lh: calc(1em * var(--sl-line-height-headings));
|
|
83
|
+
}
|
|
84
|
+
@supports (--prop: 1lh) {
|
|
85
|
+
.sl-steps > li > :first-child {
|
|
86
|
+
--lh: 1lh;
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
</style>
|