1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

MenuBar: Add fallback value to breakpoint-plus-one and ... (#5009)

* Add fallback value to breakpoint-plus-one and ...

... sidebarbreakpoint-minus-one in case that widths aren't given in px units

* Update styles.tid
This commit is contained in:
Simon Huber 2020-11-08 23:38:08 +01:00 committed by GitHub
parent 519ce3e89d
commit 343207fc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,11 @@ title: $:/plugins/tiddlywiki/menubar/styles
tags: [[$:/tags/Stylesheet]]
\define breakpoint-plus-one()
<$text text={{{ [{$:/config/plugins/menubar/breakpoint}removesuffix[px]add[1]addsuffix[px]] }}} />
<$text text={{{ [{$:/config/plugins/menubar/breakpoint}removesuffix[px]add[1]addsuffix[px]] ~[{$:/config/plugins/menubar/breakpoint}] }}} />
\end
\define sidebarbreakpoint-minus-one()
<$text text={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}removesuffix[px]subtract[1]addsuffix[px]] }}} />
<$text text={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}removesuffix[px]subtract[1]addsuffix[px]] ~[{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}] }}} />
\end
\define set-sidebar-scrollable-top-if-hamburger()
@ -61,7 +61,7 @@ nav.tc-menubar ul.tc-menubar-list {
<<box-shadow "1px 1px 5px rgba(0, 0, 0, 0.3)">>
}
@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
@media (max-width: <<sidebarbreakpoint-minus-one>>) {
html nav.tc-menubar ul.tc-menubar-list {
padding: 0 0 0 8px;