-
Notifications
You must be signed in to change notification settings - Fork 20
Issue #3526953 by richardgaunt, fionamorrison23, iulianrotaru, joshua1234511: ct-align class overwriting align-center #1397
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
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughAdds CKEditor-specific SCSS: two new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
web/themes/contrib/civictheme/assets/sass/ckeditor/ckeditor.scss (2)
2-3: Correct the component name casing in header commentUse the canonical “CKEditor” spelling to stay consistent with upstream naming and the rest of the code base.
-// This file contains styles for the Ck Editor component in the CivicTheme. +// This file contains styles for the CKEditor component in CivicTheme.
6-6: Remove the unused$rootvariable
$rootis declared but never referenced. Leaving unused variables triggers Stylelintscss/no-unused-variableand adds noise.- $root: &; + // $root placeholder removed – no references found
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
web/themes/contrib/civictheme/assets/sass/ckeditor/ckeditor.scss(1 hunks)web/themes/contrib/civictheme/assets/sass/theme.scss(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Analyze (actions)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: commit
🔇 Additional comments (2)
web/themes/contrib/civictheme/assets/sass/ckeditor/ckeditor.scss (1)
8-16: Adjust margin rules for centered images in CKEditorTo prevent fixed side margins from overriding Drupal’s default centering, split the combined rule so that only left/right use pixel offsets and center uses
auto:// Keep spacing for left/right aligned figures. -&.align-left, -&.align-center, -&.align-right { +&.align-left, +&.align-right { display: block; margin-block-start: ct-particle(2); margin-block-end: ct-particle(2); margin-inline-start: ct-particle-px(5); margin-inline-end: ct-particle-px(5); } +// Preserve true horizontal centering for center-aligned figures. +&.align-center { + display: block; + margin-block-start: ct-particle(2); + margin-block-end: ct-particle(2); + margin-inline-start: auto; + margin-inline-end: auto; +}• Please test in CKEditor by inserting an image and using the Align center toolbar button—confirm it remains horizontally centered.
web/themes/contrib/civictheme/assets/sass/theme.scss (1)
10-10: Import looks good – ensure partial exists in build path
@import 'ckeditor/ckeditor';follows existing import style and will compile as long asassets/sass/ckeditor/_ckeditor.scss(leading underscore) is present. No further action required.
richardgaunt
left a comment
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.
LGTM but Alan will have final review.
web/themes/contrib/civictheme/assets/sass/ckeditor/_ckeditor.scss
Outdated
Show resolved
Hide resolved
d8ddd04 to
d0e0ab8
Compare
https://www.drupal.org/project/civictheme/issues/3526953
Checklist before requesting a review
Issue #123456 by drupal_org_username: Issue titleChangedsection about WHY something was done if this was not a normal implementationChanged
Screenshots
alignment-fixes-v2.mp4
Summary by CodeRabbit
New Features
Style