fix: Width transition on manually resizing sections (#759)
This commit is contained in:
@@ -25,6 +25,8 @@ import {
|
|||||||
import { FocusModeSwitch } from './FocusModeSwitch';
|
import { FocusModeSwitch } from './FocusModeSwitch';
|
||||||
import { ThemesMenuButton } from './ThemesMenuButton';
|
import { ThemesMenuButton } from './ThemesMenuButton';
|
||||||
|
|
||||||
|
const focusModeAnimationDuration = 1255;
|
||||||
|
|
||||||
const MENU_CLASSNAME =
|
const MENU_CLASSNAME =
|
||||||
'sn-menu-border sn-dropdown min-w-80 max-h-120 max-w-xs flex flex-col py-2 overflow-y-auto';
|
'sn-menu-border sn-dropdown min-w-80 max-h-120 max-w-xs flex flex-col py-2 overflow-y-auto';
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ const toggleFocusMode = (enabled: boolean) => {
|
|||||||
document.body.classList.remove('focus-mode');
|
document.body.classList.remove('focus-mode');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.body.classList.remove('disable-focus-mode');
|
document.body.classList.remove('disable-focus-mode');
|
||||||
}, 315);
|
}, focusModeAnimationDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
.section.tags,
|
|
||||||
.section.notes {
|
|
||||||
transition: width 1.25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.focus-mode {
|
.focus-mode {
|
||||||
.mac-desktop #editor-column {
|
.mac-desktop #editor-column {
|
||||||
// To offset colored circles in Mac
|
// To offset colored circles in Mac
|
||||||
@@ -44,6 +39,7 @@
|
|||||||
.section.notes {
|
.section.notes {
|
||||||
will-change: opacity;
|
will-change: opacity;
|
||||||
animation: fade-out 1.25s forwards;
|
animation: fade-out 1.25s forwards;
|
||||||
|
transition: width 1.25s;
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
width: 0px !important;
|
width: 0px !important;
|
||||||
flex: none !important;
|
flex: none !important;
|
||||||
@@ -63,6 +59,7 @@
|
|||||||
.disable-focus-mode {
|
.disable-focus-mode {
|
||||||
.section.tags,
|
.section.tags,
|
||||||
.section.notes {
|
.section.notes {
|
||||||
|
transition: width 1.25s;
|
||||||
will-change: opacity;
|
will-change: opacity;
|
||||||
animation: fade-in 1.25s forwards;
|
animation: fade-in 1.25s forwards;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user