Problem/Motivation

When subtheme is enabled ck5styles.css are loaded for both bootstrap5 and subtheme.
ck5styles.css contains css variables which resets all subthemes variables and pages lose styling.

screenshots attached

Steps to reproduce

- enable subtheme
- customise subtheme (ensure changes are made to css variables)
- on some pages styling flips back to default bootstrap5

Proposed resolution

make sure ck5styles are only loaded for subtheme

Remaining tasks

- fix issue

Issue fork bootstrap5-3561609

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

jannakha created an issue. See original summary.

jannakha’s picture

CKEditor5 module doesn't allow library-overrides
related issue: https://www.drupal.org/project/drupal/issues/3458077
if using patch from #3458077 add to your subtheme.info.yml

libraries-override:
  bootstrap5/ckeditor5-stylesheets: false

jannakha’s picture

Status: Active » Needs review

please review/comment on the proposed solution
this will require a patch from https://www.drupal.org/node/3458077

erutan’s picture

This seems to be working for me, I had some buttons and footer background that would occasionally be default colors. I'll comment again if it sticks, but the multistage aspect of this makes it a somewhat complex fix to implement.

vladimiraus’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.
Thank you for your contribution.

vladimiraus’s picture

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

Committed. Thanks.

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

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

Maintainers, credit people who helped resolve this issue.

  • vladimiraus committed 28491a49 on 4.0.x
    feat: #3561609 Bootstrap5 interferes with subtheme's styles
    
    By:...

Status: Fixed » Closed (fixed)

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