Skip to content

Component Variables

CSS variables for the editor, images, mathematics, and other components.

Editor

VariableDefaultDescription
--editu-editor-min-height350pxMinimum editor height
--editu-editor-paddingvar(--editu-spacing-6)Editor content padding
--editu-editor-font-familyvar(--editu-font-sans)Editor font family
--editu-editor-font-sizevar(--editu-font-size-base)Editor font size
--editu-editor-line-heightvar(--editu-line-height-relaxed)Editor line height

Image

VariableDefaultDescription
--editu-image-border-radiusvar(--editu-radius-lg)Image border radius
--editu-image-outline-colorvar(--editu-primary)Selected image outline
--editu-image-outline-width2pxOutline width

Image Resize Handle

VariableDefaultDescription
--editu-resize-handle-colorvar(--editu-primary)Resize handle color
--editu-resize-handle-color-hovervar(--editu-primary-hover)Resize handle hover
--editu-resize-handle-width8pxHandle width
--editu-resize-handle-height48pxHandle height
--editu-resize-tooltip-bgvar(--editu-foreground)Tooltip background
--editu-resize-tooltip-colorvar(--editu-background)Tooltip text

Mathematics

VariableDefaultDescription
--editu-math-block-bgvar(--editu-background-secondary)Block math background
--editu-math-block-hover-bgvar(--editu-background-tertiary)Block math hover
--editu-math-block-selected-bgvar(--editu-primary-bg)Block math selected
--editu-math-inline-bgtransparentInline math background
--editu-math-inline-hover-bgvar(--editu-background-secondary)Inline math hover
--editu-math-inline-selected-bgvar(--editu-primary-bg)Inline math selected
--editu-math-editing-bgvar(--editu-background-tertiary)Editing state bg
--editu-math-preview-bgvar(--editu-background-secondary)Preview background

Code Block

See Color Variables for code block color tokens.

VariableDescription
--editu-code-block-bgBackground color
--editu-code-block-textText color
--editu-code-block-borderBorder color
--editu-code-block-toolbar-bgToolbar background
--editu-code-block-gutter-bgLine number gutter
--editu-code-block-line-number-colorLine numbers
--editu-code-block-language-colorLanguage indicator
--editu-code-block-placeholderPlaceholder text
--editu-code-block-button-colorButton text
--editu-code-block-button-borderButton border
--editu-code-block-button-hover-bgButton hover bg
--editu-code-block-button-hover-colorButton hover text
--editu-code-block-input-bgInput background
--editu-code-block-input-borderInput border
--editu-code-block-input-focus-bgInput focus bg

Usage Example

css
:root {
  /* Larger editor */
  --editu-editor-min-height: 500px;
  --editu-editor-padding: 2rem;
  
  /* Rounded images */
  --editu-image-border-radius: 1rem;
  
  /* Custom math styling */
  --editu-math-block-bg: oklch(0.95 0.01 250);
}

Released under the MIT License.