Skip to content

Commit 67ddb40

Browse files
authored
Add info to the update guide.
1 parent 522033a commit 67ddb40

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/updating/update-to-46.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,35 @@ Released on xxx, 2025. ([See full release notes](https://github.com/ckeditor/cke
2020

2121
Below are the most important changes that require your attention when upgrading to CKEditor 5 v46.0.0.
2222

23+
### Introduction of the default content styles
24+
25+
To improve the out-of-the-box experience and accessibility, we are introducing opinionated defaults for content styling. From this version, we ship a small defaults layer applied to `.ck-content`:
26+
27+
```css
28+
29+
:root {
30+
--ck-content-font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;
31+
--ck-content-font-size: medium;
32+
--ck-content-font-color: #000;
33+
--ck-content-line-height: 1.5;
34+
--ck-content-word-break: break-word;
35+
}
36+
37+
.ck-content {
38+
font-family: var(--ck-content-font-family);
39+
font-size: var(--ck-content-font-size);
40+
color: var(--ck-content-font-color);
41+
line-height: var(--ck-content-line-height);
42+
word-break: var(--ck-content-word-break);
43+
}
44+
```
45+
46+
Those content styles are easily replaceable via CSS variable override. It is possible that you already style those things with more specific selectors but we recommend to use the variables from now on.
47+
You can read more about the reasons in our [GitHub issue](https://github.com/ckeditor/ckeditor5/issues/18710).
48+
49+
**Migration:**
50+
* If you notice that the new editor's content styling affected your content appearance, make sure to update your custom style sheet, and use the new variable names.
51+
2352
### Content area CSS variables renamed to `--ck-content-*` prefix
2453

2554
To improve consistency, all CSS variables that affect the styles of the editor content area ("content styles") have been renamed to use the `--ck-content-*` prefix. This change affects variables used for highlights, image captions, mentions, table captions, image style spacing, and to-do list checkmarks.

0 commit comments

Comments
 (0)