Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56097 closed defect (bug) (fixed)

Theme preview is bugged for all themes in the directory

Reported by: superbthemescom's profile superbthemescom Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0.1 Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: ui, administration Cc:

Description

Originally reported in #meta6376.

Hi!
The preview is aligned right, and 20% of the content is missing in the view on all themes in the Wp.org directory.

Here's how you reproduce it:

  1. On a website with WordPress installed, go to the themes tab and click "Add new": /wp-admin/theme-install.php?browse=popular
  2. Pick any theme and click "Preview".

This bug doesn't occur on wp.org when clicking the preview button, only on websites with WordPress installed.

Can't figure how to upload images, but the bug is easy to replicate anyways.

The bug is caused by following CSS:

#customize-container iframe, .theme-install-overlay iframe {
    width: 100vw;
}

Changing it to follow, fixes it:

#customize-container iframe, .theme-install-overlay iframe {
    width: 100%;
}

Attachments (1)

2022-07-03 12_32_12-Add Themes ‹ DEV — WordPress.png (15.5 KB) - added by Presskopp 2 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 6.0.1

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Moving to 6.0.1, as this was introduced in [52647] / #54764.

#2 @Presskopp
2 years ago

The theme screenshot to the left seems also buggy, since there is a white border on the top of it

#3 @Presskopp
2 years ago

This is helping:

.install-theme-info .theme-screenshot {
    margin: 0 0 15px 0;
    top: 10px;

#4 @SergeyBiryukov
2 years ago

I think we can revert [52647] for now and reopen #54764 for more testing.

#5 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 53663:

Themes: Revert the change of theme preview width on Add Themes screen.

The intention was for the preview ratio to remain accurate for the user's screen size when the sidebar is open, but this appears to have caused unintended side effects to the preview alignment.

Follow-up to [52647].

Props superbthemescom, Presskopp.
Fixes #56097. See #54764.

#6 @SergeyBiryukov
2 years ago

In 53664:

Themes: Revert the change of theme preview width on Add Themes screen.

The intention was for the preview ratio to remain accurate for the user's screen size when the sidebar is open, but this appears to have caused unintended side effects to the preview alignment.

Follow-up to [52647].

Props superbthemescom, Presskopp.
Merges [53663] to the 6.0 branch.
Fixes #56097. See #54764.

Note: See TracTickets for help on using tickets.