fix: contain CHRNX theme controls

This commit is contained in:
chrnx committed 2026-08-12 08:03:54 -05:00
1 parent 01e7fa62bd
commit fa422fdab9
2 files changed
+138 -13

No files matched your search

+30 -13
View File
@@ -401,13 +401,7 @@ html[data-theme="light"] footer.wp-block-template-part {
}
.chrnx-navigation-enhanced .chrnx-theme-control {
position: relative;
z-index: 2;
display: flex;
grid-row: 1;
grid-column: 3;
width: 45px;
height: 45px;
display: contents;
}
.chrnx-theme-control > [data-chrnx-theme-button] {
@@ -423,19 +417,25 @@ html[data-theme="light"] footer.wp-block-template-part {
cursor: pointer;
}
.chrnx-navigation-enhanced .chrnx-theme-control > [data-chrnx-theme-button] {
z-index: 2;
grid-row: 1;
grid-column: 3;
}
.chrnx-theme-control > [data-chrnx-theme-button][hidden],
.chrnx-navigation-enhanced .chrnx-theme-toggle[hidden] {
display: none;
}
.chrnx-navigation-enhanced .chrnx-theme-toggle {
position: absolute;
top: calc(100% + 0.25rem);
right: 0;
z-index: 1;
z-index: 2;
grid-row: 2;
grid-column: 1 / -1;
justify-self: end;
flex-wrap: wrap;
width: max-content;
max-width: calc(100vw - 2rem);
width: fit-content;
max-width: 100%;
min-width: 0;
height: auto;
padding: 0.5rem;
@@ -451,8 +451,25 @@ html[data-theme="light"] footer.wp-block-template-part {
.chrnx-navigation-enhanced .chrnx-theme-toggle label {
flex: 1 1 auto;
min-width: 44px;
min-height: 44px;
white-space: normal;
}
html[data-theme="light"] .chrnx-header-search button:focus-visible,
html[data-theme="light"] .chrnx-theme-control > [data-chrnx-theme-button]:focus-visible,
html[data-theme="light"] .chrnx-mobile-menu-toggle:focus-visible {
outline-color: var(--wp--preset--color--light-green);
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) .chrnx-header-search button:focus-visible,
:root:not([data-theme]) .chrnx-theme-control > [data-chrnx-theme-button]:focus-visible,
:root:not([data-theme]) .chrnx-mobile-menu-toggle:focus-visible {
outline-color: var(--wp--preset--color--light-green);
}
}
}
@media (prefers-reduced-motion: reduce) {