ENH Improve accessibility of docs styling

This commit is contained in:
Guy Sartorelli 2022-08-04 16:11:08 +12:00
parent 691e55c0a4
commit 3f73dd0583
3 changed files with 26 additions and 29 deletions

View File

@ -14,9 +14,10 @@
.nav-link {
display: block;
padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: none;
@include hover-focus {
text-decoration: none;
text-decoration: underline;
}
// Disabled state lightens text

View File

@ -13,6 +13,10 @@ h1, h2, h3, h4, h5, h6 {
font-family: 'Poppins', sans-serif;
color: $theme-text-color-primary;
font-weight: 600;
code[class*="language-"] {
font-size: 0.8em;
}
}
code {
@ -59,16 +63,27 @@ code {
border-bottom-color: darken($theme-bg-light, 5%);
}
a.theme-link {
color: $theme-text-color-primary;
a {
text-decoration: underline;
-webkit-text-decoration-color: rgba($theme-text-color-primary,0.3);
text-decoration-color: rgba($theme-text-color-primary,0.3);
&:hover {
color: $theme-color-primary;
-webkit-text-decoration-color: rgba($theme-color-primary,0.8);
text-decoration-color: rgba($theme-color-primary,0.8);
}
&:hover {
text-decoration: none;
}
&.theme-link {
color: $theme-text-color-primary;
-webkit-text-decoration-color: rgba($theme-text-color-primary,0.3);
text-decoration-color: rgba($theme-text-color-primary,0.3);
&:hover {
color: $theme-color-primary;
-webkit-text-decoration-color: rgba($theme-color-primary,0.8);
text-decoration-color: rgba($theme-color-primary,0.8);
}
}
&.btn {
text-decoration: none;
}
}
.btn {

View File

@ -172,11 +172,6 @@
.section-title {
font-size: 1rem;
margin-bottom: 1rem;
a {
&:hover {
text-decoration: none;
}
}
}
.section-items {
font-size: 0.875rem;
@ -207,7 +202,6 @@
color: $theme-color-primary;
&:before {
background-color: $theme-color-primary;
}
.theme-icon-holder {
color: #fff;
@ -267,7 +261,6 @@
margin-bottom: 0;
}
}
}
.anchor {
@ -275,18 +268,6 @@
margin-left: 1rem;
opacity: 0;
transition: opacity .2s;
/* Force anchor link to offset header */
margin-top: -90px;
padding-top: 90px;
&:focus {
opacity: 1;
/* Outline behaves incorrectly due to offset, use underline instead */
outline: none;
text-decoration: underline;
}
}
:hover > .anchor {
opacity: 1;