-
Notifications
You must be signed in to change notification settings - Fork 45
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: restore non-API version of the editor styles #2062
fix: restore non-API version of the editor styles #2062
Conversation
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 working well! It retains what #1548 optimized for the front-end, while simplifying the CSS handling in the editor.
One thing to note is that with these changes, the text sizes in the editor at mobile breakpoints are noticeably larger than what's on the front-end, and than the editor styles before the changes. I think this is okay because the relative sizes between the type scale settings look consistent enough within the editor. Also, I doubt many editors are using this editor view to preview mobile breakpoint styles (the dedicated preview page is better for that).
Thanks @dkoo!
I think this might be a mix of the editor font sizes being a bit bigger on mobile than desktop thanks to the theme, and me not including the editor styles in this change originally -- it bumps up the super-small block sizes on mobile a bit since we had some feedback about them getting too small on small screens. I'm going to hold off merging this 'til first thing tomorrow so I'm around when it goes out, juuuuuust in case 🙂 |
This fixes the occurrence of #1826 on wpcom, thank you |
## [4.6.1](v4.6.0...v4.6.1) (2025-02-27) ### Bug Fixes * restore non-API version of the editor styles ([#2062](#2062)) ([b726d4b](b726d4b))
🎉 This PR is included in version 4.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [4.7.0-alpha.2](v4.7.0-alpha.1...v4.7.0-alpha.2) (2025-02-27) ### Bug Fixes * restore non-API version of the editor styles ([#2062](#2062)) ([b726d4b](b726d4b))
🎉 This PR is included in version 4.7.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
This PR removes the API-based inline CSS introduced here and moves it back into the editor.scss for easier syncing with WP.com.
See: 1200550061930446-as-1209502971732489
Maddeningly, it looks like #1548 may have changed how theEdited to add: this is my mistake, I double-checked and I had this wrong!@media
styles cascaded, so this PR corrects that as well. I based what the correct size should be off the front-end, rather than the current editor styles. This changes the smaller types scales (1-3) by a couple pixels in the editor only.This is a chart based on the front-end in case it helps with testing;
---
means same as the previous breakpoint size. It's a lot, but it should be enough to spot check a few of these at different breakpoints:Sizes from front-end
min-width: 782px
min-width: 1168px
.entry-title
2.6em
3.6em
4.8em
.newspack-post-subtitle
1.4em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
2.4em
3.4em
4.2em
.newspack-post-subtitle
1.4em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
2.2em
3em
3.6em
.newspack-post-subtitle
1.4em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
2em
2.4em
3em
.newspack-post-subtitle
1.4em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
1.7em
2em
2.4em
.newspack-post-subtitle
1.4em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
1.4em
1.6em
2em
.newspack-post-subtitle
1.2em
---
---
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
1.2em
1.6em
.newspack-post-subtitle
---
---
.entry-wrapper p
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
1em
1.2em
---
.newspack-post-subtitle
0.8em
---
---
.entry-wrapper p
0.8em
---
---
.entry-wrapper .more-link
0.8em
---
---
.entry-meta
0.8em
---
---
.entry-title
0.9em
---
---
.newspack-post-subtitle
0.8em
0.7em
---
.entry-wrapper p
0.8em
0.7em
---
.entry-wrapper .more-link
0.8em
0.7em
---
.entry-meta
0.8em
0.7em
---
.entry-title
0.7em
---
---
.newspack-post-subtitle
0.8em
0.7em
---
.entry-wrapper p
0.8em
0.7em
---
.entry-wrapper .more-link
0.8em
0.7em
---
.entry-meta
0.8em
0.7em
---
How to test the changes in this Pull Request:
Testing blocks
npm run build
.px
value may not line up based on the editor's base font size, but theem
size should; this will line up with current behaviour, which is also relative.Other information: