Problem/Motivation

ck5styles.scss imports the main sass file and prefixes it with .ck-content.
That stylesheet is attached to the page whenever a CKeditor enabled field is displayed, including in admin themes.

When editing in a CKeditor field that's displayed with the bootstrap5 theme everything is displayed correctly according to the theme variables.

However in an admin theme all of the variables are missing. This means all of the colors and other styling set via variables are missing. This is because the bootstrap variables on :root are being prefixed with .ck-content which is invalid and the browser ignores them.

Steps to reproduce

Proposed resolution

Generate the CSS variables properly. They should either be on :root or .ck-content but prefixing them with .ck-content will require editing upstream bootstrap files which is probably undesirable. Since the CSS variables are prefixed with bs- it's probably safe to just attach them to :root.

Issue fork bootstrap5-3490342

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rhovland created an issue. See original summary.

rhovland’s picture

MR fixes issue by generating css variables and attaching them to :root. Comparing the variables from styles.css and ck5styles.css reveals an identical output. The rest of ck5styles.css is unchanged.

rhovland’s picture

Status: Active » Needs review

Test failures are unrelated to changes

jannakha made their first commit to this issue’s fork.

jannakha’s picture

Status: Needs review » Reviewed & tested by the community

updated to B5.3

vladimiraus’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Thank you all for your contributions. 🎂
Committed.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.