[wp-trac] [WordPress Trac] #38995: Twenty Seventeen: Custom headers incorrect on mobile when no image is set.

WordPress Trac noreply at wordpress.org
Thu Dec 1 15:27:54 UTC 2016


#38995: Twenty Seventeen: Custom headers incorrect on mobile when no image is set.
-------------------------------------+------------------------
 Reporter:  joemcgill                |       Owner:  joemcgill
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  4.7
Component:  Bundled Theme            |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------
Changes (by joemcgill):

 * keywords:  has-patch => has-patch needs-testing


Comment:

 @laurelfulford, your patch looked very good and approaches this exactly
 how I was thinking. In [attachment:38995.1.patch] I've made a few
 adjustments on your patch, namely:

 1. Change the `.custom-header-image` class on the container `div` to
 `.custom-header-media`, as you suggested.
 2. Uses the class name `.has-header-video` rather than `.header-video-
 loaded` when a video loads, to match the `.has-header-image` (merely an
 aesthetic change). We also don't need to include a front page check on the
 event listener since the front page check will be handled by the custom
 header video handler.
 3. There are several places where you were adding the `.header-video-
 loaded` class when the element being styled was an `img`. I don't think we
 need to add a style for the video class in those cases, because even when
 the image is used as a fallback, the `has-header-image` class will still
 be applied.
 4. I didn't see where your patch handled the ie8.css file so I added them.
 Perhaps we don't need to handle video header styles for IE8 at all
 however?
 5. I also noticed that your patch broke the image headers on internal
 pages by checking for `is_front_page()` before adding the `has-header-
 image()` in `twentyseventeen_body_classes()`.

 Would appreciate testing and further feedback. Particularly on the
 customize previews changes because I'm not positive I caught everything.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38995#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list