Skip to content

Conversation

@markconroy
Copy link
Member

Closes #882


Thanks to Big Blue Door for sponsoring my time to work on this.

@NikLP
Copy link
Contributor

NikLP commented Nov 3, 2025

Haven't tested the actual commit, but having employed the same changes in my local subtheme, I can report that the method is sound, so LGTM.

Copy link
Contributor

@tonypaulbarker tonypaulbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some thoughts on the code comment guidance for use cases and examples.

@@ -0,0 +1,17 @@
/*
@file CKEditor styles.
These styles are applied within the CKEditor 5 interface to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the guidance here should be to use sparingly, for cases where the editor could not otherwise tell how the content would be formatted (like style plug ins). The CKEditor window is not meant to match the front end (fonts, colours, spacing and so on) and making it match in some ways but not others can cause confusion. One example of a case is that heading colours may be different for different sections of the site. A suggestion would be to include a real example from the base theme file again here instead of the heading colours.

I think that linters might complain about a file with only comments?

base theme: "localgov_base"
ckeditor5-stylesheets:
# List any stylesheets you want to apply to the CKEditor
# interface here. This allows you to match your content editing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See review comments on scripts/subtheme-items/css/base/ckeditor5.css , applies here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a library for ckeditor styles in the subtheme generator

4 participants