Skip to content

Commit

Permalink
🎨 simplify changing characters for empty lines and line breaks
Browse files Browse the repository at this point in the history
Snippets can define the following to override behavior for empty lines / normal line endings and hard breaks:

body {
  --line-end: '¬';
  --line-break: '↲';
}
  • Loading branch information
ebullient committed Aug 16, 2024
1 parent 3f3fe48 commit f51a47f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
}
}
}
body {
--line-end: '¬';
--line-break: '↲';
}
.theme-dark {
--swcm6-outline-list-markers-color: rgba(var(--mono-rgb-100), 0.05);
}
Expand Down Expand Up @@ -70,7 +74,7 @@ body:not(.swcm6-nix-plugin-styles) {
&:not(:has(br)):not(:has(span)):after,
&:has(span):not(:has(.cm-trailing-space-new-line)):not(:has(.cm-trailingSpace)):after {
color: var(--show-whitespace-color);
content: '¬';
content: var(--line-end);
@include line-ending;
}
.cm-trailing-space-a .cm-highlightSpace:before,
Expand All @@ -86,7 +90,7 @@ body:not(.swcm6-nix-plugin-styles) {
content: '';
}
.cm-highlightSpace:after {
content: '↲';
content: var(--line-break);
@include line-ending;
}
}
Expand Down

0 comments on commit f51a47f

Please sign in to comment.