Skip to content
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

Fix email editor styles sneaking into other editors #7258

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Nov 2, 2023

Resolves #7228

Proposed Changes

  • Moves the import of the css to the inside of a wrapper class to make sure the styles will be applied only for emails

Testing Instructions

  1. Activate the Twenty Twenty Three theme.
  2. In the site editor, edit the "Blog Home" template.
  3. Open DevTools and select one of the elements with the wp-block-site-title class.
  4. See that the no styles are coming from the email-editor-style.css file.
  5. Open the Email Template in editor
  6. Make sure the styles are getting applied as expected
  7. Open an email in editor from Sensei LMS -> Settings -> Emails
  8. Make sure the styles are getting applied as before and it isn't broken

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@Imran92 Imran92 added this to the 4.20.0 milestone Nov 2, 2023
@Imran92 Imran92 requested a review from a team November 2, 2023 13:36
@Imran92 Imran92 self-assigned this Nov 2, 2023
@donnapep donnapep modified the milestones: 4.20.0, 4.19.1 Nov 6, 2023
Copy link
Collaborator

@donnapep donnapep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to note that the styles are not exactly the same for emails, as now more styles are being applied for them. But they actually look slightly better and this was probably the original intention.

@donnapep donnapep merged commit 9ffdfa8 into trunk Nov 6, 2023
23 of 24 checks passed
@donnapep donnapep deleted the fix/email-editor-styles-sneaking-into-other-editors branch November 6, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email styles are leaking into other block templates
2 participants