* Ensures dark color scheme has proper box shadow and hover/focus styles.
* Make sure links are correct width.
Props afercia, laurelfulford.
Fixes#38969.
git-svn-id: https://develop.svn.wordpress.org/trunk@39418 602fd350-edb4-49c9-b593-d223f7449a82
Following [39413], this adds `.has-header-video` style definitions in
`/inc/custom-header.php` to support custom color schemes.
Props laurelfulford.
Fixes 38995.
git-svn-id: https://develop.svn.wordpress.org/trunk@39415 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that a standard header is shown on the front page whenever
a header video is set without a header image if the video doesn't load,
e.g., on mobile sizes or if the JS doesn't fire.
This adds a new class, `.has-header-video` that is added whenever the
`wp-custom-header-video-loaded` event is fired, which is then used to style
the custom headers along with `.has-header-image` whenever a header image
is available. This also changes the class name on the custom header media
wrapping `div` from `.custom-header-image` to `.custom-header-media`.
Props laurelfulford, joemcgill.
Fixes#38995.
git-svn-id: https://develop.svn.wordpress.org/trunk@39413 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the top of the page had more space than the bottom, not matching the original design.
Props laurelfulford, melchoyce.
Fixes#38972.
git-svn-id: https://develop.svn.wordpress.org/trunk@39404 602fd350-edb4-49c9-b593-d223f7449a82
This allows the styles to work correctly when modified by high contrast computer setups.
Props presskopp.
Fixes#38939.
git-svn-id: https://develop.svn.wordpress.org/trunk@39388 602fd350-edb4-49c9-b593-d223f7449a82
This way screen reader users will know what to expect when they use this link.
Props rianrietveld.
Fixes#38970.
git-svn-id: https://develop.svn.wordpress.org/trunk@39384 602fd350-edb4-49c9-b593-d223f7449a82
This adds 1px of bottom padding to header videos to keep them from
extending past the footer at the bottom of the page.
Fixes#38950.
git-svn-id: https://develop.svn.wordpress.org/trunk@39380 602fd350-edb4-49c9-b593-d223f7449a82
Featured image support means that attachments can now be imported. Media can be sideloaded from within theme or plugin directories. Like other posts, attachments are auto-drafts until customizer changes are published, and are not duplicated when they already exist in the customized state. Attachment IDs can be used for any number of purposes, much like post IDs. Twenty Seventeen now includes 3 images used as featured images to best showcase the multi-section homepage setup.
As featured image IDs are stored in post meta, it also made sense to add support for page templates. Twenty Seventeen does not include any such templates, but the functionality can be quite important for displaying themes to their best effect.
props westonruter, helen, flixos90.
fixes#38615.
git-svn-id: https://develop.svn.wordpress.org/trunk@39346 602fd350-edb4-49c9-b593-d223f7449a82
This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.
Props tg29359, afercia, odysseygate.
Fixes#38876.
git-svn-id: https://develop.svn.wordpress.org/trunk@39341 602fd350-edb4-49c9-b593-d223f7449a82
This makes a few adjustments to CSS to bring them inline with WordPress
CSS coding standards including:
* Font weights should be defined using numeric values
* Do not pad parentheses with spaces
This also fixes a couple of typos to inline comments.
Props netweb for initial patch.
Fixes#38901.
git-svn-id: https://develop.svn.wordpress.org/trunk@39340 602fd350-edb4-49c9-b593-d223f7449a82
It appears IE11 needs an explicit width for an `inline-block` parent element.
props derrickkoo, afercia.
fixes#38872.
git-svn-id: https://develop.svn.wordpress.org/trunk@39339 602fd350-edb4-49c9-b593-d223f7449a82
iOS disables this feature under the hood, but it also distorts the images – unlike other mobile devices that don't support it. So this adds a check for both `background-attachment: fixed` support or whether it’s an iOS device - passing it adds the class `background-fixed` which is used to add the proper styles.
It also lowers the media query so the parallax-like style is present on a wider range of screens since this bug can be better targeted and avoided. In this way, screens that aren't the offending devices aren't punished merely based on screen size.
Props joemcgill, laurelfulford, helen.
Fixes#38395.
git-svn-id: https://develop.svn.wordpress.org/trunk@39297 602fd350-edb4-49c9-b593-d223f7449a82
The `sizes` attribute was calculated incorrectly, resulting in the browser downloading the wrong resource. This filters the attribute to correct that.
Before the filter, the `img` contained:
`sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px"`
And after:
`sizes="100vw"`
Props joemcgill, transl8or.
Fixes#38847.
git-svn-id: https://develop.svn.wordpress.org/trunk@39291 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [39248] that applies a bit more compression to
the default header image in Twenty Seventeen.
Props Presskopp, lukecavanagh.
Fixes#38793.
git-svn-id: https://develop.svn.wordpress.org/trunk@39279 602fd350-edb4-49c9-b593-d223f7449a82
Following [39272], this uses the `header_video_settings` filter to modify
the default video header control markup and adds theme specific styles
for the play/pause button.
Props melchoyce, laurelfulford, joemcgill, davidakennedy, bradyvercher.
Fixes#38697.
git-svn-id: https://develop.svn.wordpress.org/trunk@39273 602fd350-edb4-49c9-b593-d223f7449a82
Some widgets that require more configuration are not included, such as RSS and Custom Menu. Tag Cloud is also not included because fresh sites do not have any tags to display.
Also adds a search widget to a Twenty Seventeen footer widget area.
see #38615.
git-svn-id: https://develop.svn.wordpress.org/trunk@39261 602fd350-edb4-49c9-b593-d223f7449a82
The credits widget from the original commit was a nice test to see the date changing, but isn't really very inspirational. Also, implement it in Twenty Seventeen.
see #38615.
git-svn-id: https://develop.svn.wordpress.org/trunk@39255 602fd350-edb4-49c9-b593-d223f7449a82
This replaces the default `header.jpg` with a compressed version.
The original was 209KB and the new version is 143KB with almost no
distinguishable visual loss.
Props Presskopp.
Fixes#38793.
git-svn-id: https://develop.svn.wordpress.org/trunk@39248 602fd350-edb4-49c9-b593-d223f7449a82
After further review from the accessibility team, it was determined that the menu items with sub-menus don't need the aria-haspopup attribute.
Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397
git-svn-id: https://develop.svn.wordpress.org/trunk@39232 602fd350-edb4-49c9-b593-d223f7449a82
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.
Props bradyvercher, westonruter.
See #38639.
Fixes#38737.
git-svn-id: https://develop.svn.wordpress.org/trunk@39227 602fd350-edb4-49c9-b593-d223f7449a82
Support was added to test implementation but never completed. This removes the test implementation.
Props davidakennedy
Fixes#38783
git-svn-id: https://develop.svn.wordpress.org/trunk@39226 602fd350-edb4-49c9-b593-d223f7449a82
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the nav menu.
Props afercia, davidakennedy, Fencer04
Fixes#38476
git-svn-id: https://develop.svn.wordpress.org/trunk@39225 602fd350-edb4-49c9-b593-d223f7449a82
Removes default header text color and updates and updates selectors.
Props laurelfulford, davidakennedy, Idealien
Fixes#38391
git-svn-id: https://develop.svn.wordpress.org/trunk@39224 602fd350-edb4-49c9-b593-d223f7449a82
* Toggles `has-header-image` body class in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.
Props bradyvercher.
Fixes#38627.
See #38391.
git-svn-id: https://develop.svn.wordpress.org/trunk@39220 602fd350-edb4-49c9-b593-d223f7449a82
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.
Props laurelfulford.
Fixes#38722.
git-svn-id: https://develop.svn.wordpress.org/trunk@39215 602fd350-edb4-49c9-b593-d223f7449a82
This resets the property to normal where needed and, to be safe, uses `!important`. It avoids screen readers reading out words ignoring spaces between words in some cases.
Props afercia.
Fixes#38764.
git-svn-id: https://develop.svn.wordpress.org/trunk@39207 602fd350-edb4-49c9-b593-d223f7449a82
This resolves the weird behaviour on Safari 10 has some weird behaviour.
Props rianrietveld, swisspidy, afercia, sami.keijonen, arush, davidakennedy
Fixes#38387
git-svn-id: https://develop.svn.wordpress.org/trunk@39206 602fd350-edb4-49c9-b593-d223f7449a82
When a page is scrolled, the top nav menu became fixed. This resolves that.
Props afercia, Fencer04, davidakennedy
Fixes#38476
git-svn-id: https://develop.svn.wordpress.org/trunk@39183 602fd350-edb4-49c9-b593-d223f7449a82
The CSS property `background-attachment: fixed` is disabled in some mobile browsers for performance reasons. So here, the fix increases the breakpoint where the `background-attachment: fixed` is applied to the front page images. Doing this removes the fixed backgrounds and the issue from all smaller screens, but the downside is that it also removes the fixed backgrounds from smaller laptops. It's also possible future devices could fall into this breakpoint, but this seems to be the most practical solution.
Props laurelfulford.
Fixes#38395.
git-svn-id: https://develop.svn.wordpress.org/trunk@39176 602fd350-edb4-49c9-b593-d223f7449a82
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028.
* Add whitespace around `<use>`, from #38387.
Props sami.keijonen, swissspidy, laurelfulford.
Fixes#38659.
See #38387.
git-svn-id: https://develop.svn.wordpress.org/trunk@39164 602fd350-edb4-49c9-b593-d223f7449a82
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.
Props laurelfulford.
Fixes#38670.
git-svn-id: https://develop.svn.wordpress.org/trunk@39152 602fd350-edb4-49c9-b593-d223f7449a82
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.
The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.
Props joemcgill.
Fixes#38390.
git-svn-id: https://develop.svn.wordpress.org/trunk@39146 602fd350-edb4-49c9-b593-d223f7449a82