Skip to content

Commit 613f0f7

Browse files
committed
fix: colors
1 parent 47d4638 commit 613f0f7

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

src/components/Footer/Footer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const footerLinkClasses =
1010

1111
const Footer = () => (
1212
<footer className="w-full flex-[0_0_auto] print:hidden">
13-
<Container className="mx-auto max-w-[900px] px-5 pb-[30px] pt-[40px] text-center [&_a]:text-[#465E69] [&_a:hover]:text-[#2B3A42] dark:[&_a]:text-[#8dd6f9] dark:[&_a:hover]:text-white">
13+
<Container className="mx-auto max-w-[900px] px-5 pb-[30px] pt-[40px] text-center [&_a]:text-[var(--color-link-accessible)] [&_a:hover]:text-[var(--color-link-accessible-hover)] dark:[&_a]:text-[var(--color-link-accessible-dark)] dark:[&_a:hover]:text-white">
1414
<div className="mb-[24px] flex justify-center">
1515
<a href="https://openjsf.org" target="_blank" rel="noopener noreferrer">
1616
<img

src/components/Markdown/Markdown.css

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@
293293
font-family:
294294
"Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier, monospace;
295295
@apply text-[90%] mx-0.5 py-0.5 px-1.5 whitespace-normal bg-[rgba(70,94,105,0.05)] rounded-[3px];
296-
color: #2b3a42;
297-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
296+
color: var(--color-code-inline-text);
297+
text-shadow: none;
298298
}
299299

300300
a {
@@ -457,10 +457,34 @@
457457
@apply text-white;
458458
}
459459

460+
.markdown a > code,
461+
.markdown a > tt {
462+
color: var(--color-link-accessible) !important;
463+
background: transparent !important;
464+
padding: 0 !important;
465+
margin: 0 !important;
466+
border-radius: 0 !important;
467+
text-shadow: none !important;
468+
}
469+
470+
.dark .markdown a > code,
471+
.dark .markdown a > tt {
472+
color: var(--color-link-accessible-dark) !important;
473+
background: transparent !important;
474+
padding: 0 !important;
475+
margin: 0 !important;
476+
border-radius: 0 !important;
477+
text-shadow: none !important;
478+
}
479+
460480
.markdown aside.tip a {
461-
color: #465e69;
481+
color: var(--color-link-accessible) !important;
462482
}
463483

464484
.markdown aside.tip a:hover {
465-
color: #2b3a42;
485+
color: var(--color-link-accessible-hover) !important;
486+
}
487+
488+
.dark .markdown aside.tip a {
489+
color: var(--color-link-accessible-dark) !important;
466490
}

src/components/Navigation/Navigation.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function Navigation({ links, pathname, hash = "", toggleSidebar }) {
248248
>
249249
{link.children.map((child) => {
250250
const classNames =
251-
"text-[#465E69] dark:text-[#8dd6f9] py-5 text-sm capitalize hover:text-[#2B3A42] dark:hover:text-white";
251+
"text-[var(--color-link-accessible)] dark:text-[var(--color-link-accessible-dark)] py-5 text-sm capitalize hover:text-[var(--color-link-accessible-hover)] dark:hover:text-white";
252252
const isActive = location.pathname.startsWith(child.url);
253253
return (
254254
<NavLink

src/styles/theme.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
--color-brand-link-hover: #144f80;
55
--color-brand-link-dark: #69a8ee;
66
--color-brand-link-dark-hover: #82b7f6;
7+
/* Accessible link colors (a11y fix) */
8+
--color-link-accessible: #144f80;
9+
--color-link-accessible-hover: #144f80;
710

811
/* Brand button/UI blue */
912
--color-brand-blue: #175d96;
@@ -37,6 +40,7 @@
3740
--color-code-link: #1e78c2;
3841
--color-code-link-hover: #2186d8;
3942
--color-code-anchor-border: #175d96;
43+
--color-code-inline-text: #144f80;
4044

4145
/* Dark mode surface colors */
4246
--color-dark-bg: #121212;
@@ -61,6 +65,8 @@
6165
--color-dark-section-border: #343434;
6266
--color-dark-sidebar-text: #cadbe6;
6367
--color-dark-active-text: #465e69;
68+
--color-link-accessible-dark: #8dd6f9;
69+
--color-dark-code-inline-text: #e2e8f0;
6470

6571
/* Sidebar/nav */
6672
--color-nav-bg: #526b78;

0 commit comments

Comments
 (0)