Skip to content

Commit

Permalink
AccessKit: Make links blue consistently (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon authored Dec 7, 2023
1 parent 1c2efb8 commit 4eea57f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/scripts/accesskit.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
color: rgb(var(--black));
}

body.accesskit-blue-links article a[target="_blank"][href^="https://t.umblr.com/redirect"],
body.accesskit-blue-links article a[target="_blank"][href^="https://href.li/"] {
color: rgb(var(--accent));
}

body.accesskit-no-user-colours article span[style^="color"] {
color: inherit !important;
}
Expand Down
13 changes: 10 additions & 3 deletions src/scripts/accesskit/blue_links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const className = 'accesskit-blue-links';
import { keyToCss } from '../../util/css_map.js';
import { buildStyle } from '../../util/interface.js';

export const main = async () => document.body.classList.add(className);
export const clean = async () => document.body.classList.remove(className);
const styleElement = buildStyle(`
article ${keyToCss('textBlock')} a[target="_blank"] {
color: rgba(var(--blue));
}
`);

export const main = async () => document.documentElement.append(styleElement);
export const clean = async () => styleElement.remove();

0 comments on commit 4eea57f

Please sign in to comment.