feat(muya): expose themeable CSS variables and diagram theming by Jocs · Pull Request #4382 · marktext/marktext · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 44 additions & 4 deletions packages/muya/src/assets/styles/blockSyntax.css
28 changes: 28 additions & 0 deletions packages/muya/src/assets/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
--editor-color-10: rgb(0 0 0 / 10%);
--editor-color-04: rgb(0 0 0 / 3%);
--editor-bg-color: rgb(255 255 255 / 100%);

/* width of the centered editing column (`.mu-container` max-width) */
--editor-area-width: 800px;
--delete-color: #ff6969;
--icon-color: #6b737b;
--code-block-bg-color: rgb(0 0 0 / 3%);
Expand All @@ -20,10 +23,35 @@
--button-border: 1px solid #dcdfe6;
--button-bg-color-hover: linear-gradient(#f9f9f9, #f2f2f2);
--button-border-hover: var(--button-border);

/* active / focus button variants — default to the resting button look so
the bundled light theme is unchanged; desktop themes can override. */
--button-bg-color-active: var(--button-bg-color);
--button-border-active: var(--button-border);
--button-border-focus: var(--button-border);
--float-bg-color: #fff;
--float-hover-color: rgb(0 0 0 / 4%);
--float-border-color: rgb(0 0 0 / 10%);
--float-shadow: rgb(15 15 15 / 3%) 0 0 0 1px, rgb(15 15 15 / 4%) 0 3px 6px, rgb(15 15 15 / 5%) 0 9px 24px;

/* markdown element colors — defaults mirror the current hardcoded /
opacity-tier values so the bundled light theme renders identically.
Consumers override them per theme. The desktop themes currently use
camelCase names (e.g. --linkColor, --h1Color); they will be migrated
to these kebab-case names as part of the muyajs -> @muyajs/core move. */
--link-color: rgb(20 86 240);
--h1-color: var(--editor-color-80);
--h2-color: var(--editor-color-80);
--h3-color: var(--editor-color-80);
--h4-color: var(--editor-color-80);
--h5-color: var(--editor-color-80);
--h6-color: var(--editor-color-80);
--blockquote-text-color: var(--editor-color-50);
--blockquote-border-color: var(--editor-color-30);
--strong-color: inherit;
--em-color: inherit;
--list-marker-color: inherit;
--hr-color: var(--editor-color-10);
}

/*
Expand Down
12 changes: 11 additions & 1 deletion packages/muya/src/assets/styles/inlineSyntax.css
Loading