makemd icon indicating copy to clipboard operation
makemd copied to clipboard

Wrapping files/folders

Open N3C2L opened this issue 1 year ago • 1 comments

I can use this snippet for the native obsidian file explorer to wrap text (useful for displaying long file titles when the sidebar is small):

.workspace-leaf-content[data-type=file-explorer]` .nav-file-title-content, .workspace-leaf-content[data-type=file-explorer] .nav-folder-title-content { display: inline-block; overflow-wrap: anywhere; overflow: hidden; border-left: solid 0.1px; white-space: normal; text-overflow: ellipsis; border-bottom: solid 0.1px; }

But if I reuse this snippet for the make.md classes, it's not wrapping correctly:

.mk-tree-text { display: inline-block; overflow-wrap: anywhere; overflow: hidden; border-left: solid 0.1px; white-space: normal; text-overflow: ellipsis; border-bottom: solid 0.1px; }

@jp-cen Can you help me here, please?

N3C2L avatar Apr 29 '24 10:04 N3C2L

Text wrapping most likely won't work well due to the list being optimized and having precalculated heights. You can always work with the existing row height.

However, here's a snippet if you want to try, the row size won't auto adjust. You can either increase the height for all rows or reduce the text size.

.mk-tree-text { overflow: visible; display: flex; max-width: 100%; white-space: break-spaces; }

jp-cen avatar Apr 30 '24 00:04 jp-cen