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

Mobile/Tablet preview not applying correct styles #24002

Closed
laurelfulford opened this issue Jul 16, 2020 · 3 comments
Closed

Mobile/Tablet preview not applying correct styles #24002

laurelfulford opened this issue Jul 16, 2020 · 3 comments
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. Mobile Web Viewport sizes for mobile and tablet devices [Type] Bug An existing feature does not function as intended

Comments

@laurelfulford
Copy link
Contributor

laurelfulford commented Jul 16, 2020

Describe the bug
The tablet and mobile styles don't appear to be applied to the editor when using the 'Preview' options.

This may be a duplicate of #21193, but it's also happening non-externally loaded CSS, so I opted to create a separate issue in case the cause is different. If not, please feel free to close!

To reproduce
Steps to reproduce the behavior:

  1. Running Gutenberg, and using a theme like Twenty Twenty, edit a post.
  2. Click on Preview and pick Tablet. Compare font-size to front-end at that screen size.
  3. Click on Preview and pick Mobile. Compare font-size to front-end at that screen size.

Expected behavior
That the font sizes would match between the preview and front end.

Screenshots
Tablet in editor:

image

Tablet on front-end (780px wide, like the editor preview and same browser size as above):

image

Mobile in editor:

image

Mobile on front-end (360px wide, like the editor preview and same browser size as above):

image

Editor version (please complete the following information):

  • WordPress version: 5.4.2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Gutenberg plugin
  • If the Gutenberg plugin is installed, which version is it? 8.5.1

Desktop (please complete the following information):

  • OS: OSX 10.14.6
  • Browser: Firefox
  • Version: 78.0.2
@draganescu draganescu added [Type] Bug An existing feature does not function as intended CSS Styling Related to editor and front end styles, CSS-specific issues. Mobile Web Viewport sizes for mobile and tablet devices labels Jul 17, 2020
@carolinan
Copy link
Contributor

I am not able to reproduce using Twenty Twenty on WP 6.0.1, with and without Gutenberg Version 13.7.0-rc.1.
The text size is reduced correctly both in the editor and front.

@kathrynwp
Copy link

@carolinan I took another look at this and I think I'm able still to replicate on heading tags within the body of the page/post content:

For example, here's what the page title, h2 and h3 look like in tablet preview in the editor:

Cursor_and_Add_New_Page_‹Self-hosted_Test—_WordPress

While the page title remains the same size, the h2 and h3 are displayed larger when the page is viewed at the a 780 tablet device size on the front end (using Firefox inspector):

Page_Title_–_Self-hosted_Test

I was not able to replicate with Twenty Twenty-Two, however.

What do you think?

Tested with:

WordPress 6.0.1
Gutenberg 13.8.0 active or inactive
No other plugins active
Theme: Twenty Twenty 2.0

Firefox 103.0.1
macOS 12.2.1

@ellatrix
Copy link
Member

This should be fixed by #33342.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. Mobile Web Viewport sizes for mobile and tablet devices [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants