WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#26677 closed defect (bug) (fixed)

Media modal still has old style on front-end.

Reported by: iseulde Owned by: nacin
Milestone: 3.8.1 Priority: low
Severity: minor Version: 3.8
Component: Media Keywords: has-patch fixed-major
Focuses: ui Cc:

Description

When opening the media modal on the front-end (with a theme like p2 for example), it still has the old style and some weird back lines.

Attachments (3)

Screen Shot 2013-12-19 at 00.10.02.png (281.8 KB) - added by iseulde 6 years ago.
Front-end
26677.patch (51.5 KB) - added by collinsinternet 6 years ago.
Modification of media-views.css and media-views.min.css.
26677.2.patch (3.9 KB) - added by iseulde 6 years ago.

Download all attachments as: .zip

Change History (19)

#1 @SergeyBiryukov
6 years ago

  • Component changed from Appearance to Media
  • Keywords ui-focus added
  • Milestone changed from Awaiting Review to 3.8.1

#2 @collinsinternet
6 years ago

This appears to be the result of the theme not including /wp-admin/css/colors.min.css OR perhaps
wp_enqueue_style('colors-fresh'); on line 64 of /wp-includes/class-wp-admin-bar.php.

Unfortunately, this stylesheet has items that can alter a theme's layout. Unless there were a condensed version of just the styling for the media upload included as part of the admin-bar or admin logged in stylesheets, then that would work.

#3 @SergeyBiryukov
6 years ago

wp-includes/css/media-views.css probably needs an update.

@collinsinternet
6 years ago

Modification of media-views.css and media-views.min.css.

#4 @collinsinternet
6 years ago

  • Keywords has-patch added

#5 @SergeyBiryukov
6 years ago

No need to patch minified files, a post-commit task takes care of that.

There's a constant you can add to your wp-config.php file to use unminified files:
http://codex.wordpress.org/Debugging_in_WordPress#SCRIPT_DEBUG

The new rules in 26677.patch can be combined with the existing one:
tags/3.8/src/wp-includes/css/media-views.css#L473.

#6 @collinsinternet
6 years ago

Good to know @SergeyBiryukov. Thanks for the info. This was my first patch so I wasn't sure if I had to do both for minified files.

@iseulde
6 years ago

#7 follow-up: @iseulde
6 years ago

It's probably best to move the styles that affect the media modal from colors.css to media-views.css so that they're applied to both the admin and front-end. This gives the modal at least a default look, and colours can be overwritten. Of course it doesn't affect the front-end, but that's the same for the admin bar.
This patch solves the problem that was introduced with the new admin styles, but it still doesn't look entirely like the modal in the admin. E.g. headings change (try Twenty Thirteen), input elements have mostly the themes' styles etc.

#8 @samuelsidler
6 years ago

  • Cc helen added
  • Priority changed from normal to low
  • Severity changed from normal to minor

#9 in reply to: ↑ 7 ; follow-up: @helen
6 years ago

Replying to avryl:

This patch solves the problem that was introduced with the new admin styles, but it still doesn't look entirely like the modal in the admin. E.g. headings change (try Twenty Thirteen), input elements have mostly the themes' styles etc.

That's how it was before, so it seems fine for 3.8.1. If any more resets/baselines are desired, they can be handled in a separate enhancement ticket.

#10 @helen
6 years ago

  • Keywords fixed-major added

#11 @helen
6 years ago

In 26929:

Move media modal colors out of colors.css and into media-views.css, as the modal can be triggered on the front end. props avryl, props collinsinternet for the initial patch. see #26677 for trunk.

#12 in reply to: ↑ 9 @iseulde
6 years ago

Replying to helen:

That's how it was before, so it seems fine for 3.8.1. If any more resets/baselines are desired, they can be handled in a separate enhancement ticket.

Yeah, I know. Just highlighting the problem. I'll create a separate ticket. Maybe it's something that would be easier to handle when wp-admin.css splits up.

#13 @nacin
6 years ago

Merging [26929] to the 3.8 branch is going to force a rebuild of every color scheme. Can we omit the colors.css block from the 3.8 branch? Seems like the new rules in media-views would simply override it cleanly?

#14 @helen
6 years ago

Yes, should be fine to just not remove those lines from colors.css for 3.8.1.

This ticket was mentioned in IRC in #wordpress-dev by avryl. View the logs.


6 years ago

#16 @nacin
6 years ago

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

In 26992:

Copy media modal colors out of colors.css and into media-views.css, as the modal can be triggered on the front end.

Merges part of [26929] to the 3.8 branch.

props avryl.
props collinsinternet for the initial patch.
fixes #26677.

Note: See TracTickets for help on using tickets.