-
Notifications
You must be signed in to change notification settings - Fork 27
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
Preserve all selectors in CSS files during split into editor and content stylesheets. #972
Preserve all selectors in CSS files during split into editor and content stylesheets. #972
Conversation
Could I ask you to explain what the problem was? |
Will wrote an explanation when i finish the task, for now it's still WIP. |
…t into editor and content stylesheets.
@pomek I've updated the |
/** | ||
* CSS rule type which are supported by this plugin. | ||
*/ | ||
const SUPPORTED_RULE_TYPES = [ 'rule', 'media', 'keyframes' ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but I worry that long-term we might miss other types.
Work will continue in #979. |
Suggested merge commit message (convention)
Fix (build-tools): Should preserve all selectors and at-rules in CSS files during split into
editor
andcontent
stylesheets. Closes ckeditor/ckeditor5#16703.Additional information
The main problem was when we were splitting main css file into
editor
andcontent
. Mainly it was done using.ck-content
CSS class as a main target what should be put intocontent
file and all the rest should land intoeditor
. But this condition didn't include neither@media
queries or animations with@keyframes
that class contains.Currently all
@media
queries are splitted by class name mention above.The
@keyframes
are gathered from whole main css file; also all selectors that are containinganimation
oranimation-name
are gathered and compared in against selector that are used into. By this they can be correctly divided and added to desired css stylesheets.Also some CSS classes were omitted when there were more than one selector in definition. It's also fixed in this PR.