style: compact the CHRNX mobile header
This commit is contained in:
2 files changed
+337
-11
No files matched your search
+126
-5
@@ -311,26 +311,147 @@ html[data-theme="light"] footer.wp-block-template-part {
|
||||
|
||||
@media (max-width: 599px) {
|
||||
|
||||
.chrnx-site-header__inner {
|
||||
display: grid !important;
|
||||
grid-template-columns: minmax(0, 1fr) repeat(3, 45px);
|
||||
gap: 0.25rem;
|
||||
align-items: start;
|
||||
padding-block: 0.75rem;
|
||||
}
|
||||
|
||||
.chrnx-site-brand {
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chrnx-site-brand img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.chrnx-mobile-menu-toggle {
|
||||
margin-left: auto;
|
||||
grid-row: 1;
|
||||
grid-column: 4;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation {
|
||||
order: 3;
|
||||
grid-column: 1 / -1;
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.chrnx-navigation-enhanced .chrnx-primary-navigation {
|
||||
grid-row: 2;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.chrnx-primary-navigation ul {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.chrnx-header-search {
|
||||
order: 4;
|
||||
display: grid;
|
||||
grid-template-rows: 45px auto;
|
||||
grid-template-columns: minmax(0, 1fr) repeat(3, 45px);
|
||||
grid-column: 1 / -1;
|
||||
gap: 0.25rem;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.chrnx-theme-toggle {
|
||||
order: 5;
|
||||
.chrnx-navigation-enhanced .chrnx-header-search {
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.chrnx-header-search-row {
|
||||
display: flex;
|
||||
grid-row: 2;
|
||||
grid-column: 1 / -1;
|
||||
width: 100%;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.chrnx-header-search-row[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.chrnx-header-search input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chrnx-header-search button {
|
||||
grid-row: 1;
|
||||
grid-column: 2;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
padding: 0;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.chrnx-theme-control {
|
||||
grid-column: 1 / -1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.chrnx-navigation-enhanced .chrnx-theme-control {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
grid-row: 1;
|
||||
grid-column: 3;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.chrnx-theme-control > [data-chrnx-theme-button] {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
padding: 0;
|
||||
border: 1px solid currentcolor;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.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;
|
||||
flex-wrap: wrap;
|
||||
width: max-content;
|
||||
max-width: calc(100vw - 2rem);
|
||||
min-width: 0;
|
||||
height: auto;
|
||||
padding: 0.5rem;
|
||||
border: 1px solid currentcolor;
|
||||
border-radius: 0.35rem;
|
||||
background: var(--wp--preset--color--panel);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
html[data-theme="light"].chrnx-navigation-enhanced .chrnx-theme-toggle {
|
||||
background: var(--wp--preset--color--surface);
|
||||
}
|
||||
|
||||
.chrnx-navigation-enhanced .chrnx-theme-toggle label {
|
||||
flex: 1 1 auto;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user