Obsidian-Code-Styler
Obsidian-Code-Styler copied to clipboard
Bug: [STYLES] Some selectors in styles kill the performance when dragging an article between folders/other articles
Some selectors in styles kill the performance when dragging an article between folders/other articles
Describe the bug
I found selectors/styles that introduce these problems 1)
.code-styler pre.code-styler-pre code:not(:has(> input[style*="display: inline;"])):active {
--line-wrapping: var(--line-active-wrapping) !important;
}
pre.code-styler-pre div > [class*=code-styler-line-number],
.markdown-source-view div[class*=HyperMD-codeblock] > [class*=code-styler-line-number] {
width: var(--line-number-gutter-width);
min-width: var(--line-number-gutter-min-width);
padding-right: 8px;
padding-left: calc(4px + var(--language-border-width));
background-color: var(--code-styler-gutter-background-colour);
color: var(--code-styler-gutter-text-colour);
font-family: var(--font-monospace);
font-size: var(--code-size);
text-align: right;
user-select: none;
}
.HyperMD-codeblock:has(> .cm-widgetBuffer) > .cm-hmd-codeblock {
white-space: break-spaces;
}
If I comment out these styles, everything works fast again
Steps to reproduce
Take a file/folder and start moving it around the sidebar
Expected behaviour
Moving a file/folder across the sidebar will not cause freezes
Current behaviour
It's freezes
Environment
- Plugin Version: 1.1.7
- Obsidian Version: 1.5.8
- Platform: Desktop
- OS: MacOS Sonoma 14.0
- Theme: Default Theme
- CSS Snippets: No