Skip to content

Commit a556e55

Browse files
authored
Merge pull request #18736 from ckeditor/18-06-2025-line-height
Other (core): Implemented the `--ck-content-line-height` CSS variable to standardize `line-height` styling in CKEditor 5 content. See #18710. MAJOR BREAKING CHANGE: The editor now enforces a default line height of `1.5`, affecting both editing and rendered content. This may impact existing styling and layout, so custom line-height settings should be reviewed.
2 parents aa60b77 + 450ae00 commit a556e55

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

packages/ckeditor5-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"lang",
6363
"src/**/*.js",
6464
"src/**/*.d.ts",
65+
"theme",
6566
"CHANGELOG.md"
6667
],
6768
"scripts": {

packages/ckeditor5-core/src/editor/editor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ import { getEditorUsageData, type EditorUsageData } from './utils/editorusagedat
4646
import type { LoadedPlugins, PluginConstructor } from '../plugin.js';
4747
import type { EditorConfig } from './editorconfig.js';
4848

49+
import '../../theme/core.css';
50+
4951
declare global {
5052
// eslint-disable-next-line no-var
5153
var CKEDITOR_GLOBAL_LICENSE_KEY: string | undefined;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4+
*/
5+
6+
:root {
7+
--ck-content-line-height: 1.5;
8+
}
9+
10+
.ck-content {
11+
line-height: var(--ck-content-line-height);
12+
}

packages/ckeditor5-icons/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export { default as IconIndent } from '../theme/icons/indent.svg';
8080
export { default as IconInsertMergeField } from '../theme/icons/insert-merge-field.svg';
8181
export { default as IconItalic } from '../theme/icons/italic.svg';
8282
export { default as IconLegalStyleList } from '../theme/icons/legal-style-list.svg';
83+
export { default as IconLineHeight } from '../theme/icons/line-height.svg';
8384
export { default as IconLink } from '../theme/icons/link.svg';
8485
export { default as IconListStyleCircle } from '../theme/icons/list-style-circle.svg';
8586
export { default as IconListStyleDecimalLeadingZero } from '../theme/icons/list-style-decimal-leading-zero.svg';
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)