Skip to content

Commit 44aeb6a

Browse files
authored
fix: handle emphasis color on citation et al. text outside links (#378)
fix: handle emphasis color on citation et al. text outside links
1 parent 172bd74 commit 44aeb6a

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/quantecon_book_theme/assets/styles/_base.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ em {
156156

157157
// Reset emphasis styling inside citation reference links
158158
// Prevents "et al." in references from inheriting emphasis color
159-
a.reference em {
159+
a.reference em,
160+
span:has(> a.reference) > em {
160161
font-style: normal;
161162
font-weight: inherit;
162163
color: inherit;

src/quantecon_book_theme/assets/styles/_color-schemes.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ body.color-scheme-gruvbox {
2525
}
2626

2727
// Reset emphasis styling inside citation reference links (gruvbox)
28-
a.reference em {
28+
a.reference em,
29+
span:has(> a.reference) > em {
2930
color: inherit;
3031
font-weight: inherit;
3132
}
@@ -51,7 +52,8 @@ body.color-scheme-gruvbox {
5152
}
5253

5354
// Reset emphasis styling inside citation reference links (gruvbox dark)
54-
a.reference em {
55+
a.reference em,
56+
span:has(> a.reference) > em {
5557
color: inherit;
5658
}
5759

src/quantecon_book_theme/assets/styles/_dark-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ body.dark-theme {
154154
}
155155

156156
// Reset emphasis styling inside citation reference links (dark mode)
157-
a.reference em {
157+
a.reference em,
158+
span:has(> a.reference) > em {
158159
color: inherit;
159160
}
160161

0 commit comments

Comments
 (0)