Skip to content

Commit

Permalink
improve anchor for headings
Browse files Browse the repository at this point in the history
  • Loading branch information
torn4dom4n committed Jun 6, 2024
1 parent 10f1d1c commit 60e9cc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/content/docs/guides/anchor-links-for-headings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ This is guides how to add anchor links for headings in Starlight project.
.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) {
a {
text-decoration: none;
font-size: 1.2rem;
margin-left: 0.5rem;
color: var(--sl-color-white);
line-height: var(--sl-line-height-headings);
font-weight: 600;
color: transparent !important;
}
Expand All @@ -59,4 +60,4 @@ This is guides how to add anchor links for headings in Starlight project.
}
}
```
</Steps>
</Steps>
7 changes: 4 additions & 3 deletions src/styles/headings.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) {
a {
text-decoration: none;
font-size: 1.2rem;
margin-left: 0.5rem;
color: var(--sl-color-white);
line-height: var(--sl-line-height-headings);
font-weight: 600;
color: transparent !important;
}

Expand All @@ -13,4 +14,4 @@
.icon.icon-link::after {
content: '🔗';
}
}
}

0 comments on commit 60e9cc3

Please sign in to comment.