Commit Graph

744 Commits

Author SHA1 Message Date
David A. Kennedy
d4d90b0425 Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Fixes #38980.


git-svn-id: https://develop.svn.wordpress.org/trunk@39397 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:03:27 +00:00
David A. Kennedy
a27570c98a Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Fixes #38927.


git-svn-id: https://develop.svn.wordpress.org/trunk@39392 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:29:23 +00:00
David A. Kennedy
8ff0f85857 Twenty Seventeen: Provide a background color fallback for non-webkit browsers on input styles
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
2016-11-30 23:02:38 +00:00
David A. Kennedy
856cd3af71 Twenty Seventeen: Allow child themes to easily extend custom color patterns
By adding a filter, child themes can add additional selectors onto the custom color scheme CSS. Like so:

{{{
// Add child theme selectors for color schemes.
function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) {
	$css .= '
	.colors-custom .content-menu > article:not(.has-post-thumbnail),
	.colors-custom .content-menu > section:not(.has-post-thumbnail) {
		border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
	}';
	return $css;
}
add_filter( 'twentyseventeen_custom_colors_css', 'dynamic_seventeen_custom_colors_css', 10, 3 );
}}}

Props celloexpressions.

Fixes #38949.


git-svn-id: https://develop.svn.wordpress.org/trunk@39386 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:50:40 +00:00
David A. Kennedy
dc01ad1cf5 Twenty Seventeen: Make screen reader text on scroll arrow more meaningful
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
2016-11-30 22:15:21 +00:00
Joe McGill
a35a3cf952 Twenty Seventeen: Keep header videos from extending past footer.
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
2016-11-30 20:52:36 +00:00
Helen Hou-Sandi
60cc79e40b Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981.


git-svn-id: https://develop.svn.wordpress.org/trunk@39373 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 05:47:29 +00:00
Helen Hou-Sandi
f3a59f8632 Theme starter content: Add support for featured images and page templates.
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
2016-11-23 09:52:27 +00:00
David A. Kennedy
d6d843dccd Twenty Seventeen: Ensure edit button label displays properly in other languages
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
2016-11-23 00:43:22 +00:00
Joe McGill
59db3d7e76 Twenty Seventeen: CSS coding standards fixes.
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
2016-11-22 20:46:04 +00:00
Helen Hou-Sandi
bf4dd6a8cb Twenty Seventeen: Ensure galleries display correctly in IE11.
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
2016-11-22 15:50:25 +00:00
Helen Hou-Sandi
e1215e1268 Twenty Seventeen: Avoid an undefined index notice after [39291].
props westonruter.
see #38847.


git-svn-id: https://develop.svn.wordpress.org/trunk@39317 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 04:54:14 +00:00
David A. Kennedy
364d79e205 Twenty Seventeen: Make all Codex links in DocBlocks use HTTPS
Props johnpgreen.

Fixes #38854.


git-svn-id: https://develop.svn.wordpress.org/trunk@39300 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:48:47 +00:00
David A. Kennedy
05b394ccaa Twenty Seventeen: Adds background-attachment: fixed; to devices that should support it
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
2016-11-18 20:10:18 +00:00
Helen Hou-Sandi
b34803f431 Twenty Seventeen: Rename the starter content menus to match the menu area names.
Saves strings and is more descriptive.

props davidakennedy.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39294 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 19:04:25 +00:00
David A. Kennedy
ebe736af3f Twenty Seventeen: Ensure the use of proper image size for custom header image
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
2016-11-18 18:42:16 +00:00
Helen Hou-Sandi
faf751b039 Twenty Seventeen: Remove some extraneous function calls.
fixes #38848.


git-svn-id: https://develop.svn.wordpress.org/trunk@39286 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 06:35:15 +00:00
Weston Ruter
c1b2e9dd41 Customize: Remove obsolete edit shortcut style rules from Twenty Seventeen.
Props celloexpressions.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39285 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 05:22:00 +00:00
Joe McGill
1c547f56c1 Twenty Seventeen: Additional default header image optimizations.
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
2016-11-17 17:12:49 +00:00
Joe McGill
1e05bf877e Twenty Seventeen: Add styles for custom header video controls.
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
2016-11-16 23:37:42 +00:00
Helen Hou-Sandi
5d43d3a353 Theme starter content: Add reference IDs for most default widgets.
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
2016-11-16 00:39:47 +00:00
Helen Hou-Sandi
e29ff6f4ca Theme starter content: Refine the content for pages.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39260 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:28:27 +00:00
Helen Hou-Sandi
345341f8d9 Theme starter content: Revamp the credits widget into an about widget.
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
2016-11-15 21:07:36 +00:00
Joe McGill
e9c20890da Twenty Seventeen: Compress the default header image.
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
2016-11-15 18:00:22 +00:00
Weston Ruter
8bb2e8e9f7 Customize: Ensure edit shortcuts have same background color regardless of theme colors.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39243 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:13:21 +00:00
Weston Ruter
ad0dae996e Customize: Adjust layout for edit shortcuts only when shown.
Add theme-specific positioning of edit shortcuts in Twenty Fourteen and Twenty Seventeen.

Props sirbrillig, sstoqnov, westonruter.
Fixes #38651.


git-svn-id: https://develop.svn.wordpress.org/trunk@39233 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 00:14:24 +00:00
Tammie Lister
c8b86fdd52 Twenty Seventeen: Fix for mobile menu parent items requiring double tap
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
2016-11-14 22:33:40 +00:00
Weston Ruter
64e9d9f4eb Customize: Use selective refresh for custom header changes when possible.
* 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
2016-11-14 18:40:08 +00:00
Tammie Lister
28befc73cd Twenty Fourteen: Removes video header support
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
2016-11-14 17:16:04 +00:00
Tammie Lister
bffa48a6ee Twenty Seventeen: Resolves focused controls hidden by the top menu.
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
2016-11-14 17:00:57 +00:00
Tammie Lister
6d7ed1e861 Twenty Seventeen: Fixes custom header text color issues
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
2016-11-14 16:48:32 +00:00
David A. Kennedy
76e44c9166 Twenty Seventeen: Make sure theme JavaScript follows proper coding standards
Props sstoqnov, afercia.

Fixes #38752.


git-svn-id: https://develop.svn.wordpress.org/trunk@39221 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:40:55 +00:00
David A. Kennedy
5b41a1c33e Twenty Seventeen: Make custom header preview match front end in Customizer when changed
* 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
2016-11-14 11:22:25 +00:00
David A. Kennedy
2835aa5f99 Twenty Seventeen: Adds numbers to the table of contents in style.css
Props karmatosed.

Fixes #38767.


git-svn-id: https://develop.svn.wordpress.org/trunk@39216 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:44:39 +00:00
David A. Kennedy
40b3a5a878 Twenty Seventeen: Fix Customizer preview display issues in IE9
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
2016-11-13 23:30:53 +00:00
David A. Kennedy
97ae697d6a Twenty Seventeen: Fix typos in font family translator comment
Props dimadin.

Fixes #38740.


git-svn-id: https://develop.svn.wordpress.org/trunk@39208 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 01:29:29 +00:00
David A. Kennedy
09a0941999 Twenty Seventeen: Update screen-reader-text to reset word-wrap
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
2016-11-13 00:25:49 +00:00
Tammie Lister
5cab939b1e Twenty Seventeen: Keyboard navigation on Safari 10 fix
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
2016-11-12 23:38:43 +00:00
Helen Hou-Sandi
195e86fda5 Twenty Seventeen: Better RTL positioning for scroll down arrow.
props adamsilverstein.
fixes #38706.


git-svn-id: https://develop.svn.wordpress.org/trunk@39198 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 13:53:58 +00:00
Tammie Lister
b847c1c2c4 Twenty Seventeen fix for Travis Error
Removed semi-colo on line 46

Props swissspidy


git-svn-id: https://develop.svn.wordpress.org/trunk@39184 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 16:54:51 +00:00
Tammie Lister
208e443dc5 Twenty Seventeen: Fixes focused controls hidden by top menu.
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
2016-11-09 16:12:35 +00:00
David A. Kennedy
b2fc03af7f Twenty Seventeen: Fix badly pixelated images on iOS devices
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
2016-11-09 01:11:59 +00:00
David A. Kennedy
61af54b335 Twenty Seventeen: Improve SVG markup, providing more options customization
* 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
2016-11-08 18:00:07 +00:00
David A. Kennedy
750d78a8e3 Twenty Seventeen: Fix post navigation font legibility issue
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
2016-11-07 21:06:20 +00:00
David A. Kennedy
d93ca46c4f Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format
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
2016-11-05 00:44:28 +00:00
Weston Ruter
71f8622cdc Customize: Use button with svg as click target instead of :before content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.


git-svn-id: https://develop.svn.wordpress.org/trunk@39136 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 01:47:56 +00:00
David A. Kennedy
a02ab35128 Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.


git-svn-id: https://develop.svn.wordpress.org/trunk@39135 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 23:07:20 +00:00
David A. Kennedy
119c36b0bd Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39129 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:01:46 +00:00
David A. Kennedy
9dd2063876 Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39124 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:43:15 +00:00
Joe McGill
22bb12dd61 Themes: Remove jQuery dependency from wp-custom-header.js.
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.

This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.

Props adamsilverstein, joemcgill.
Fixes #38550.

git-svn-id: https://develop.svn.wordpress.org/trunk@39102 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 01:20:14 +00:00