mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
menu: use --MENU-WIDTH-S to adjust mobile flyout #761
This commit is contained in:
parent
df39abcbc9
commit
cc97ab0600
4 changed files with 10 additions and 3 deletions
|
@ -129,10 +129,11 @@ The menu width adjusts automatically for different screen sizes.
|
||||||
|
|
||||||
The values for the screen width breakpoints aren't configurable.
|
The values for the screen width breakpoints aren't configurable.
|
||||||
|
|
||||||
If you want to adjust the menu width you can define the following CSS variables in your `custom-header.html`. Note that `--MENU-WIDTH-S` doesn't exist as the menu is always hidden for small screen sizes.
|
If you want to adjust the menu width you can define the following CSS variables in your `custom-header.html`. Note that `--MENU-WIDTH-S` applies to the menu flyout width in mobile mode for small screen sizes.
|
||||||
|
|
||||||
````css
|
````css
|
||||||
:root {
|
:root {
|
||||||
|
--MENU-WIDTH-S: 14.375rem;
|
||||||
--MENU-WIDTH-M: 14.375rem;
|
--MENU-WIDTH-M: 14.375rem;
|
||||||
--MENU-WIDTH-L: 18.75rem;
|
--MENU-WIDTH-L: 18.75rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ This document shows you what's new in the latest release and flags it with one o
|
||||||
|
|
||||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} On taxonomy and term pages you can now use prev/next navigation as within the normal page structure.
|
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} On taxonomy and term pages you can now use prev/next navigation as within the normal page structure.
|
||||||
|
|
||||||
|
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} In additiion to the existing [menu width customization](basics/customization#change-the-menu-width), it is now alsow possible to set the width of the menu flyout for for small screen sizes with the `--MENU-WIDTH-S` CSS property.
|
||||||
|
|
||||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Improvements for accessibility when tabbing thru the page for images, links and tab handles.
|
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Improvements for accessibility when tabbing thru the page for images, links and tab handles.
|
||||||
|
|
||||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes [config](basics/configuration) and [frontmatter](cont/frontmatter) options received a comprehensive documentation update. In addition the theme switched from `config.toml` to `hugo.toml`.
|
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes [config](basics/configuration) and [frontmatter](cont/frontmatter) options received a comprehensive documentation update. In addition the theme switched from `config.toml` to `hugo.toml`.
|
||||||
|
|
|
@ -1158,7 +1158,10 @@ html[dir="rtl"] .topbar-button-next i {
|
||||||
@media screen and (max-width: 47.999rem) {
|
@media screen and (max-width: 47.999rem) {
|
||||||
/* we don't support sidebar flyout in mobile */
|
/* we don't support sidebar flyout in mobile */
|
||||||
.mobile-support #R-sidebar {
|
.mobile-support #R-sidebar {
|
||||||
inset-inline-start: calc( -1 * var(--INTERNAL-MENU-WIDTH-M) );
|
inset-inline-start: calc( -1 * var(--INTERNAL-MENU-WIDTH-S) );
|
||||||
|
min-width: var(--INTERNAL-MENU-WIDTH-S);
|
||||||
|
max-width: var(--INTERNAL-MENU-WIDTH-S);
|
||||||
|
width: var(--INTERNAL-MENU-WIDTH-S);
|
||||||
}
|
}
|
||||||
.mobile-support #navshow{
|
.mobile-support #navshow{
|
||||||
display: inline;
|
display: inline;
|
||||||
|
@ -1179,7 +1182,7 @@ html[dir="rtl"] .topbar-button-next i {
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
}
|
}
|
||||||
.mobile-support.sidebar-flyout #R-body {
|
.mobile-support.sidebar-flyout #R-body {
|
||||||
margin-inline-start: var(--INTERNAL-MENU-WIDTH-M);
|
margin-inline-start: var(--INTERNAL-MENU-WIDTH-S);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.mobile-support.sidebar-flyout #R-body-overlay{
|
.mobile-support.sidebar-flyout #R-body-overlay{
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
--INTERNAL-PRINT-OPENAPI-theme: var(--PRINT-OPENAPI-theme, var(--PRINT-SWAGGER-theme, light));
|
--INTERNAL-PRINT-OPENAPI-theme: var(--PRINT-OPENAPI-theme, var(--PRINT-SWAGGER-theme, light));
|
||||||
--INTERNAL-PRINT-OPENAPI-CODE-theme: var(--PRINT-OPENAPI-CODE-theme, idea);
|
--INTERNAL-PRINT-OPENAPI-CODE-theme: var(--PRINT-OPENAPI-CODE-theme, idea);
|
||||||
|
|
||||||
|
--INTERNAL-MENU-WIDTH-S: var(--MENU-WIDTH-S, 14.375rem);
|
||||||
--INTERNAL-MENU-WIDTH-M: var(--MENU-WIDTH-M, 14.375rem);
|
--INTERNAL-MENU-WIDTH-M: var(--MENU-WIDTH-M, 14.375rem);
|
||||||
--INTERNAL-MENU-WIDTH-L: var(--MENU-WIDTH-L, 18.75rem);
|
--INTERNAL-MENU-WIDTH-L: var(--MENU-WIDTH-L, 18.75rem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue