guideTheme customization

Similarly to CKEditor 5, Letters is using PostCSS and CSS Variables to handle design customization.

# Typography

By default Letters is using three types of fonts:

:root {
    /* Letters article content: paragraphs, lists, block quotes... */
    --ltrs-font-family-article: Georgia, serif-sans;

    /* Letters article content: heading 1, heading 2, title... */
    --ltrs-font-family-headers: Helvetica Neue, Helvetica, Arial, sans-serif;

    /* Letters UI elements like top bar, sidebar. */
    --ltrs-font-family-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

You can easily change the fonts by overriding them in your custom stylesheet (or in the <head> element of your web page).

Modifying font-family is not the only way you can play with typography in Letters. Every component like paragraphs or headings is using em values for font-size, so changing the default size will scale them down or up (except collaboration plugins like presence list or comments — see the section below).

:root {
    /* Default font-size for Letters content. */
    --ltrs-font-size-base: 19px;

    /* Handling collaboration plugins font-size (and other CKEditor 5 components). */
    --ck-font-size-base: 13px;

# Letters container

Letters is wrapped by the ltrs-editor class. Inside it you can find the ltrs-topbar and ltrs-content classes. You can control the width of content and sidebar thanks to CSS Variables.

:root {
    /* Default height of Letters with an empty document. */
    --ltrs-content-min-height: 450px;

    --ltrs-content-width: 1140px;
    --ltrs-textarea-width: 700px;
    --ltrs-sidebar-width: 320px;

    --ltrs-topbar-height: 54px;

    /* Padding around Letters content. */
    --ltrs-content-padding: 50px;
    --ltrs-padding-bottom: 100px;

# Letters components

# Blockquote

You can see a different <blockquote> appearance than in the default CKEditor 5 default. We decided to get rid of the popular left border in the quote and change it into an image background. Its size is also controlled with a CSS Variable.

:root {
    /* Handling the size of the block quote icon background is easy. */
    --ltrs-blockquote-icon-size: 3.5em;

.ltrs-editor blockquote {
    /* You can change the background or disable it . */
    background-image: url(data:image/svg+xml,;

# Top bar and its plugins

You can customize not only the height but also the color of the top bar:

:root {
    --ltrs-color-topbar-background: rgba(235, 241, 247, 0.9);

# Finish editing button

You can change the Finish editing button background color in the default and warning state (in case with unsaved comment or content).

For example, change var(--ltrs-color-green) to a HEX, RGB(A) or HSL(A) color format or globally modify this variable to keep one hue of green in every component of Letters.

:root {
    --ltrs-color-finish-background-default: var(--ltrs-color-green);
    --ltrs-color-finish-background-warning: var(--ltrs-color-red);

# Notification center

Like with the Finish editing button, you can override CSS Variables and modify the color of the notification center icon and headings in the balloon panel.

:root {
    --ltrs-color-notification-default: var(--ltrs-color-blue);
    --ltrs-color-notification-success: var(--ltrs-color-green);
    --ltrs-color-notification-danger: var(--ltrs-color-red);

# CKEditor 5 overrides

# Global overrides

Letters is using the CKEditor 5 Lark theme with a few overrides which makes its design a little bit different from the default CKEditor 5 appearance. Some elements have changed button backgrounds and the icon color inside them. You can find the full set of customized variables below:

:root {
    /* Change the default color of icons in the toolbar. */
    --ck-color-text: var(--ltrs-color-white);

    --ck-color-base-foreground: var(--ltrs-color-gray-blue);

    --ck-balloon-arrow-height: 11px;
    --ck-balloon-arrow-half-width: 7px;
    --ck-color-toolbar-border: var(--ltrs-color-gray-blue);
    --ck-color-panel-border: var(--ltrs-color-gray-blue);
    --ck-color-panel-background: var(--ltrs-color-gray-blue);

    /* Change the default button colors for all states. */
    --ck-color-button-default-background: var(--ltrs-color-gray-blue);
    --ck-color-button-default-active-background: hsl(213, 17%, 42%);
    --ck-color-button-default-active-shadow: hsl(213, 17%, 42%);
    --ck-color-button-default-focus-background: hsl(213, 15%, 42%);
    --ck-color-button-default-disabled-background: var(--ck-color-button-default-background);

    --ck-color-button-on-background: hsl(213, 15%, 29%);
    --ck-color-button-on-active-background: hsl(213, 15%, 29%);
    --ck-color-button-on-active-shadow: hsl(213, 15%, 29%);
    --ck-color-button-on-focus-background: hsl(213, 15%, 33%);

However, there are even more changed CKEditor 5 styles. Below you can find additional overriddes with a stronger CSS Specificity than :root. They are nested in classes, so if you want to edit them, you need to use at least an even or stronger specificity.

The default CKEditor 5 colors of the save and cancel icon in inline forms were changed to achieve better accessibility.

.ck-link-form {
    --ck-color-button-save: hsl(150, 100%, 70%);
    --ck-color-button-cancel: hsl(0, 100%, 80%);

.ck-link-actions {
    --ck-color-link-default: var(--ltrs-color-blue-light); /* which is hsl(190, 100%, 50%) */

# Collaboration plugins

In Letters you can find real-time collaboration plugins that enable collaborative editing and provide such features as the user presence list, comments or the user selection in the content. In the snippets below you can find a few Letters overrides that change the default appearance of some UI elements.

# Comments sidebar

In Letters you can notice the changed design of one of the collaboration plugins: the comments sidebar.

.ltrs-editor {
    /* Overwrite default CKEditor 5 styles for the comments sidebar. */
    --ck-color-comments-icon: hsl(213, 15%, 50%);
    --ck-color-comments-count: var(--ltrs-color-blue); /* which is hsl(208, 73%, 60%) */
    --ck-color-comments-background: hsl(210, 50%, 97%);
    --ck-color-comments-separator: hsl(210, 50%, 95%);
    --ck-color-comments-info: var(--ltrs-color-text-dark-hint); /* which is hsla(212, 79%, 9%, .38) */
    --ck-color-comments-remove-background: hsl(0, 83%, 93%);

.ltrs-editor {
    /* Revert default button styles in the comments sidebar like in CKEditor 5. */
    --ck-color-button-default-background:               transparent;
    --ck-color-button-default-focus-background:         hsl(0, 0%, 90%);
    --ck-color-button-default-active-background:        hsl(0, 0%, 85%);
    --ck-color-button-default-active-shadow:            hsl(0, 0%, 75%);
    --ck-color-button-default-disabled-background:      transparent;

    --ck-color-button-on-background:                    hsl(0, 0%, 87%);
    --ck-color-button-on-focus-background:              hsl(0, 0%, 77%);
    --ck-color-button-on-active-background:             hsl(0, 0%, 73%);
    --ck-color-button-on-active-shadow:                 hsl(0, 0%, 63%);
    --ck-color-button-on-disabled-background:           hsl(0, 0%, 87%);

# Presence list

By default in the presence list dropdown, with more than 5 users connected, the avatars are the same size as in the top bar. We decided to reduce them a bit and there are styles responsible for this:

.ck-presence-list__balloon .ck-user{
    --ck-user-avatar-size: 32px;

# Users avatar

And finally here is the last overridden component of the collaboration plugins — namely a different background for the user avatar.

.ltrs-editor .ck-user,
.ck-presence-list__balloon .ck-user {
    --ck-user-avatar-background: var(--ltrs-color-gray-blue) /* which is hsl(213, 15%, 35%) */