Skip to content

Commit ad609d3

Browse files
Add prefers-color-scheme dark mode support
- Add @media (prefers-color-scheme: dark) queries - Add [data-theme="dark"] selector support - Cover all possible dark mode detection methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 00fe8b3 commit ad609d3

1 file changed

Lines changed: 39 additions & 22 deletions

File tree

assets/css/extended/cv-style.css

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,49 +55,66 @@
5555
font-weight: 600;
5656
}
5757

58-
/* Dark mode adjustments */
59-
.dark .cv-page h1 {
60-
color: #7ab8e8 !important;
61-
border-bottom-color: #7ab8e8 !important;
62-
}
58+
/* Dark mode adjustments using prefers-color-scheme */
59+
@media (prefers-color-scheme: dark) {
60+
.cv-page h1 {
61+
color: #7ab8e8 !important;
62+
border-bottom-color: #7ab8e8 !important;
63+
}
6364

64-
.dark .cv-page h2 {
65-
color: #7ab8e8 !important;
66-
border-bottom-color: #7ab8e8 !important;
67-
}
65+
.cv-page h2 {
66+
color: #7ab8e8 !important;
67+
border-bottom-color: #7ab8e8 !important;
68+
}
6869

69-
.dark .cv-page h3 {
70-
color: #7ab8e8 !important;
71-
}
70+
.cv-page h3 {
71+
color: #7ab8e8 !important;
72+
}
7273

73-
.dark .cv-page .cv-contact {
74-
border-left-color: #7ab8e8 !important;
75-
}
74+
.cv-page .cv-contact {
75+
border-left-color: #7ab8e8 !important;
76+
}
7677

77-
.dark .cv-page strong {
78-
color: #7ab8e8 !important;
78+
.cv-page strong {
79+
color: #7ab8e8 !important;
80+
}
7981
}
8082

81-
/* Additional dark mode selectors for PaperMod theme */
83+
/* Dark mode adjustments using class selectors */
84+
.dark .cv-page h1,
8285
body.dark .cv-page h1,
83-
html.dark .cv-page h1 {
86+
html.dark .cv-page h1,
87+
[data-theme="dark"] .cv-page h1 {
8488
color: #7ab8e8 !important;
8589
border-bottom-color: #7ab8e8 !important;
8690
}
8791

92+
.dark .cv-page h2,
8893
body.dark .cv-page h2,
89-
html.dark .cv-page h2 {
94+
html.dark .cv-page h2,
95+
[data-theme="dark"] .cv-page h2 {
9096
color: #7ab8e8 !important;
9197
border-bottom-color: #7ab8e8 !important;
9298
}
9399

100+
.dark .cv-page h3,
94101
body.dark .cv-page h3,
95-
html.dark .cv-page h3 {
102+
html.dark .cv-page h3,
103+
[data-theme="dark"] .cv-page h3 {
96104
color: #7ab8e8 !important;
97105
}
98106

107+
.dark .cv-page .cv-contact,
108+
body.dark .cv-page .cv-contact,
109+
html.dark .cv-page .cv-contact,
110+
[data-theme="dark"] .cv-page .cv-contact {
111+
border-left-color: #7ab8e8 !important;
112+
}
113+
114+
.dark .cv-page strong,
99115
body.dark .cv-page strong,
100-
html.dark .cv-page strong {
116+
html.dark .cv-page strong,
117+
[data-theme="dark"] .cv-page strong {
101118
color: #7ab8e8 !important;
102119
}
103120

0 commit comments

Comments
 (0)