Making WordPress.org

Opened 15 months ago

Last modified 6 months ago

#7287 new defect (bug)

Theme Preview background should be white

Reported by: raikas's profile raikas Owned by:
Milestone: Priority: normal
Component: Theme Directory Keywords:
Cc:

Description

The theme preview's background is dark (# 1d2327 in .theme-install-overlay .wp-full-overlay-main), causing websites expecting the website background to be white by default to show incorrectly.

By default in pretty much all browsers the background is always white, and the air-light theme expects that. And I think that the theme preview should be white to mimic normal browser behaviour.

Issue on Air Light theme issue tracker: https://github.com/digitoimistodude/air-light/issues/183
Affected page: https://wordpress.org/themes/air-light/ (and others) -> press "Preview"

Change History (4)

#1 @dufresnesteven
15 months ago

Out of curiosity, why would your theme expect the browser background to be white?

#2 @raikas
15 months ago

Well, the theme itself doesn't "expect expect" it to be white, but as all major browsers have a white background by default, having a single statement with "html { background: #fff }", just for the WordPress.org site to work, feels dumb.

#3 @dd32
11 months ago

It might be worth keeping this as-is, just because not all browser themes do set a white background - while it's common, it's not at all enforced or required.

https://github.com/jgthms/minireset.css/issues/17 has a range of examples of where it's not as expected.

#4 @dufresnesteven
6 months ago

@ryelle We couldn't easily update the iframe background color because of how the old previewer loaded and handled viewport resizing. With the latest changes, what do you think about adding a default background color of #fff to the iframe?

Note: See TracTickets for help on using tickets.