fix: harden CHRNX shell accessibility
This commit is contained in:
14 files changed
+520
-54
No files matched your search
+91
-11
@@ -14,6 +14,27 @@ html[data-theme="light"] h6 {
|
||||
color: var(--wp--preset--color--ink);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
|
||||
:root:not([data-theme]) {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
:root:not([data-theme]) body {
|
||||
background: var(--wp--preset--color--paper);
|
||||
color: var(--wp--preset--color--ink);
|
||||
}
|
||||
|
||||
:root:not([data-theme]) h1,
|
||||
:root:not([data-theme]) h2,
|
||||
:root:not([data-theme]) h3,
|
||||
:root:not([data-theme]) h4,
|
||||
:root:not([data-theme]) h5,
|
||||
:root:not([data-theme]) h6 {
|
||||
color: var(--wp--preset--color--ink);
|
||||
}
|
||||
}
|
||||
|
||||
header.wp-block-template-part {
|
||||
position: sticky;
|
||||
z-index: 100;
|
||||
@@ -28,6 +49,14 @@ html[data-theme="light"] header.wp-block-template-part {
|
||||
border-bottom-color: var(--wp--preset--color--border);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
|
||||
:root:not([data-theme]) header.wp-block-template-part {
|
||||
background: color-mix(in srgb, var(--wp--preset--color--paper) 94%, transparent);
|
||||
border-bottom-color: var(--wp--preset--color--border);
|
||||
}
|
||||
}
|
||||
|
||||
.chrnx-site-header__inner,
|
||||
.chrnx-site-footer__inner {
|
||||
gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
|
||||
@@ -36,6 +65,13 @@ html[data-theme="light"] header.wp-block-template-part {
|
||||
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
|
||||
}
|
||||
|
||||
.chrnx-site-footer__inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.chrnx-skip-link {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
@@ -64,6 +100,23 @@ html[data-theme="light"] header.wp-block-template-part {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.chrnx-mobile-menu-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 45px;
|
||||
min-height: 45px;
|
||||
padding: 0;
|
||||
border: 1px solid currentcolor;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.chrnx-mobile-menu-toggle[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation a,
|
||||
.chrnx-footer-navigation a,
|
||||
.wp-block-navigation__responsive-container-open,
|
||||
@@ -86,7 +139,7 @@ html[data-theme="light"] header.wp-block-template-part {
|
||||
}
|
||||
|
||||
.chrnx-header-search {
|
||||
width: min(10rem, 100%);
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.chrnx-header-search .wp-block-search__inside-wrapper {
|
||||
@@ -175,19 +228,36 @@ html[data-theme="light"] footer.wp-block-template-part {
|
||||
border-top-color: var(--wp--preset--color--border);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
|
||||
:root:not([data-theme]) footer.wp-block-template-part {
|
||||
border-top-color: var(--wp--preset--color--border);
|
||||
}
|
||||
}
|
||||
|
||||
.chrnx-site-footer__line,
|
||||
.chrnx-site-footer__inner .wp-block-site-title {
|
||||
.chrnx-site-footer__site,
|
||||
.chrnx-site-footer__credit {
|
||||
margin: 0;
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
||||
|
||||
.chrnx-footer-navigation ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--wp--preset--spacing--20);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
@media (max-width: 780px) {
|
||||
|
||||
.chrnx-site-header__inner {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation {
|
||||
.chrnx-primary-navigation-shell {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@@ -205,16 +275,26 @@ html[data-theme="light"] footer.wp-block-template-part {
|
||||
|
||||
@media (max-width: 599px) {
|
||||
|
||||
html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container {
|
||||
display: block;
|
||||
position: static;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
.chrnx-mobile-menu-toggle {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container-open,
|
||||
html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container-close {
|
||||
display: none;
|
||||
.chrnx-primary-navigation-shell {
|
||||
order: 3;
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation .wp-block-navigation__container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.chrnx-header-search {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
.chrnx-theme-toggle {
|
||||
order: 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user