make focused element visible

This commit is contained in:
Rhiannon Morris 2020-08-03 23:06:19 +02:00
parent c2a0ca6680
commit 1b7f8e9af3
5 changed files with 34 additions and 3 deletions

View File

@ -92,7 +92,7 @@ make' nsfw dir info@(Info {date, title, artist}) = [b|@0
makePrefetch (Image {path}) = [b|<link rel=prefetch href=$@path>|]
warning' = ifJust (#warning image0) \w -> [b|@4
<figcaption id=cw>
<figcaption id=cw aria-role=button tabindex=0>
<span id=cw-text>cw: <b>$*w</b></span>
</figcaption>
|]

View File

@ -14,6 +14,9 @@
--text-col: white;
--nsfw-sticker-rotate: 15deg;
--focus-box: 0 0 20px hsl(55deg, 60%, 90%, 80%);
--focus-text: hsl(334deg, 87%, 90%);
font-family: Muller;
font-size: 18pt;
font-weight: 600;
@ -54,8 +57,17 @@ header h1 {
a {
color: inherit;
text-decoration: single underline;
text-decoration-thickness: 2px;
}
a:focus {
outline: none;
color: var(--focus-text);
text-decoration-style: double;
}
footer {
font-weight: 500;
font-size: 80%;
@ -83,7 +95,13 @@ footer {
.buttonbar.choice input {
display: none;
display: inline;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
padding: 0;
width: 0;
}
.buttonbar {
@ -115,6 +133,11 @@ footer {
text-shadow: none;
}
.buttonbar.choice :focus + label,
.buttonbar:not(.choice) li:focus-within {
box-shadow: var(--focus-box);
}
.buttonbar.choice :checked + label {
color: var(--button-bg);
background: var(--text-col);

View File

@ -37,6 +37,10 @@ body {
background: hsl(340, 45%, 65%);
}
.item:focus-within {
box-shadow: var(--focus-box);
}
figure {
margin: 0;

View File

@ -82,7 +82,7 @@ header h1::after {
justify-content: center;
}
.list a {
.list a:not(:focus) {
text-decoration: none;
}

View File

@ -19,6 +19,10 @@ body {
background: hsl(340, 45%, 65%);
}
#mainfig:focus-within {
box-shadow: var(--focus-box);
}
#mainimg {
display: block;
}