Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
Claro theme
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2021 at 13:48 UTC
Updated:
8 Jun 2021 at 14:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lauriiiComment #4
jenniferhoude commentedComment #8
jenniferhoude commentedAdded styling for hover and focus on toolbar configuration for ckeditor admin UI.
Here is a current patch that will work.
Comment #9
jenniferhoude commentedComment #10
jenniferhoude commentedComment #11
bnjmnmThe issue is scoped as an issue with Claro, but the changes are made to the CSS in the CKEditor module. This would result in Claro's focus styling being applied to all themes (that don't override this style). If it's a Claro-specific issue, the change should be made in Claro.
Comment #12
mradcliffeI performed Novice Triage on this issue. I added the Novice tag as well as NorthAmerica2021 and Easy out of the Box to increase visibility. I unassigned the issue because there hasn't been any work in a few weeks. We should leave it unassigned and use comments to mention that we are working on the issue and when we're done.
It looks like the next steps per bnjmnm's review in comment #11 is to assess the scope of the issue and apply jenniferaube's patch in Claro directly if it does not apply to all themes.
It looks like there is a merge request and a patch. We should choose one of those options and mention which is the work to review in the issue summary.
Comment #13
jenniferhoude commentedComing back to this in DrupalCon NA 2021 contribution April 14th
Comment #14
jenniferhoude commentedComment #16
jenniferhoude commentedCreated new MR with patch attached. Added css to Claro core theme rather than ckeditor module.
Comment #17
jenniferhoude commentedComment #18
bnjmnmHi @jenniferaube, it looks like your patch/MR is failing because you are editing the css file directly instead of the .pcss.css file that is used for compiling the CSS. This is not particularly intuitive 🙂. Info on working with Claro CSS can be found here https://www.drupal.org/docs/8/modules/claro/development
Comment #19
bnjmnmComment #20
vsujeetkumar commentedComment #21
vsujeetkumar commentedComment #22
mgiffordThis is a pretty simple change.
Here's a before shot:
And the after shot:
I think this is good.
Comment #25
catchRestoring status after HEAD was broken.
Comment #26
gauravvvv commentedAfter patch #20, I am getting double focus on Active toolbar items.
Attaching a screenshot for reference.
Comment #27
lauriiiMoving back to needs work to address #26.
Comment #28
bnjmnmThe focus outline isn't missing in the entire toolbar configuration, just the "Available buttons" area. This is due to the following rule in CKEditor's ckeditor.admin.css
The issue summary should be updated to specify where the problem is happening. Ideally, the solution would apply Claro's green focus outline instead of the browser default, so it is consistent with the other outlines.
Comment #29
sakthivel m commentedProviding updated version of patch #29 as per comment #28
Comment #30
bnjmnmThis is added to the global styling library, which loads it on every page. This only needs to be loaded on pages with CKEditor. This can be accomplished by extending the ckeditor/drupal.ckeditor library instead.
Comment #31
bnjmnmComment #32
vsujeetkumar commented@bnjmnm I have worked on #30, I found that library(ckeditor/drupal.ckeditor) already extended, After adding css file withing the library, Its not working. However Its working fine with library(core/ckeditor). I have created the patch, Please have a look and advise.
Comment #33
guilhermevp commentedManual test for new patch extending library(core/ckeditor) work as intended.
Before patch:

After patch:

RTBC +1
Comment #34
manojithape commentedComment #35
manojithape commentedVerified and tested patch MR !556 i.e. https://git.drupalcode.org/project/drupal/-/merge_requests/556.patch on the drupal 9.3.x-dev version and Claro 9.3.0-dev version. Patch applied successfully and looks good to me.
Testing Steps:
Testing Results:
After applying the patch by pressing the tab focus is visible for the toolbar items.
Please refer attached Before patch and After patch images for reference.
Moving this ticket to RTBC.
Comment #36
manojithape commentedComment #37
bnjmnmSwitching back to needs work
ckeditor.admin.css, so the solution should be an extension of the library that adds that file.ckeditor.admin.css, is loaded by the libraryckeditor/drupal.ckeditor.admin(seeckeditor.libraries.yml), so that is the correct library to extend.Comment #38
sakthivel m commentedProviding updated version of patch #38 as per comment #37
Comment #40
gauravvvv commentedComment #41
bnjmnmThe existing extension of
ckeditor/drupal.ckeditorshouldn't be changed.A new libraries-extend item should be added for
ckeditor/drupal.ckeditor.adminThe CSS shouldn't be added to this existing file. This stylesheet is for styling the editor itself. The fix is updating the styles of the ckeditor admin form.
This should be in a new stylesheet that is part of a new library, specifically created to extend
ckeditor/drupal.ckeditor.admin. To get a better sense of what needs to go in what library/extension, check out ckeditor.libraries.yml to see which files belong to which library. Claro's extensions should maintain that structure.Comment #42
bnjmnmIt doesn't look like I have permissions to change the version the merge request is compared against, so here it is in patch form.
This loads the fix CSS only when the problem-causing CSS is loaded. It fixes the lack of focus in the available buttons row without impacting the already-working focus elsewhere.

(I wanted to mention there's a bit of unexpected time sensitivity to this issue due to CKEditor 5. Typically I wouldn't want to jump in on something I've already been reviewing when contributors haven't had much time to respond to feedback. Find me on Drupal slack if anyone wants help finding/finishing other issues 🙂)
Comment #43
zrpnrThe patch in #42 extends the
ckeditor/drupal.ckeditor.adminlibrary which is where the conflictingbox-shadowis added.That means this claro override only loads with that library.
The
claro/ckeditor-adminjust loads one file,css/theme/ckeditor.admin.csswhich overrides
core/modules/ckeditor/css/ckeditor.admin.css.ckeditor-toolbar-disabled .ckeditor-buttons li abox-shadowby targeting the:focusThis is the solution pointed out in #28.
It's non-destructive, as opposed to just deleting that box shadow from the core ckeditor css, so any themes that expected the old box shadow won't be affected. It adds it just for the ckeditor disabled toolbar items.
Followed the steps in #35 and confirm that the library loads correctly and the focus style from Claro is
no longer overridden by the ckeditor box-shadow. edit: more specifically, the override matches Claro's normal focus style for box-shadow.Comment #46
lauriiiCommitted f881860 and pushed to 9.3.x. Thanks!