Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing heading styles in "installation/advanced/content-styles.html" #15555

Open
surfinzap opened this issue Dec 18, 2023 · 3 comments
Open
Labels
squad:core Issue to be handled by the Core team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).

Comments

@surfinzap
Copy link

Origin URL

https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html

Project version

40.2.0

Is the information outdated? How?

No response

Is there something missing in the guide? What is it?

I'd welcome heading styles in the list of content styles as an example to override. I'm assuming that something like this should probably work?

.ck-content h1 {
  font-size: var(--custom-h1-font-size);
}

.ck-content hN {
...
}

Is there anything else you would like to add?

No response

User agent

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0

@surfinzap surfinzap added squad:core Issue to be handled by the Core team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide). labels Dec 18, 2023
@Reinmar
Copy link
Member

Reinmar commented Dec 19, 2023

The editor comes with many styles, but mostly related to the "extras". Stuff that otherwise wouldn't look reasonable – e.g. block quotes, code blocks, images, tables, media embeds, etc. The basic typography is left for the integrator as a great majority of integrators will want to have custom styles here.

If we included basic typography into editor styles to make the content look good by default, integrators would have to override those styles, which is always a bit trickier than just writing new.

In other words, this is on purpose. 

However, things may change since we're considering (see #15502) splitting the CSS from the JS soon. The CSS would still be massive, if it contained both the content and the editor styles. Also, the content styles are composed of two parts – those that could be overridden and styles of things like widget borders, the resize handles, etc. The latter should not be touched unless someone really knows what to do.

But anyways, it could be a good moment to consider shipping (apart from the current, combined CSS) a split set of CSS files (editor UI, content UI, and content styles).

cc @filipsobol @Witoso

@Witoso
Copy link
Member

Witoso commented Dec 20, 2023

Meanwhile, take a look at the headings configuration in which headings can be styled via classes.

@surfinzap
Copy link
Author

Thanks, @Reinmar, for explaining the current state and plans, and thanks, @Witoso, for pointing me out to the headings config. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:core Issue to be handled by the Core team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).
Projects
None yet
Development

No branches or pull requests

3 participants