Skip to content

Commit

Permalink
tweak color
Browse files Browse the repository at this point in the history
  • Loading branch information
Sansui233 committed Nov 20, 2023
1 parent 2c9590f commit dd9d8a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion custom.css

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions source/codeMirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

.extensions__code {
display: block;
background-color: var(--bf-codeblock-background-color);
background-color: var(--bf-codeblock-background-color); // calculator result

.code-editor {
margin: 0.5rem 0;
Expand All @@ -44,6 +44,7 @@

textarea {
color: var(--ls-primary-text-color);
background-color: var(--bf-codeblock-background-color);
}

.CodeMirror {
Expand Down Expand Up @@ -187,17 +188,15 @@
}
}

// Fix a code Mirror bug when switching between light and dark theme in current logseq
// For code mirror modifies selectors when initialization, not when switching theme, which makes .cs-s-light and .cs-s-dark not working properly
// It'll be better for logseq to use only one way to manage all elements' styles, including code-mirror. dynamically modifying the styles instead of functional selectors is not a good idea.
// Heavy. hope we can remove the redundant part in the future

/* Active line */
.dark-theme .cm-s-solarized.cm-s-light,
.cm-s-solarized.cm-s-dark {
.CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.1);
}
.CodeMirror-linenumber {
color: #586375;
}
}

.white-theme .cm-s-solarized.cm-s-dark,
Expand Down
8 changes: 4 additions & 4 deletions source/color-scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ html[data-theme="dark"] {
--ls-tertiary-background-color: rgb(46, 48, 51);
--ls-quaternary-background-color: rgb(54, 56, 59);
--ls-table-tr-even-background-color: #adadad1c;
--ls-callout-background-color: rgba(69, 75, 78, 0.3);
--bf-codeblock-background-color: rgb(49, 53, 56);
--ls-block-properties-background-color: #33363891;
--ls-callout-background-color: #45474e4d;
--bf-codeblock-background-color: #313238;
--ls-block-properties-background-color: #33353891;
--ls-block-ref-link-text-color: #73d2f6;
--ls-search-background-color: var(--ls-primary-background-color);
--ls-border-color: #3f3f3f;
Expand Down Expand Up @@ -60,7 +60,7 @@ html[data-theme="dark"] {
--ls-page-blockquote-border-color: var(--ls-primary-text-color);
--ls-page-inline-code-color: #eb5757;
--ls-page-inline-code-bg-color: rgba(135, 131, 120, 0.15);
--ls-page-properties-background-color: #2f3033;
--ls-page-properties-background-color: #292b2e;
--ls-scrollbar-foreground-color: #8a8a8a3d;
--ls-scrollbar-background-color: #fff0;
--bf-scrollbar-thumb-hover-color: #8a8a8a61;
Expand Down

0 comments on commit dd9d8a6

Please sign in to comment.