Skip to content

Commit

Permalink
🐛 Fix collapsed link in CM6 source mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Jan 6, 2022
1 parent 1b287ba commit 03c78fd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
15 changes: 12 additions & 3 deletions obsidian.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ settings:
default: false
-
id: ebullientworks-hide-inactive-collapse-indicators
title: Hide collapse indicators when not hovered or active
description: If true, hide collapse indicators in all three modes when not hovered or active.
title: Hide collapse indicators unless hovered or active
description: If true, hide collapse indicators in all three modes unless they are hovered over or the line is active.
type: class-toggle
default: false
-
Expand Down Expand Up @@ -1333,7 +1333,7 @@ a,
color: var(--link-underline);
}

/* Collapse external links / markdown links in edit mode */
/* Collapse external links / markdown links in edit mode: CodeMirrorOptions + Legacy editor */
body.style-active-selection:not(.ebullientworks-show-edit-mode-links) div:not(.CodeMirror-activeline) > .CodeMirror-line .cm-string.cm-url:not(.cm-formatting) {
font-size: 0;
}
Expand All @@ -1342,6 +1342,15 @@ body.style-active-selection:not(.ebullientworks-show-edit-mode-links) div:not(.C
font-size: 1rem;
}

/* CM6 editor */
body:not(.ebullientworks-show-edit-mode-links) .markdown-source-view.mod-cm6 div.cm-line:not(.cm-active) > .cm-string.cm-url:not(.cm-formatting) {
font-size: 0;
}
body:not(.ebullientworks-show-edit-mode-links) .markdown-source-view.mod-cm6 div.cm-line:not(.cm-active) > .cm-string.cm-url:not(.cm-formatting)::after {
content: "·";
font-size: 1rem;
}

:root {
--checkbox-checked: var(--green-3);
--checkbox-deferred: var(--blue-3);
Expand Down
14 changes: 13 additions & 1 deletion src/05-text-links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ a,
color: var(--link-underline);
}

/* Collapse external links / markdown links in edit mode */
/* Collapse external links / markdown links in edit mode: CodeMirrorOptions + Legacy editor */
body.style-active-selection:not(.ebullientworks-show-edit-mode-links) div:not(.CodeMirror-activeline) > .CodeMirror-line {
.cm-string.cm-url:not(.cm-formatting) {
font-size: 0;
Expand All @@ -114,3 +114,15 @@ body.style-active-selection:not(.ebullientworks-show-edit-mode-links) div:not(.C
font-size: 1rem;
}
}
/* CM6 editor */
body:not(.ebullientworks-show-edit-mode-links) .markdown-source-view.mod-cm6 {
div.cm-line:not(.cm-active) {
> .cm-string.cm-url:not(.cm-formatting) {
font-size: 0;
}
> .cm-string.cm-url:not(.cm-formatting)::after {
content: '·';
font-size: 1rem;
}
}
}

0 comments on commit 03c78fd

Please sign in to comment.