1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-23 15:36:52 +00:00

use slideropacity metrics everywhere

This commit is contained in:
BurningTreeC 2024-11-12 21:23:38 +01:00
parent 3c56f68445
commit b0cced5cc6
2 changed files with 24 additions and 2 deletions

View File

@ -10,6 +10,8 @@ title: $:/core/ui/EditTemplate/body/default
\function get.slider.condition() [<get.edit-preview-state>match[yes]] :else[[no]]
\function resizer.state.tiddler() [[$:/state/resizing/editor-preview-]addsuffix<identifier>]
\define config-visibility-title()
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\end

View File

@ -89,7 +89,7 @@ code-body: yes
}
.tc-sidebar-resizer.tc-main-sidebar-resizer:hover {
opacity: 0.1;
opacity: <<get.theme.metric slideropacity>>;
}
}
@ -98,7 +98,7 @@ code-body: yes
@media (pointer: coarse) {
.tc-sidebar-resizer.tc-main-sidebar-resizer {
opacity: 0.25;
opacity: min(calc(3 * <<get.theme.metric slideropacity>>),1);
}
}
@ -182,6 +182,18 @@ div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
width: <<get.theme.metric previewsliderwidth>>;
}
@media (pointer: coarse) {
div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
background-color: <<colour muted-foreground>>;
}
div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer):hover {
opacity: <<get.theme.metric slideropacityhover>>;
}
}
<$list filter="[all[tiddlers]prefix[$:/state/resizer/previewwidth-]]" variable="previewWidthTiddler">
<$let
@ -196,6 +208,14 @@ div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
left: calc(100% - <<width>> - <<get.theme.metric previewsliderwidth>>);
}
<%if [[$:/state/resizing/editor-preview-]addsuffix<identifier>is[tiddler]] %>
div.tc-sidebar-resizer.tc-sidebar-resizer-identified-<<identifier>> {
opacity: min(calc(3 * <<get.theme.metric slideropacity>>),1);
}
<% endif %>
<%if [<width>compare:number:lteq[1]] %>
.tc-tiddler-preview-preview-identified-<<identifier>> {