WEBINARNo AI, your AI, or a team of agents: Introducing CKEditor Editing Toolkit. REGISTER NOW!
Sign up (with export icon)

Theme token reference

Contribute to this guideShow the table of contents

This page lists the foundation tokens and the semantic tokens of the CKEditor 5 UI theme. These are the CSS variables that you override most often:

  • Foundation tokens are the raw values of the theme: the color palette, such as --ck-color-base-action, and the scales, such as the spacing steps --ck-spacing-sm and --ck-spacing-md. Override them for a broad change, such as a new brand color or a denser UI.
  • Semantic tokens name a design role shared by many components, such as the background of a panel or the focus ring of a control. Override them to change one role across the whole UI, or to fine-tune the result of a broad change.

The Theme customization guide explains how to choose a layer and where to set an override.

The list is generated from the theme source files at every documentation build, so it always matches the theme of this version. The component tokens are not on this page.

How to read the list

Each row shows the name of a token, the first sentence of its description, and its value in the default theme, with a preview. The details of a row hold the rest of the description, the default value as the theme declares it, the value that it resolves to, the tokens that it follows and that follow it, and the contrast pairs.

The steps of a scale, such as --ck-spacing-sm, have no description of their own. The description of their file, above their rows, explains the whole scale and, when the scale has one, the token that resizes it, such as --ck-spacing-base.

On the page, the filter above the list matches the names, the descriptions, and the values. A row must contain every word that you type, so surface overlay finds the tokens that mention both words.

Token chains

Most tokens read the value of another token. The details show this chain in both directions:

  • Follows names the tokens that the token reads. A legacy name or a deprecated alias in between is skipped, so the list names the token to override.
  • Followed by names the tokens on this page whose default declaration on :root (or :host in a shadow root) reads the token, directly or through other tokens. They change when you override the token on :root. An override on a narrower selector does not change them, because the theme resolves them on :root. The Theme customization guide explains global and scoped overrides.

For example, the theme declares the fill of the primary buttons like this:

:root {
	--ck-color-base-action: hsl(227.7 62.7% 55.9%);
	--ck-color-interactive-primary-surface: var(--ck-color-base-action);
}

The details of --ck-color-interactive-primary-surface show --ck-color-base-action under Follows, and the details of --ck-color-base-action show --ck-color-interactive-primary-surface under Followed by. Where you override --ck-color-base-action decides whether the primary buttons change:

/* Changes the token and every token that follows it,
   so the primary buttons turn green. */
:root {
	--ck-color-base-action: hsl(150 60% 30%);
}

/* Changes only the token itself. The theme resolves
   `--ck-color-interactive-primary-surface` on `:root`, so the
   primary buttons inside `.my-editor` keep the default color. */
.my-editor {
	--ck-color-base-action: hsl(150 60% 30%);
}

Check Followed by when you plan a broad change. One brand color is often spread over several foundation colors. For example, --ck-color-base-action colors the primary buttons, --ck-color-base-active colors the accent text and the text of the toggled-on buttons, --ck-color-base-selected tints the background of the selected and toggled-on elements, and --ck-color-base-focus colors the focus rings. Override all of them, together with their variants, such as -hover and -muted. Some semantic colors do not follow any foundation color, so a new brand color does not change them. For example, the pulsing glow of the buttons that insert a paragraph next to a widget comes from --ck-color-interactive-focus-border-coordinates, which holds the default focus color as fixed values. Override such tokens too:

:root {
	--ck-color-base-action: hsl(150 60% 30%);
	--ck-color-base-action-hover: hsl(150 60% 25%);
	--ck-color-base-action-muted: hsl(150 45% 93%);
	--ck-color-base-action-disabled: hsl(150 60% 70%);
	--ck-color-base-active: hsl(150 60% 30%);
	--ck-color-base-active-focus: hsl(150 60% 25%);
	--ck-color-base-selected: hsl(150 45% 95%);
	--ck-color-base-selected-hover: hsl(150 45% 92%);
	--ck-color-base-focus: hsl(150 60% 30%);
	--ck-color-base-focus-shadow: hsl(150 60% 30% / .22);
	--ck-color-base-focus-shadow-faded: hsl(150 60% 30% / .10);

	/* Does not follow any foundation color, so set it too. */
	--ck-color-interactive-focus-border-coordinates: 150, 60%, 30%;
}

A scale can follow another scale. The widths of panels, such as --ck-width-md, grow with the font size, so Followed by of --ck-font-size-base lists them too, and a new font size also resizes the panels. The focus tokens of the foundation, such as --ck-focus-shadow, read semantic tokens, such as --ck-color-interactive-focus-shadow, so their Follows points to the semantic layer.

Followed by lists only the tokens on this page, and it traces only their declarations on :root (or :host in a shadow root). The components and other tokens of the theme can read a token as well, so a token without Followed by is not necessarily unused. A token that the theme declares again under another selector can depend on more tokens there. For example, --ck-radius-corners reads --ck-radius-base inside .ck-rounded-corners, so a new base radius changes it too, although Followed by of --ck-radius-base does not list it. Its description explains this.

Contrast pairs

A contrast pair names the content drawn on a background token, such as text or icons. If you change a background, check the contrast of each of its pairs too. The theme marks a pair on the background token only, as described in the Contrast pairs section of the Theme token naming guide. This page shows it on both tokens: the background lists its pairs under Contrast pairs, and the content token lists its backgrounds under Used on.

/**
 * The fill of primary controls.
 * @pair --ck-color-interactive-primary-text
 * @pair --ck-color-surface-canvas
 */
--ck-color-interactive-primary-surface: var(--ck-color-base-action);

Here, --ck-color-interactive-primary-surface lists both tokens under Contrast pairs, and each of them lists --ck-color-interactive-primary-surface under Used on. The text colors the labels of the action buttons, and the canvas color colors the thumb of a switch that is on.

A light fill needs dark content, so change the fill, its variants, and both pairs together. The canvas color is the background of the whole UI, so do not change it. Override the thumb of a switch that is on with its component token instead:

:root {
	/* A light brand fill and its variants. */
	--ck-color-interactive-primary-surface: hsl(50 100% 60%);
	--ck-color-interactive-primary-surface-hover: hsl(50 100% 50%);
	--ck-color-interactive-primary-surface-muted: hsl(50 100% 93%);
	--ck-color-interactive-primary-surface-disabled: hsl(50 100% 80%);

	/* The default text is white, which has a contrast ratio
	   of 1.34:1 on this fill. */
	--ck-color-interactive-primary-text: hsl(0 0% 10%);
}

/* The white thumb has the same contrast ratio. A switch that is off
   keeps it, because a dark thumb is hard to see on its gray fill. */
.ck.ck-switchbutton.ck-on {
	--ck-switch-button-inner-background-color: hsl(0 0% 10%);
}

The page computes the contrast ratio of every pair in the default theme. A translucent background is first composited over the canvas color, --ck-color-surface-canvas. The ratios are rounded down, so the page never shows a ratio higher than it is.

A pair does not tell what its content is, such as text, an icon, or a decoration, so the page shows the ratio without a verdict. Compare it with the minimum for the content. The Web Content Accessibility Guidelines require 4.5:1 for normal text and 3:1 for large text in Contrast (Minimum), and 3:1 for icons, borders, and other parts of the UI that you need to see to use it in Non-text Contrast.

If the page cannot read a color of a pair, for example a color that is not hsl(), it shows contrast not computed instead of the ratio.

Deprecated tokens

A token marked as deprecated is kept for compatibility, as described in the Deprecated tokens section of the Theme token naming guide. The theme still declares it, but new code and new overrides should use the token named in its details under Use instead. Being deprecated does not mean that the token will be removed.

Foundation

Colors

Source: colors/_foundation.css

The raw color palette of the theme. Semantic tokens give these colors a role. Read the semantic tokens in components, not these.

Spacing

Source: _spacing.css

The spacing scale of the editor UI. Set --ck-spacing-base on :root to resize every step. To change the spacing of one group of elements, such as controls, override its semantic spacing role, such as --ck-spacing-control-padding-inline, instead.

Shape

Source: _rounded.css

The radius scale of the editor UI. Set --ck-radius-base on :root to resize every step. To change the radius of one group of elements, such as controls, override its semantic radius role, such as --ck-border-radius-control, instead.

Source: _border.css

The border width scale of the editor UI. To change the border width of one group of elements, such as controls, override its semantic border width role, such as --ck-border-width-control, instead.

Source: _shadow.css

The shadow scale of the editor UI. To change the shadow of one group of elements, such as floating panels, override its semantic shadow role, such as --ck-shadow-surface-floating, instead.

  • --ck-inset-shadow-sm#: Inset shadow of a focused editing area.0 1px 4px hsl(0 0% 0% / .05), 0 2px 10px hsl(0 0% 0% / .05) inset

    Details
    • Default: 0 1px 4px hsl(0 0% 0% / .05), 0 2px 10px hsl(0 0% 0% / .05) inset
  • --ck-shadow-md#0 1px 2px 1px hsl(0 0% 0% / 0.125)

    Details
    • Default: 0 1px 2px 1px var(--ck-color-shadow-drop)
    • Resolves to: 0 1px 2px 1px hsl(0 0% 0% / 0.125)
    • Follows: --ck-color-shadow-drop
  • --ck-shadow-lg#0 1px 4px hsl(0 0% 0% / .05), 0 2px 10px hsl(0 0% 0% / .05)

    Details
  • --ck-shadow-xl#0 16px 32px -4px hsl(0 0% 0% / 0.102), 0 4px 16px hsl(0 0% 0% / 0.102)

    Details

Typography

Source: _fonts.css

The typography scale of the editor UI. Set --ck-font-size-base on :root to resize every font size step. It does not change the edited content, which uses --ck-content-font-size. To change the font size of one group of elements, such as controls, override its semantic font size role, such as --ck-font-size-control, instead. For font weights, use the semantic --ck-font-weight-ui-* roles, not these steps.

Sizes

Source: _width.css

The width scale of the editor UI, for panels such as balloon forms and dialogs. Set --ck-font-size-base on :root to resize every step together with the font sizes. To change the width of one group of panels, such as dialogs, override its semantic width role, such as --ck-width-dialog, instead.

Layers

Source: _zindex.css

The stacking scale of the editor UI: the base layer, floating panels, and modal dialogs. To change the stacking of one group of elements, such as panels, override its semantic layer role, such as --ck-layer-panel, instead.

Motion

Source: _transition.css

The motion scale of the editor UI: durations, easing curves, and the values of the transition and animation properties. To change the motion of one group of elements, such as controls, override its semantic motion role, such as --ck-transition-duration-control, instead.

Focus and states

Source: _focus.css

The focus indicators of the editor UI: the shadow around a focused element, its border, and the outline of fake carets. To change the focus look of controls, override the semantic --ck-interactive-focus-* roles, such as --ck-interactive-focus-shadow, instead.

Source: _disabled.css

The disabled state of the editor UI. To change how disabled controls look across the UI, override --ck-opacity-disabled. To change one component, override its component token instead, such as --ck-button-opacity-disabled.

  • --ck-opacity-disabled#: Opacity of the parts of disabled controls, such as the label and the icon of a button..5

    Details · Full description

    The background and the border keep their colors.

    • Default: .5

Semantic

Surfaces and borders

Source: colors/_semantic-surface.css

The surface and border color roles of the editor UI: the backgrounds that the UI is drawn on and the borders around them. To change one kind of surface across the UI, override its role. To change one component, override its component token instead.

  • --ck-color-surface-canvas#: Base background of the editor UI.hsl(0 0% 100%)

    Details · Full description · 6 contrast pairs

    Set it to change the background of every surface that has no override of its own.

  • --ck-color-surface-control#: Background of form fields and list items, such as text inputs and dropdown lists.hsl(0 0% 100%)

    Details · 2 contrast pairs
  • --ck-color-surface-container#: Background of floating and framing containers, such as toolbars, dropdown panels, balloons, and dialogs.hsl(0 0% 100%)

    Details · 3 contrast pairs
  • --ck-color-surface-inverse#: Reversed background of small overlays, such as tooltips and the size label of a resized widget.hsl(216 41% 12%)

    Details · 1 contrast pair
  • --ck-color-surface-subtle#: Muted background of placeholders and secondary areas, such as an embed placeholder or the background around the editor in the fullscreen mode.hsl(0 0% 97%)

    Details · Full description · 2 contrast pairs

    Disabled form fields, such as text inputs, use --ck-color-interactive-disabled-surface instead.

  • --ck-color-surface-overlay#: Translucent scrim that dims the page behind a modal dialog.hsl(0 0% 0% / .5)

    Details
    • Default: hsl(0 0% 0% / .5)
  • --ck-color-surface-skeleton#: Base color of a loading placeholder (skeleton), such as an image that is being processed.hsl(220 10% 90%)

    Details · Full description

    The shimmer moves --ck-color-surface-skeleton-highlight across it, so change both together.

    • Default: hsl(220 10% 90%)
  • --ck-color-surface-skeleton-highlight#: Moving highlight of the loading placeholder shimmer, drawn over --ck-color-surface-skeleton.hsl(220 10% 98%)

    Details
    • Default: hsl(220 10% 98%)
  • --ck-color-border-control#: Border of form fields and other bordered controls, such as text inputs, the cells of the insert table grid, and color tiles.hsl(214.7 21.3% 82.5%)

    Details
  • --ck-color-border-container#: Outer border of toolbars, panels, balloons, dialogs, and the editor frame, drawn around --ck-color-surface-container.hsl(214.7 21.3% 82.5%)

    Details
  • --ck-color-border-subtle#: Light, low-contrast border for quiet outlines, such as the outline of a selected widget while the editor is not focused.hsl(214 39% 93%)

    Details
  • --ck-color-border-accent#: Accent color of borders and lines, such as the border of a selected tile, a column resize handle, or the border of a toggled-on surface button.hsl(227.7 62.7% 55.9%)

    Details · Full description

    Set --ck-color-text-accent to change both the accent text and these lines. Override this token only to tell them apart.

  • --ck-color-divider#: Thin separator lines between groups of items and between sections of a panel.hsl(214.7 21.3% 82.5%)

    Details

Source: _semantic-surface.css

The shadow roles of the surfaces of the editor UI. To change the shadow of one kind of surface across the UI, override its role. To change one component, override its component token instead.

  • --ck-shadow-surface-floating#: Shadow of floating surfaces, such as balloons, dropdown panels, dialogs, and the toolbar while it sticks to the top of the viewport.0 16px 32px -4px hsl(0 0% 0% / 0.102), 0 4px 16px hsl(0 0% 0% / 0.102)

    Details
    • Default: var(--ck-shadow-xl)
    • Resolves to: 0 16px 32px -4px hsl(0 0% 0% / 0.102), 0 4px 16px hsl(0 0% 0% / 0.102)
    • Follows: --ck-shadow-xl
  • --ck-shadow-surface-raised#: Shadow of raised surfaces that sit on another surface.0 1px 4px hsl(0 0% 0% / .05), 0 2px 10px hsl(0 0% 0% / .05)

    Details
    • Default: var(--ck-shadow-lg)
    • Resolves to: 0 1px 4px hsl(0 0% 0% / .05), 0 2px 10px hsl(0 0% 0% / .05)
    • Follows: --ck-shadow-lg

Text

Source: colors/_semantic-text.css

The text color roles of the editor UI: the colors of text and icons. To change one kind of text across the UI, override its role. To change one component, override its component token instead. The backgrounds that a role is drawn on name it in their @pair tags.

Interactive states

Source: colors/_semantic-interactive.css

The interactive color roles of the editor UI: the colors of controls in their states, such as hovered, toggled on, and focused, and of action buttons. To change one state across the UI, override its role. To change one component, override its component token instead.

Source: _semantic-interactive.css

The focus roles of interactive controls: the ring, the border color, and the shadows that show which control has the focus. To change the focus look of controls across the UI, override these roles. To change one component, override its component token instead.

  • --ck-interactive-focus-ring#: Border or outline of a focused control, such as a switch button or the source editing textarea.1px solid hsl(227.7 62.7% 55.9%)

    Details · Full description

    Read through the border or outline shorthand, so it also sets the width and the style.

    • Default: var(--ck-focus-ring)
    • Resolves to: 1px solid hsl(227.7 62.7% 55.9%)
    • Follows: --ck-focus-ring
  • --ck-interactive-focus-border-color#: Border color of a focused control that keeps its own border width, such as a text input, a button, or the editable.hsl(227.7 62.7% 55.9%)

    Details · Full description

    Use it instead of --ck-interactive-focus-ring when only the color changes on focus.

  • --ck-interactive-focus-shadow#: Shadow around a focused control, such as a text input, a button, or an item of a menu bar menu.0 0 0 3px hsl(227.6 63.1% 56.5% / .22)

    Details
    • Default: var(--ck-focus-outer-shadow, var(--ck-focus-shadow))
    • Resolves to: 0 0 0 3px hsl(227.6 63.1% 56.5% / .22)
    • Follows: --ck-focus-shadow
  • --ck-interactive-focus-disabled-shadow#: Shadow around a focused disabled control, such as a disabled text input or button.0 0 0 3px hsl(227.6 63.1% 56.5% / .10)

    Details
    • Default: var(--ck-focus-disabled-outer-shadow, var(--ck-focus-shadow-disabled))
    • Resolves to: 0 0 0 3px hsl(227.6 63.1% 56.5% / .10)
    • Follows: --ck-focus-shadow-disabled
  • --ck-interactive-focus-error-shadow#: Shadow around a focused field in the error state.0 0 0 3px hsl(0 64.3% 94.5%)

    Details
    • Default: var(--ck-focus-error-outer-shadow, var(--ck-focus-shadow-error))
    • Resolves to: 0 0 0 3px hsl(0 64.3% 94.5%)
    • Follows: --ck-focus-shadow-error

Feedback

Source: colors/_semantic-feedback.css

The feedback color roles of the editor UI: the colors that tell the user about a result or a state, such as an error, a success, or a match. To change one kind of feedback across the UI, override its role. To change one component, override its component token instead.

  • --ck-color-feedback-error#: Color of the error state, such as the border of an invalid field, the icon of a cancel button, and the fill of the error message that points to a field in some forms.hsl(0 74.9% 46.9%)

    Details · 1 contrast pair
  • --ck-color-feedback-success#: Color of the success state, such as the icon of a save button and the fill of the icon shown when an image upload completes.hsl(157.2 77.1% 27.5%)

    Details · 2 contrast pairs
  • --ck-color-feedback-warning#: Color of the warning state.hsl(37 81% 50%)

    Details
  • --ck-color-feedback-highlight#: Background of highlighted text, such as the results of find and replace.hsl(60 100% 50%)

    Details · 1 contrast pair
  • --ck-color-feedback-error-surface#: Light background of a message or a status label in the error state.color-mix(in srgb, hsl(0 74.9% 46.9%) 10%, transparent)

    Details · Full description · 2 contrast pairs

    It is translucent: a tint of --ck-color-feedback-error over the background below it.

  • --ck-color-feedback-success-surface#: Light background of a message or a status label in the success state.color-mix(in srgb, hsl(157.2 77.1% 27.5%) 10%, transparent)

    Details · Full description · 2 contrast pairs

    It is translucent: a tint of --ck-color-feedback-success over the background below it.

  • --ck-color-feedback-warning-surface#: Light background of a message or a field in the warning state.color-mix(in srgb, hsl(37 81% 50%) 10%, transparent)

    Details · Full description · 1 contrast pair

    It is translucent: a tint of --ck-color-feedback-warning over the background below it.

Changes

Source: colors/_semantic-diff.css

The change color roles of the editor: the colors that mark an insertion, a deletion, or a format change when changes are suggested or compared, and the accent of comment annotations. To change one kind of change across the editor, override its role. To change one component, override its component token instead. The markers are drawn over the edited content, which takes the text color of the page, so the text on them has no @pair.

  • --ck-color-diff-insertion-border#: Border of the marker of inserted content.hsl(157 80% 34% / 50%)

    Details
  • --ck-color-diff-insertion-border-active#: Border of the marker of inserted content while its change is active.hsl(157 80% 34% / 60%)

    Details
  • --ck-color-diff-insertion-background#: Background of the marker of inserted content.hsl(157 80% 34% / 20%)

    Details
  • --ck-color-diff-insertion-background-active#: Background of the marker of inserted content while its change is active.hsl(157 80% 34% / 30%)

    Details
  • --ck-color-diff-deletion-border#: Border of the marker of deleted content.hsl(0 75% 52% / 40%)

    Details
  • --ck-color-diff-deletion-border-active#: Border of the marker of deleted content while its change is active.hsl(0 75% 52% / 50%)

    Details
  • --ck-color-diff-deletion-background#: Background of the marker of deleted content.hsl(0 75% 52% / 20%)

    Details · 1 contrast pair
  • --ck-color-diff-deletion-background-active#: Background of the marker of deleted content while its change is active.hsl(0 75% 52% / 30%)

    Details · 1 contrast pair
  • --ck-color-diff-deletion-stroke#: Color of the line through deleted text and of the mark of a deleted paragraph break.hsl(0 75% 43% / 60%)

    Details · 2 contrast pairs
  • --ck-color-diff-format-border#: Border of the marker of content with a format change.hsl(191 60% 75% / 100%)

    Details
  • --ck-color-diff-format-border-active#: Border of the marker of content with a format change while its change is active.hsl(191 60% 60%)

    Details
    • Default: hsl(191 60% 60%)
  • --ck-color-diff-insertion-box-border#: Accent border of the annotation of an insertion.hsl(145 33% 42.7%)

    Details · Full description

    The default theme draws this border with no width, so the color shows only in a theme that gives it one.

    • Default: hsl(145 33% 42.7%)
  • --ck-color-diff-deletion-box-border#: Accent border of the annotation of a deletion.hsl(8.4 69% 46.9%)

    Details · Full description

    The default theme draws this border with no width, so the color shows only in a theme that gives it one.

    • Default: hsl(8.4 69% 46.9%)
  • --ck-color-diff-insertion-widget-background#: Background of an inserted widget, such as an image, a table, or a media embed.hsl(128 71% 65% / 5%)

    Details
    • Default: hsl(128 71% 65% / 5%)
  • --ck-color-diff-insertion-widget-background-active#: Background of an inserted widget while its change is active.hsl(128 71% 50% / 7%)

    Details
    • Default: hsl(128 71% 50% / 7%)
  • --ck-color-diff-deletion-widget-background#: Background of a deleted widget, such as an image, a table, or a media embed.hsl(345 71% 65% / 5%)

    Details
    • Default: hsl(345 71% 65% / 5%)
  • --ck-color-diff-deletion-widget-background-active#: Background of a deleted widget while its change is active.hsl(345 71% 45% / 7%)

    Details
    • Default: hsl(345 71% 45% / 7%)
  • --ck-color-diff-format-widget-background#: Background of a widget with a format change, such as an image, a table, or a media embed.hsl(191 90% 40% / 9%)

    Details
    • Default: hsl(191 90% 40% / 9%)
  • --ck-color-diff-format-widget-background-active#: Background of a widget with a format change while its change is active.hsl(191 90% 40% / 16%)

    Details
    • Default: hsl(191 90% 40% / 16%)
  • --ck-color-diff-insertion-widget-th-background#: Background of the header cells of an inserted table.hsl(128 71% 65% / 12%)

    Details
    • Default: hsl(128 71% 65% / 12%)
  • --ck-color-diff-insertion-widget-th-background-active#: Background of the header cells of an inserted table while its change is active.hsl(128 71% 50% / 14%)

    Details
    • Default: hsl(128 71% 50% / 14%)
  • --ck-color-diff-deletion-widget-th-background#: Background of the header cells of a deleted table.hsl(345 71% 65% / 14%)

    Details
    • Default: hsl(345 71% 65% / 14%)
  • --ck-color-diff-deletion-widget-th-background-active#: Background of the header cells of a deleted table while its change is active.hsl(345 71% 45% / 16%)

    Details
    • Default: hsl(345 71% 45% / 16%)
  • --ck-color-comment-box-border#: Accent border of the annotation of a comment.hsl(42.1 95.4% 57.3% / 100%)

    Details · Full description

    Comments are annotations, not changes, but they share the annotation accents with the changes. The default theme draws this border with no width, so the color shows only in a theme that gives it one.

    • Default: hsl(var(--ck-color-base-comment) / 100%)
    • Resolves to: hsl(42.1 95.4% 57.3% / 100%)
    • Follows: --ck-color-base-comment

Typography

Source: _semantic-typography.css

The typography roles of the editor UI: the font weights of kinds of UI text, and the font sizes of controls and of toolbar labels. To change one kind of text across the UI, override its role, such as --ck-font-weight-ui-heading. To change one component, override its component token instead. These roles do not change the edited content.

  • --ck-font-weight-ui-default#: Font weight of regular UI text, set on the root of the UI.400

    Details
  • --ck-font-weight-ui-strong#: Font weight of strong UI text, such as the button of a collapsible section.600

    Details
  • --ck-font-weight-ui-heading#: Font weight of UI headings, such as the title of a form header and the headings of the accessibility help.600

    Details
  • --ck-font-weight-ui-label#: Font weight of labels, such as the label of a field and the label of a group in a list.600

    Details
  • --ck-font-weight-ui-emphasis#: Font weight of emphasized button labels, such as a button with the ck-button-bold class.600

    Details
  • --ck-font-weight-ui-muted#: Font weight of de-emphasized text, such as the floating label of a labeled field.400

    Details
  • --ck-font-weight-ui-inherit#: Keeps the font weight of the parent, for text that must not change its weight, such as the label of a button and the label of the color grid in a color selector.inherit

    Details
    • Default: inherit
  • --ck-font-size-control#: Font size of the text in form fields, such as text inputs.14px

    Details · Full description

    Buttons use their own --ck-button-font-size.

  • --ck-toolbar-text-font-size#: Font size of the button labels in toolbars.inherit

    Details · Full description

    It applies to the labels only, so it does not resize the icons.

    • Default: inherit
  • --ck-menubar-text-font-size#: Font size of the button labels in the menu bar.inherit

    Details · Full description

    It applies to the labels only, so it does not resize the icons or the spacing.

    • Default: inherit

Shape

Source: _semantic-shape.css

The shape roles of the editor UI: the border widths, the border shorthands, and the corner radii of controls and surfaces. To change one kind of element across the UI, such as controls, override its role, such as --ck-border-radius-control. To change one component, override its component token instead.

  • --ck-border-width-control#: Border width of controls, such as buttons, text inputs, switch buttons, tabs, and the editable.1px

    Details
  • --ck-border-width-surface#: Border width of surfaces, such as balloons, dropdown panels, and the sticky toolbar.1px

    Details
  • --ck-border-width-divider#: Width of separator lines, such as the separators of a toolbar or a list.1px

    Details
  • --ck-border-width-emphasis#: Width of emphasized borders, such as the ring of a spinner.2px

    Details
  • --ck-border-control#: Border of a bordered control, such as the button of a dropdown in a form.1px solid hsl(214.7 21.3% 82.5%)

    Details · Full description

    Read through the border shorthand, so it sets the width, the style, and the color.

  • --ck-border-surface#: Border of a bordered surface.1px solid hsl(214.7 21.3% 82.5%)

    Details · Full description

    Read through the border shorthand, so it sets the width, the style, and the color.

  • --ck-border-divider#: Separator line between the parts of a form or a panel, such as the line under a form header or above the color picker of a color selector.0

    Details · Full description

    The default theme draws no such lines, so set it to show them, for example to var(--ck-border-width-divider) solid var(--ck-color-divider).

    • Default: 0
  • --ck-border-radius-control#: Corner radius of controls, such as buttons, text inputs, and the buttons of list dropdowns.4px

    Details
  • --ck-border-radius-control-small#: Smaller corner radius for small parts of controls, such as the indicator of the active tab.2px

    Details
  • --ck-border-radius-surface#: Corner radius of surfaces, such as balloons, toolbars, dialogs, and dropdown panels.8px

    Details
  • --ck-border-radius-uniform#: Corner radius of every corner of the surfaces that open from a control, such as dropdown panels, dropdown menus, autocomplete results, and the color selector, so that they are fully rounded.8px

    Details · Full description

    Set it to initial to square the corners that touch the control, as in the legacy theme. initial makes the surfaces use their per-corner radii, such as --ck-border-radius-surface-cut-top-left, instead.

  • --ck-border-radius-surface-attached#: Corner radius of the corners of an attached surface that do not touch its control.8px

    Details
  • --ck-border-radius-surface-attached-top#: Radii of a surface attached at its top edge, with the top corners square, such as the sticky toolbar.0 0 8px 8px

    Details · Full description

    Read through the border-radius shorthand.

  • --ck-border-radius-surface-attached-bottom#: Radii of an element attached at its bottom edge, with the bottom corners square, such as a dropdown button while its panel is open.8px 8px 0 0

    Details · Full description

    Read through the border-radius shorthand.

  • --ck-border-radius-surface-cut-top-left#: Radii of a panel with its top-left corner square, such as a dropdown panel that opens below its button and to the right.0 8px 8px 8px

    Details · Full description

    Read through the border-radius shorthand.

    • Default: 0 var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached)
    • Resolves to: 0 8px 8px 8px
    • Follows: --ck-border-radius-surface-attached
  • --ck-border-radius-surface-cut-top-right#: Radii of a panel with its top-right corner square, such as a dropdown panel that opens below its button and to the left.8px 0 8px 8px

    Details · Full description

    Read through the border-radius shorthand.

    • Default: var(--ck-border-radius-surface-attached) 0 var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached)
    • Resolves to: 8px 0 8px 8px
    • Follows: --ck-border-radius-surface-attached
  • --ck-border-radius-surface-cut-bottom-right#: Radii of a panel with its bottom-right corner square, such as a dropdown panel that opens above its button and to the left.8px 8px 0 8px

    Details · Full description

    Read through the border-radius shorthand.

    • Default: var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached) 0 var(--ck-border-radius-surface-attached)
    • Resolves to: 8px 8px 0 8px
    • Follows: --ck-border-radius-surface-attached
  • --ck-border-radius-surface-cut-bottom-left#: Radii of a panel with its bottom-left corner square, such as a dropdown panel that opens above its button and to the right.8px 8px 8px 0

    Details · Full description

    Read through the border-radius shorthand.

    • Default: var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached) var(--ck-border-radius-surface-attached) 0
    • Resolves to: 8px 8px 8px 0
    • Follows: --ck-border-radius-surface-attached

Spacing

Source: _semantic-spacing.css

The spacing roles of the editor UI: the padding of controls, and the padding and gap tiers that components pick their spacing from. To change the padding of controls across the UI, override a control role, such as --ck-spacing-control-padding-inline. The padding and gap tiers set a density, not a purpose: a component token names the purpose and reads a tier, such as --ck-toolbar-padding: 0 var(--ck-spacing-padding-compact), so overriding a tier changes every component that reads it. To change the spacing of one component, override its component token instead.

  • --ck-spacing-control-padding-block#: Block padding of controls, such as buttons, list items, and the buttons of dropdown menus.4px

    Details
    • Default: var(--ck-spacing-small, var(--ck-spacing-sm))
    • Resolves to: 4px
    • Follows: --ck-spacing-sm
  • --ck-spacing-control-padding-inline#: Inline padding of controls, such as the buttons of dropdown menus and of the menu bar.8px

    Details · Full description

    Dropdowns also use it to place their arrow.

    • Default: var(--ck-spacing-standard, var(--ck-spacing-base))
    • Resolves to: 8px
    • Follows: --ck-spacing-base
  • --ck-spacing-control-padding-inline-compact#: Smaller inline padding of compact controls, such as a dropdown button with only an icon and the list items with a check mark.4px

    Details
    • Default: var(--ck-spacing-small, var(--ck-spacing-sm))
    • Resolves to: 4px
    • Follows: --ck-spacing-sm
  • --ck-spacing-control-padding-inline-start-compact#: Smaller inline start padding of compact controls.2px

    Details
    • Default: var(--ck-spacing-tiny, var(--ck-spacing-xs))
    • Resolves to: 2px
    • Follows: --ck-spacing-xs
  • --ck-spacing-control-padding-block-compact#: Smaller block padding of compact controls.2px

    Details
    • Default: var(--ck-spacing-tiny, var(--ck-spacing-xs))
    • Resolves to: 2px
    • Follows: --ck-spacing-xs
  • --ck-spacing-control-icon-gap#: Gap between the icon and the label of a control, such as a menu bar button or a form header.6px

    Details
    • Default: var(--ck-spacing-medium-small, var(--ck-spacing-md))
    • Resolves to: 6px
    • Follows: --ck-spacing-md
  • --ck-spacing-padding-tight#2px

    Details
    • Default: var(--ck-spacing-tiny, var(--ck-spacing-xs))
    • Resolves to: 2px
    • Follows: --ck-spacing-xs
  • --ck-spacing-padding-compact#4px

    Details
    • Default: var(--ck-spacing-small, var(--ck-spacing-sm))
    • Resolves to: 4px
    • Follows: --ck-spacing-sm
  • --ck-spacing-padding-snug#6px

    Details
    • Default: var(--ck-spacing-medium-small, var(--ck-spacing-md))
    • Resolves to: 6px
    • Follows: --ck-spacing-md
  • --ck-spacing-padding#8px

    Details
  • --ck-spacing-padding-comfortable#12px

    Details
    • Default: var(--ck-spacing-large, var(--ck-spacing-lg))
    • Resolves to: 12px
    • Follows: --ck-spacing-lg
  • --ck-spacing-padding-spacious#16px

    Details
    • Default: var(--ck-spacing-extra-large, var(--ck-spacing-xl))
    • Resolves to: 16px
    • Follows: --ck-spacing-xl
  • --ck-spacing-gap-tight#2px

    Details
    • Default: var(--ck-spacing-tiny, var(--ck-spacing-xs))
    • Resolves to: 2px
    • Follows: --ck-spacing-xs
  • --ck-spacing-gap-compact#4px

    Details
    • Default: var(--ck-spacing-small, var(--ck-spacing-sm))
    • Resolves to: 4px
    • Follows: --ck-spacing-sm
  • --ck-spacing-gap-snug#6px

    Details
    • Default: var(--ck-spacing-medium-small, var(--ck-spacing-md))
    • Resolves to: 6px
    • Follows: --ck-spacing-md
  • --ck-spacing-gap#8px

    Details
  • --ck-spacing-gap-comfortable#12px

    Details
    • Default: var(--ck-spacing-large, var(--ck-spacing-lg))
    • Resolves to: 12px
    • Follows: --ck-spacing-lg
  • --ck-spacing-gap-spacious#16px

    Details
    • Default: var(--ck-spacing-extra-large, var(--ck-spacing-xl))
    • Resolves to: 16px
    • Follows: --ck-spacing-xl

Sizes

Source: _semantic-width.css

The width roles of the editor UI: the widths of balloon forms and dialogs. To change the width of one kind of panel across the UI, such as dialogs, override its role, such as --ck-width-dialog. To change one component, override its component token instead. Set --ck-font-size-base on :root to resize all of them together with the font sizes. Each role is capped at 90% of the viewport width, so the panels fit on narrow screens.

  • --ck-width-balloon-form#: Width of forms in balloons, such as the link form, the bookmark form, and the text alternative form of an image.min(400px, 90vw)

    Details
    • Default: min(var(--ck-width-md), 90vw)
    • Resolves to: min(400px, 90vw)
    • Follows: --ck-width-md
  • --ck-width-dialog-xs#: Width of extra small dialogs.min(240px, 90vw)

    Details
    • Default: min(var(--ck-width-xs), 90vw)
    • Resolves to: min(240px, 90vw)
    • Follows: --ck-width-xs
  • --ck-width-dialog-sm#: Width of small dialogs.min(320px, 90vw)

    Details
    • Default: min(var(--ck-width-sm), 90vw)
    • Resolves to: min(320px, 90vw)
    • Follows: --ck-width-sm
  • --ck-width-dialog#: Width of dialogs, such as the find and replace dialog and the media embed form.min(400px, 90vw)

    Details
    • Default: min(var(--ck-width-md), 90vw)
    • Resolves to: min(400px, 90vw)
    • Follows: --ck-width-md
  • --ck-width-dialog-lg#: Width of large dialogs.min(560px, 90vw)

    Details
    • Default: min(var(--ck-width-xl), 90vw)
    • Resolves to: min(560px, 90vw)
    • Follows: --ck-width-xl
  • --ck-width-dialog-xl#: Width of extra large dialogs.min(640px, 90vw)

    Details
    • Default: min(var(--ck-width-2xl), 90vw)
    • Resolves to: min(640px, 90vw)
    • Follows: --ck-width-2xl

Source: _semantic-layout.css

The layout roles of the editor UI: the sizes that several components share. To change the size of one component, override its component token instead.

  • --ck-size-control-min-height#: Minimum height of controls, such as buttons and text inputs.32px

    Details · Full description

    Buttons also use it as their minimum width, so an icon button is at least square. Set --ck-font-size-base on :root to resize it together with the font sizes. It is read where controls are drawn, so it can also be set on a part of the UI, as the theme does for small buttons.

    • Default: var(--ck-ui-component-min-height, calc(var(--ck-font-size-normal, var(--ck-font-size-base))*2))
    • Resolves to: 32px
    • Follows: --ck-font-size-base

Layers

Source: _semantic-layer.css

The stacking roles of the editor UI: the z-index of controls, panels, dialogs, and tooltips relative to each other. To change the stacking of one group of elements, such as dialogs, override its role, such as --ck-layer-dialog. To move the whole UI relative to the rest of the page, change the z-index scale (--ck-z-base, --ck-z-overlay, and --ck-z-modal) instead.

  • --ck-layer-base#: Base layer of controls, which keeps a focused item, such as a list item, above its neighbors, so that its focus border and focus shadow are not covered.1

    Details
  • --ck-layer-control-raised#: Layer of a focused control that must stay above the controls next to it, such as a button in a toolbar dropdown or a split button.2

    Details
    • Default: calc(var(--ck-layer-base) + 1)
    • Resolves to: 2
    • Follows: --ck-layer-base
  • --ck-layer-panel#: Layer of floating panels, such as balloons, dropdown panels, and the sticky toolbar.1000

    Details
  • --ck-layer-panel-above#: Layer of a panel that must stand above other panels, such as the panel of a dropdown in a toolbar or the panel of a dropdown menu.1001

    Details
    • Default: calc(var(--ck-layer-panel) + 1)
    • Resolves to: 1001
    • Follows: --ck-layer-panel
  • --ck-layer-panel-below#: Layer of the fake panels that show a stack of balloons under the visible one.999

    Details
    • Default: calc(var(--ck-layer-panel) - 1)
    • Resolves to: 999
    • Follows: --ck-layer-panel
  • --ck-layer-dialog#: Layer of dialogs.9999

    Details · Full description

    Elements that must stand above dialogs, such as the emoji picker, the mention list, and CKBox in the fullscreen mode, use one layer above it.

  • --ck-layer-tooltip#: Layer of tooltips, above every other part of the UI, including dialogs.10099

    Details
    • Default: calc(var(--ck-layer-dialog) + 100)
    • Resolves to: 10099
    • Follows: --ck-layer-dialog
  • --ck-layer-balloon-arrow-back#: Layer of the back part of a balloon arrow, its border.-2

    Details
  • --ck-layer-balloon-arrow-front#: Layer of the front part of a balloon arrow, its fill, drawn over the back part.-1

    Details

Motion

Source: _semantic-motion.css

The motion roles of the editor UI: the durations and the easing of transitions and animations, by the kind of motion. To change one kind of motion across the UI, such as the transitions of controls, override its role, such as --ck-transition-duration-control. To change one component, override its component token instead.

  • --ck-transition-duration-control-fast#: Duration of quick control transitions, such as the border and the shadow of a text input, and the floating label of a labeled field..1s

    Details
  • --ck-transition-duration-control#: Duration of control transitions, such as changes of borders and shadows..2s

    Details
  • --ck-transition-duration-control-emphasized#: Duration of larger control movements, such as the toggle of a switch button..3s

    Details
  • --ck-transition-duration-surface#: Duration of transitions of surfaces, which change more than controls and take longer..4s

    Details
  • --ck-transition-timing-function-control#: Easing of control transitions, such as the border and the shadow of a button.ease-in-out

    Details
  • --ck-transition-timing-function-control-emphasized#: Easing of emphasized control movements, such as the floating label of a labeled field.cubic-bezier(0, 0, 0.24, 0.95)

    Details
    • Default: var(--ck-ease-emphasized)
    • Resolves to: cubic-bezier(0, 0, 0.24, 0.95)
    • Follows: --ck-ease-emphasized
  • --ck-transition-timing-function-surface#: Easing of surface transitions, such as the background of a switch button.ease

    Details
  • --ck-transition-control#: Transition of the shadow and the border of a control, such as a button.box-shadow .2s ease-in-out, border .2s ease-in-out

    Details · Full description

    Use it as the whole value of transition.

  • --ck-transition-control-fast#: Quick transition of the shadow and the border of a control, such as a text input.box-shadow .1s ease-in-out, border .1s ease-in-out

    Details · Full description

    Use it as the whole value of transition.

  • --ck-animation-duration-feedback#: Duration of feedback animations, such as the shake of a text input with an error..3s

    Details
  • --ck-animation-duration-surface-entrance#: Duration of the animation of a surface that appears, such as the fade-in of a dialog..3s

    Details
  • --ck-animation-duration-progress#: Duration of one cycle of a progress animation, such as the rotation of a spinner.1.5s

    Details
  • --ck-animation-duration-progress-reduced#: Duration of one cycle of a progress animation when the user prefers reduced motion.0s

    Details
  • --ck-animation-timing-function-feedback#: Easing of feedback animations, such as the shake of a text input with an error.ease

    Details
  • --ck-animation-timing-function-progress#: Easing of progress animations, such as the rotation of a spinner.linear

    Details · Full description

    Keep it linear, so that a looping animation keeps an even speed.

  • --ck-animation-fill-mode-feedback#: Fill mode of feedback animations, such as the shake of a text input with an error.both

    Details