Skip to content

Commit 4f59a51

Browse files
vsalvinolb-
authored andcommitted
Darkmode and layout fixes
1 parent 4188a7f commit 4f59a51

File tree

5 files changed

+53
-7
lines changed

5 files changed

+53
-7
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Tibor Leupold
77
- Coen van der Kamp
88
- Paarth Agarwal
9-
- Vince Salvo
9+
- Vince Salvino
1010
- LB (Ben) Johnston
1111

1212
## Sphinx Typo3 theme

sass/_component_search.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
&:last-child {
9393
padding-bottom: 0;
94-
border-bottom-color: transparent;
94+
border: unset;
9595
}
9696
}
9797

sass/_darkmode.scss

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/// background/foreground overrides, implement the relevant dark mode code in
55
/// the component's scss file.
66

7-
87
// Utilities during light mode.
98
.dark-only {
109
display: none;
@@ -19,6 +18,7 @@ body.theme-dark {
1918
color: $darkmode-color;
2019
background-color: $darkmode-bg;
2120

21+
.btn-link,
2222
a {
2323
color: $darkmode-color;
2424

@@ -67,6 +67,15 @@ body.theme-dark {
6767
color: $darkmode-color-darker;
6868
}
6969

70+
// Quotes
71+
blockquote {
72+
border-color: $darkmode-bg-lighter;
73+
74+
.attribution {
75+
color: $darkmode-color-darker;
76+
}
77+
}
78+
7079
// Search
7180
.autocomplete {
7281
background-color: $darkmode-bg;
@@ -77,6 +86,32 @@ body.theme-dark {
7786
}
7887
}
7988

89+
// Borders
90+
hr,
91+
.border,
92+
.border-top,
93+
.border-right,
94+
.border-bottom,
95+
.border-left,
96+
.search li {
97+
border-color: $darkmode-bg-lighter !important;
98+
border-width: 2px !important;
99+
}
100+
101+
// Tables
102+
table.docutils {
103+
&:not(.field-list) {
104+
border: 0;
105+
@extend .table-dark;
106+
@extend .table-bordered;
107+
@extend .table-striped;
108+
109+
thead {
110+
@extend .thead-dark;
111+
}
112+
}
113+
}
114+
80115
// Re-define light Bootstrap elements.
81116
.btn-light {
82117
color: color-yiq($darkmode-bg-lighter);
@@ -87,7 +122,7 @@ body.theme-dark {
87122
&:focus,
88123
&:focus-within,
89124
&:not(:disabled):not(.disabled):active,
90-
&:not(:disabled):not(.disabled).active, {
125+
&:not(:disabled):not(.disabled).active {
91126
color: color-yiq($primary);
92127
background-color: $primary;
93128
}
@@ -100,7 +135,7 @@ body.theme-dark {
100135
}
101136

102137
.form-control:focus {
103-
box-shadow: 0 0 0 0.2rem rgb(211 211 211 / 50%)
138+
box-shadow: 0 0 0 0.2rem rgb(211 211 211 / 50%);
104139
}
105140

106141
.form-control::placeholder {
@@ -115,4 +150,8 @@ body.theme-dark {
115150
background-color: $darkmode-bg-lighter !important;
116151
}
117152
}
153+
154+
code {
155+
color: $darkmode-code;
156+
}
118157
}

sass/_layout.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ li > p {
1313
*:focus {
1414
outline: 3px solid $focus-outline !important;
1515
outline-offset: 1px;
16+
box-shadow: none;
1617
}

sass/_variables.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ $link-alternate-hover-color: color.adjust(
4141
$lightness: -15%
4242
);
4343

44-
$table-bg: $white;
45-
4644
$yiq-contrasted-threshold: 160;
4745

4846
$focus-outline: #1f7e9a;
4947

48+
// --------------------------------------------------
49+
// Dark mode colors
50+
// --------------------------------------------------
51+
5052
$darkmode-color: rgba(255, 255, 255, 0.8);
5153
$darkmode-color-darker: rgba(255, 255, 255, 0.6);
5254
$darkmode-bg: color.adjust($primary, $lightness: -15%);
@@ -55,6 +57,10 @@ $darkmode-danger: color.adjust($danger, $lightness: -25%);
5557
$darkmode-info: color.adjust($info, $lightness: -15%);
5658
$darkmode-success: color.adjust($success, $lightness: -30%);
5759
$darkmode-warning: color.adjust($warning, $lightness: -18%);
60+
$darkmode-code: #fe587c;
61+
62+
$table-dark-color: $darkmode-color;
63+
$table-dark-bg: $darkmode-bg;
5864

5965
// --------------------------------------------------
6066
// Code Colors

0 commit comments

Comments
 (0)