Skip to content

Commit 958b319

Browse files
authored
Merge pull request #69 from trailofbits/red-colors
set color links same as in reports
2 parents 2ee065f + ca22833 commit 958b319

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

assets/_custom.scss

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,38 @@ html {
160160
::-webkit-scrollbar-thumb {
161161
background: var(--gray-500);
162162
border-radius: $padding-8;
163-
}
163+
}
164+
165+
166+
167+
// Links
168+
// main colors are set in _variables.scss
169+
a:focus, a:focus-visible {
170+
opacity: .75;
171+
text-decoration: none;
172+
outline-style: auto;
173+
outline-color: var(--color-link-mono);
174+
}
175+
176+
.markdown, .book-toc {
177+
a:hover {
178+
opacity: .75;
179+
}
180+
}
181+
182+
.markdown a {
183+
&:hover {
184+
text-decoration: underline;
185+
text-decoration-color: var(--color-link-mono);
186+
}
187+
188+
&:visited {
189+
&:hover {
190+
text-decoration-color: var(--color-visited-link-mono);
191+
}
192+
193+
&:focus, &:focus-visible {
194+
outline-color: var(--color-visited-link-mono);
195+
}
196+
}
197+
}

assets/_variables.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// had to copy the whole mixin from _default.scss
2+
@mixin theme-light {
3+
--gray-100: #f8f9fa;
4+
--gray-200: #e9ecef;
5+
--gray-500: #adb5bd;
6+
7+
// https://github.com/trailofbits/audit-reporting-tools/blob/88b75a31a7298e8079fb326c7992ff534868e497/make-report/make_report/colors.py#L86
8+
--color-link: #ad182b;
9+
--color-link-mono: #c93447; // monochromatic
10+
--color-visited-link: #683700;
11+
--color-visited-link-mono: #84531c; // monochromatic
12+
13+
--body-background: white;
14+
--body-font-color: black;
15+
16+
--icon-filter: none;
17+
18+
--hint-color-info: #6bf;
19+
--hint-color-warning: #fd6;
20+
--hint-color-danger: #f66;
21+
}

0 commit comments

Comments
 (0)