Skip to content

Commit 487d28d

Browse files
committed
Minor style fixes
1 parent 023a73b commit 487d28d

3 files changed

Lines changed: 22 additions & 6 deletions

File tree

static/css/layout.css

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,19 +457,19 @@ nav {
457457
color: var(--gray);
458458
}
459459

460-
.insight-page {
460+
.prose {
461461
margin: 0 auto;
462462
width: 75%;
463463
padding-bottom: 3em;
464464
}
465465

466-
.insight-page a {
466+
.prose a {
467467
color: var(--fg);
468468
text-decoration: none;
469469
border-bottom: 1px solid var(--fg);
470470
}
471471

472-
.insight-page a:hover {
472+
.prose a:hover {
473473
color: var(--accent);
474474
border-bottom: 1px solid var(--accent);
475475
}
@@ -683,6 +683,22 @@ pre.prettyprint {
683683
background-color: var(--bg) !important;
684684
}
685685

686+
/* Prettify's default token colors are tuned for light backgrounds and vanish
687+
on the dark theme; supply a legible dark palette so code stays highlighted. */
688+
:root[data-theme="dark"] pre.prettyprint .pln,
689+
:root[data-theme="dark"] pre.prettyprint .pun { color: var(--fg); }
690+
:root[data-theme="dark"] pre.prettyprint .str,
691+
:root[data-theme="dark"] pre.prettyprint .atv { color: #a5d6a7; }
692+
:root[data-theme="dark"] pre.prettyprint .kwd,
693+
:root[data-theme="dark"] pre.prettyprint .tag,
694+
:root[data-theme="dark"] pre.prettyprint .fun { color: #82aaff; }
695+
:root[data-theme="dark"] pre.prettyprint .lit { color: #f78c6c; }
696+
:root[data-theme="dark"] pre.prettyprint .typ,
697+
:root[data-theme="dark"] pre.prettyprint .atn,
698+
:root[data-theme="dark"] pre.prettyprint .dec,
699+
:root[data-theme="dark"] pre.prettyprint .var { color: #c792ea; }
700+
:root[data-theme="dark"] pre.prettyprint .com { color: #8a929b; }
701+
686702
pre p {
687703
margin: 0;
688704
}
@@ -775,7 +791,7 @@ blockquote {
775791
}
776792

777793
.insights-container,
778-
.insight-page,
794+
.prose,
779795
.team-container {
780796
width: 90%;
781797
}

templates/arena.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h2 style="margin: 0 auto;">
4545
<p style="font-size:0.9em; margin-top:0.5em;width:{{ (page.description_width or 50) }}%;">{{page.description}}</p>
4646
</div>
4747

48-
<div style="width: 75%; margin: 0 auto;">
48+
<div class="prose">
4949
<hr style="margin:1.5em auto;"/>
5050
{% if page.split == 'test' %}
5151
<h2>Leaderboard</h2>

templates/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>{{ page.title }}</h2>
1919
<br>
2020
<hr />
2121

22-
<div class="insight-page">
22+
<div class="prose">
2323
{{page.html|safe}}
2424
</div>
2525
{% endblock content %}

0 commit comments

Comments
 (0)