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
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
Comment #3
rhovlandMR 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.
Comment #4
rhovlandTest failures are unrelated to changes
Comment #6
jannakha commentedupdated to B5.3
Comment #7
vladimirausThank you all for your contributions. 🎂
Committed.