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 { .nav-link {
display: block; display: block;
padding: $nav-link-padding-y $nav-link-padding-x; padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: none;
@include hover-focus { @include hover-focus {
text-decoration: none; text-decoration: underline;
} }
// Disabled state lightens text // Disabled state lightens text

View File

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

View File

@ -172,11 +172,6 @@
.section-title { .section-title {
font-size: 1rem; font-size: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
a {
&:hover {
text-decoration: none;
}
}
} }
.section-items { .section-items {
font-size: 0.875rem; font-size: 0.875rem;
@ -207,7 +202,6 @@
color: $theme-color-primary; color: $theme-color-primary;
&:before { &:before {
background-color: $theme-color-primary; background-color: $theme-color-primary;
} }
.theme-icon-holder { .theme-icon-holder {
color: #fff; color: #fff;
@ -267,7 +261,6 @@
margin-bottom: 0; margin-bottom: 0;
} }
} }
} }
.anchor { .anchor {
@ -275,18 +268,6 @@
margin-left: 1rem; margin-left: 1rem;
opacity: 0; opacity: 0;
transition: opacity .2s; 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 { :hover > .anchor {
opacity: 1; opacity: 1;