-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move hard coded colors from components to global _colors.css #9738
Conversation
@oleq could you have a look at it? |
@adamerose I'm not sure why you had to override colors in .ck.ck-editor__editable_inline.ck-blurred ::selection {
background: red;
} |
This seems like a workaround for the issue I described, whereas my PR fixes the underlying issue. I think users should be able make color themes following the theming documentation without needing to manually style individual elements that don't follow the color theme CSS variables.
That is the process for color theming described in the documentation, it links to that file.
While I was searching through GitHub issues and code trying to figure out how to properly make a consistent CKEditor5 color theme I found an old comment about this:
My opinion would be that non-generic colors should not exist, they all should be derived from theme-based CSS variables that users can adjust so it's easy to modify themes. Otherwise you end up having to manually override element styles like you just said so you don't get a light grey highlight color on light grey text and other inconsistencies. I made a more general issue about this topic #9734. |
@adamerose Nowhere in the documentation is recommended to override built-in CSS files before compilation. As a matter of fact, quite the contrary it says:
We recommend you store custom property overrides in a dedicated CSS file in your project (outside CKEditor 5 building process). Overrides stored in this file (be it It does not really matter if |
Yeah I didn't mean before compilation, I'm just overriding them by setting my own values for those variables. And I do this in my own CSS file like you said. I used the word "override" because that's what the docs call it. eg.
It matters because the user needs to know that variable exists. The docs say "Check out the color sheet for a full list of customizable colors." which indeed seems to contain almost every color variable. The only color variables that aren't in So I guess one solution is to add |
Bumping this. I still believe all colors in the CKE5 UI should be controlled by variables stored in I've just added the source editor feature to my build and am again using Chrome devtools to inspect it and doing manual overrides on
I just want to reiterate... yes users can just manually override everything, but if you just keep all color variables in
|
There has been no activity on this PR for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the contribution, leave a comment or reaction under this PR. |
We've closed your PR due to inactivity over the last year. While time has passed, the core of your contribution might still be relevant. If you're able, consider reopening a similar PR. |
This posed a problem for me while I was trying to implement my own dark theme by overriding colors in _colors.css as described by the documentation. I had this light background on unfocussed selected text and had to go through the components css files to find where this was defined and override it myself.