Skip to content

Commit 83a91ee

Browse files
committed
Solve 2 axe contrast issues; make menu links fill block
Also add commented out code to highlight linked headers. Not sure if I like it and if the link target is not before a header the wrong headers gets highlighted.
1 parent 9ec998c commit 83a91ee

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

doc/_static/style.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ a.toc-backref { color: #000000; }
202202
}
203203
.menu > ul > li.current > *
204204
{
205-
background-color:#dddddd;
205+
background-color: #f0f0f0;
206+
border-block-end: solid medium #cccccc;
206207
}
207208

208209
.menu ul li:first-child { margin-top:0;}
@@ -235,9 +236,15 @@ a.toc-backref { color: #000000; }
235236
border-top: none;
236237
}
237238

239+
/* make submenu items clickable cross whole width of menu */
240+
.menu ul ul > li > a {
241+
display: block;
242+
}
243+
238244
.menu ul li.toctree-l2.current {
239-
background-color: #dddddd;
240-
pading-block: 0.25em;
245+
background-color: #f0f0f0;
246+
border-inline-start: solid 2px rgb(220, 0, 0);
247+
padding-block: 1em;
241248
}
242249

243250
/* related */
@@ -459,3 +466,13 @@ div.file_insert { /* use to insert COPYING into license.txt */
459466
background: #f3f1cc;
460467
padding-inline: 0.5em;
461468
}
469+
470+
/* consider highlighting header element that is a target */
471+
/*
472+
:target > :is(h1,h2,h3,h4,h5,h6) {
473+
background: rgb(254, 227, 227);
474+
outline: rgb(254, 227, 227) solid 3px;
475+
padding: 0.3em;
476+
}
477+
*/
478+

website/www/_static/style.css

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ a.toc-backref { color: #000000; }
202202
}
203203
.menu > ul > li.current > *
204204
{
205-
background-color:#dddddd;
205+
background-color: #f0f0f0;
206+
border-block-end: solid medium #cccccc;
206207
}
207208

208209
.menu ul li:first-child { margin-top:0;}
@@ -235,9 +236,15 @@ a.toc-backref { color: #000000; }
235236
border-top: none;
236237
}
237238

239+
/* make submenu items clickable cross whole width of menu */
240+
.menu ul ul > li > a {
241+
display: block;
242+
}
243+
238244
.menu ul li.toctree-l2.current {
239-
background-color: #dddddd;
240-
pading-block: 0.25em;
245+
background-color: #f0f0f0;
246+
border-inline-start: solid 2px rgb(220, 0, 0);
247+
padding-block: 1em;
241248
}
242249

243250
/* related */
@@ -460,6 +467,15 @@ div.file_insert { /* use to insert COPYING into license.txt */
460467
padding-inline: 0.5em;
461468
}
462469

470+
/* consider highlighting header element that is a target */
471+
/*
472+
:target > :is(h1,h2,h3,h4,h5,h6) {
473+
background: rgb(254, 227, 227);
474+
outline: rgb(254, 227, 227) solid 3px;
475+
padding: 0.3em;
476+
}
477+
*/
478+
463479
/* website only */
464480
/* assume desktop reader for local html files, also no contact
465481
page for local doc files */

0 commit comments

Comments
 (0)