Skip to content

Commit

Permalink
fix(links): show backdrop on links highlighted in headers alias (jack…
Browse files Browse the repository at this point in the history
…yzha0#816)

* fix: assign specific classes based on parent node

Signed-off-by: Aaron <[email protected]>

* fix: use custom role for anchor icone

Signed-off-by: Aaron <[email protected]>

* fix: allow color on links 😄

Signed-off-by: Aaron <[email protected]>

* chore: unify search inner container

Signed-off-by: Aaron <[email protected]>

---------

Signed-off-by: Aaron <[email protected]>
  • Loading branch information
aarnphm authored Feb 6, 2024
1 parent 52ef6d1 commit d2fb50b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion quartz/components/styles/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
width: min($pageWidth, 100%);
}

& [data-icon] {
a[role="anchor"] {
background-color: transparent;
}
}
Expand Down
2 changes: 1 addition & 1 deletion quartz/plugins/transformers/gfm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export const GitHubFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options> |
{
behavior: "append",
properties: {
role: "anchor",
ariaHidden: true,
tabIndex: -1,
"data-no-popover": true,
"data-icon": true,
},
content: {
type: "element",
Expand Down
6 changes: 2 additions & 4 deletions quartz/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,9 @@ thead {
font-weight: revert;
margin-bottom: 0;

article > & > a {
article > & > a[role="anchor"] {
color: var(--dark);
&.internal {
background-color: transparent;
}
background-color: transparent;
}
}

Expand Down

0 comments on commit d2fb50b

Please sign in to comment.