I use <<sidebarbreakpoint>>
in my themes to detact mobile size screen (including small sized desktop window, like TidGi-Desktop’s menubar small window)
For example:
\import [[$:/themes/tiddlywiki/vanilla/base]]
\rules except horizrule dash
@media (min-width: <<sidebarbreakpoint>>) {
.tc-sidebar-scrollable {
padding: 40px 10px 0px 15px;
}
}
@media (max-width: <<sidebarbreakpoint>>) {
.tc-sidebar-header {
margin-top: 20px;
/** fix mobile left side still have width after close */
padding-left: 0;
padding-right: 0;
}
.tc-sidebar-header > .tc-reveal {
padding-left: 10px;
padding-right: 10px;
}
/** solve collision with tc-sidebar-scrollable in mobile */
.tc-topbar {
z-index: 1002;
}
}
What do you think? Its name “sidebarxxx” indicate that it is not originally designed for this scenario, and you need \import [[$:/themes/tiddlywiki/vanilla/base]]
to use it, and \rules except horizrule dash
to prevent -
in css variable broken.