-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v3] attach heading anchor
id
attribute to heading (like Pagefind d…
…o) and fix heading anchor styles when `theme.typesetting: 'article'` is set (#3132) aa
- Loading branch information
1 parent
49a9627
commit 150184b
Showing
5 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'nextra-theme-blog': patch | ||
'nextra-theme-docs': patch | ||
'nextra': patch | ||
--- | ||
|
||
attach heading anchor `id` attribute to heading (like Pagefind do) and fix heading anchor styles when `theme.typesetting: 'article'` is set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
.subheading-anchor { | ||
@apply _opacity-0 _transition-opacity ltr:_ml-1 rtl:_mr-1; | ||
|
||
:hover > &, | ||
:target > &, | ||
&:hover, | ||
&:focus { | ||
@apply _opacity-100; | ||
} | ||
|
||
:target > &:after { | ||
@apply _text-gray-400; | ||
@apply dark:_text-neutral-500; | ||
} | ||
|
||
&:after { | ||
@apply _content-['#'] _px-1; | ||
@apply _text-gray-300 dark:_text-neutral-700; | ||
span:target + & { | ||
@apply _text-gray-400; | ||
@apply dark:_text-neutral-500; | ||
} | ||
} | ||
} |