mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
a11y: improve outline style for menu controls #581
This commit is contained in:
parent
277340e491
commit
75cdd546e0
5 changed files with 70 additions and 71 deletions
|
@ -70,10 +70,10 @@
|
||||||
<div id="prefooter" class="footerLangSwitch footerVariantSwitch footerVisitedLinks{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}">
|
<div id="prefooter" class="footerLangSwitch footerVariantSwitch footerVisitedLinks{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="select-language-container" class="footerLangSwitch{{if $showlangswitch}} showLangSwitch{{end}}">
|
<li id="select-language-container" class="footerLangSwitch{{if $showlangswitch}} showLangSwitch{{end}}">
|
||||||
<div class="padding select-container">
|
<div class="padding menu-control">
|
||||||
<i class="fas fa-language fa-fw"></i>
|
<i class="fas fa-language fa-fw"></i>
|
||||||
<span> </span>
|
<span> </span>
|
||||||
<div class="select-style">
|
<div class="control-style">
|
||||||
<label class="a11y-only" for="select-language">{{ T "Language" }}</label>
|
<label class="a11y-only" for="select-language">{{ T "Language" }}</label>
|
||||||
<select id="select-language" onchange="location = baseUri + this.value;">
|
<select id="select-language" onchange="location = baseUri + this.value;">
|
||||||
{{- $page := .Page }}
|
{{- $page := .Page }}
|
||||||
|
@ -92,14 +92,14 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li id="select-variant-container" class="footerVariantSwitch{{if $showvariantswitch}} showVariantSwitch{{end}}">
|
<li id="select-variant-container" class="footerVariantSwitch{{if $showvariantswitch}} showVariantSwitch{{end}}">
|
||||||
<div class="padding select-container">
|
<div class="padding menu-control">
|
||||||
<i class="fas fa-paint-brush fa-fw"></i>
|
<i class="fas fa-paint-brush fa-fw"></i>
|
||||||
<span> </span>
|
<span> </span>
|
||||||
<div class="select-style">
|
<div class="control-style">
|
||||||
<label class="a11y-only" for="select-variant">{{ T "Theme" }}</label>
|
<label class="a11y-only" for="select-variant">{{ T "Theme" }}</label>
|
||||||
<select id="select-variant" onchange="window.variants && variants.changeVariant( this.value );">
|
<select id="select-variant" onchange="window.variants && variants.changeVariant( this.value );">
|
||||||
{{- $firstvariant := true }}
|
{{- $firstvariant := true }}
|
||||||
|
@ -115,11 +115,20 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>window.variants && variants.markSelectedVariant();</script>
|
<script>window.variants && variants.markSelectedVariant();</script>
|
||||||
</li>
|
</li>
|
||||||
<li class="footerVisitedLinks{{if $showvisitedlinks}} showVisitedLinks{{end}}"><button class="padding" onclick="clearHistory();"><i class="fas fa-history fa-fw"></i><span> </span>{{ T "Clear-History" }}</button></li>
|
<li class="footerVisitedLinks{{if $showvisitedlinks}} showVisitedLinks{{end}}">
|
||||||
|
<div class="padding menu-control">
|
||||||
|
<i class="fas fa-history fa-fw"></i>
|
||||||
|
<span> </span>
|
||||||
|
<div class="control-style">
|
||||||
|
<button onclick="clearHistory();">{{ T "Clear-History" }}</button>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" class="footerFooter{{if $showfooter}} showFooter{{end}}">
|
<div id="footer" class="footerFooter{{if $showfooter}} showFooter{{end}}">
|
||||||
|
|
|
@ -155,11 +155,11 @@
|
||||||
.anchor {
|
.anchor {
|
||||||
margin-left: .66em;
|
margin-left: .66em;
|
||||||
}
|
}
|
||||||
html[dir="rtl"] .select-container i,
|
html[dir="rtl"] .menu-control i,
|
||||||
html[dir="rtl"] .select-container span {
|
html[dir="rtl"] .menu-control span {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.footerVisitedLinks > * {
|
.menu-control > button {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.searchform input {
|
.searchform input {
|
||||||
|
@ -214,7 +214,6 @@
|
||||||
font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; /* var(--MAIN-font) */
|
font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; /* var(--MAIN-font) */
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerVisitedLinks > *,
|
|
||||||
a,
|
a,
|
||||||
.anchor,
|
.anchor,
|
||||||
#toc-menu,
|
#toc-menu,
|
||||||
|
@ -262,17 +261,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar .collapsible-menu label,
|
#sidebar .collapsible-menu label,
|
||||||
#sidebar .select-container,
|
#sidebar .menu-control,
|
||||||
#sidebar a,
|
#sidebar a {
|
||||||
#sidebar button {
|
|
||||||
color: rgba( 186, 186, 186, 1 ); /* var(--MENU-SECTIONS-LINK-color) */
|
color: rgba( 186, 186, 186, 1 ); /* var(--MENU-SECTIONS-LINK-color) */
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar select:hover,
|
#sidebar select:hover,
|
||||||
#sidebar .collapsible-menu li:not(.active) > label:hover,
|
#sidebar .collapsible-menu li:not(.active) > label:hover,
|
||||||
#sidebar .select-container:hover,
|
#sidebar .menu-control:hover,
|
||||||
#sidebar a:hover,
|
#sidebar a:hover {
|
||||||
#sidebar button:hover {
|
|
||||||
color: rgba( 255, 255, 255, 1 ); /* var(--MENU-SECTIONS-LINK-HOVER-color) */
|
color: rgba( 255, 255, 255, 1 ); /* var(--MENU-SECTIONS-LINK-HOVER-color) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -828,7 +825,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-style select::-ms-expand {
|
.menu-control select::-ms-expand {
|
||||||
/* hide the triangle */
|
/* hide the triangle */
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,9 +174,8 @@ body .searchbox span:hover {
|
||||||
|
|
||||||
body #sidebar select:hover,
|
body #sidebar select:hover,
|
||||||
body #sidebar .collapsible-menu li:not(.active) > label:hover,
|
body #sidebar .collapsible-menu li:not(.active) > label:hover,
|
||||||
body #sidebar .select-container:hover,
|
body #sidebar .menu-control:hover,
|
||||||
body #sidebar a:hover,
|
body #sidebar a:hover {
|
||||||
body #sidebar button:hover {
|
|
||||||
color: rgba( 255, 255, 255, 1 );
|
color: rgba( 255, 255, 255, 1 );
|
||||||
text-shadow:
|
text-shadow:
|
||||||
0 0 1px rgba( 255, 255, 255, 1 ),
|
0 0 1px rgba( 255, 255, 255, 1 ),
|
||||||
|
|
|
@ -1456,57 +1456,64 @@ h6 a {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-container i {
|
.menu-control .control-style {
|
||||||
padding-top: .25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-container i,
|
|
||||||
.select-container span {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
html[dir="rtl"] .select-container i,
|
|
||||||
html[dir="rtl"] .select-container span {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar ul select {
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-style {
|
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
cursor: pointer;
|
||||||
height: 1.574em;
|
height: 1.574em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-style select {
|
.menu-control i {
|
||||||
-webkit-appearance: none;
|
padding-top: .25em;
|
||||||
appearance: none;
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
background-color: transparent;
|
|
||||||
background-image: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-style select:focus {
|
.menu-control i,
|
||||||
outline: none;
|
.menu-control span {
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
html[dir="rtl"] .menu-control i,
|
||||||
|
html[dir="rtl"] .menu-control span {
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-style :hover {
|
.menu-control :hover,
|
||||||
|
.menu-control i:hover,
|
||||||
|
.menu-control span:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-style option {
|
.menu-control select,
|
||||||
|
.menu-control button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.menu-control select {
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: none;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-control option {
|
||||||
color: rgba( 0, 0, 0, 1 );
|
color: rgba( 0, 0, 0, 1 );
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-clear {
|
.menu-control button {
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1524,16 +1531,6 @@ html[dir="rtl"] .select-container span {
|
||||||
display: initial;
|
display: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerVisitedLinks > * {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
background: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
text-align: start;
|
|
||||||
text-decoration: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 48rem) {
|
@media screen and (max-width: 48rem) {
|
||||||
#breadcrumbs .links {
|
#breadcrumbs .links {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -10,7 +10,6 @@ body {
|
||||||
font-family: var(--INTERNAL-MAIN-font);
|
font-family: var(--INTERNAL-MAIN-font);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerVisitedLinks > *,
|
|
||||||
a,
|
a,
|
||||||
.anchor,
|
.anchor,
|
||||||
#toc-menu,
|
#toc-menu,
|
||||||
|
@ -51,17 +50,15 @@ a:hover,
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar .collapsible-menu label,
|
#sidebar .collapsible-menu label,
|
||||||
#sidebar .select-container,
|
#sidebar .menu-control,
|
||||||
#sidebar a,
|
#sidebar a {
|
||||||
#sidebar button {
|
|
||||||
color: var(--INTERNAL-MENU-SECTIONS-LINK-color);
|
color: var(--INTERNAL-MENU-SECTIONS-LINK-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar select:hover,
|
#sidebar select:hover,
|
||||||
#sidebar .collapsible-menu li:not(.active) > label:hover,
|
#sidebar .collapsible-menu li:not(.active) > label:hover,
|
||||||
#sidebar .select-container:hover,
|
#sidebar .menu-control:hover,
|
||||||
#sidebar a:hover,
|
#sidebar a:hover {
|
||||||
#sidebar button:hover {
|
|
||||||
color: var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color);
|
color: var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue