Problem/Motivation
Current CKEditor stylsheet is bleeding because:
ckeditor5-stylesheets:
- /libraries/dsfr/dist/core/core.css
- /libraries/dsfr/dist/utility/icons/icons.css
It's needed for proper display of DSFR icons in CKEditor.
Steps to reproduce
Open a node with body and icons plugin.
Proposed resolution
Have this css created dynamically from a route, or create a manual css copy.
Related to #3535140: CKEditor dsfr css bleeding
Issue fork ui_suite_dsfr-3535143
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 #2
mogtofu33 commentedComment #4
grimreaperComment #6
grimreaperHi,
I have created a quick and dirty workaround to avoid problem on existing websites if they want. I copied the CSS from app/libraries/dsfr/dist/core/core.css impacting icons.
I agree that a dedicated dynamic to be generated is a good solution. But as ui_suite_dsfr is a theme it can't provide controller and route.
I think, we can create a new route in UI Styles like ui_styles.stylesheet but in the extraction logic, instead of filtering regarding the styles plugin, it could take as parameters:
- prefix (like existing route)
- library (list of libraries or string if targeting just one)
And so it would just generate from the CSS of this library.
Comment #7
grimreaperHum, thinking out loud.
But if this new route has nothing to do with styles plugin, why put it in ui_styles?
Should this logic be extracted into a dedicated module?
Comment #8
mogtofu33 commentedWrapped the css in .ck-content and added pictogram and icons colors.
For sure this kind of route seems strange in ui_styles, and dynamic prefix would be huge as dsfr is huge (The PHP process to wrap is heavy)
I tried a packed solution with prefix to include (with gulp for example), but there is some co lateral problems.
The current dirty fix seems enough for me.
Comment #9
just_like_good_vibesok let's merge that
Comment #10
just_like_good_vibesComment #12
just_like_good_vibes