Changeset 46701
- Timestamp:
- 11/11/2019 12:27:21 PM (6 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwenty
- Files:
-
- 12 edited
-
assets/css/editor-style-block-rtl.css (modified) (1 diff)
-
assets/css/editor-style-block.css (modified) (1 diff)
-
assets/js/customize-controls.js (modified) (2 diffs)
-
assets/js/index.js (modified) (3 diffs)
-
classes/class-twentytwenty-non-latin-languages.php (modified) (1 diff)
-
footer.php (modified) (1 diff)
-
functions.php (modified) (7 diffs)
-
inc/custom-css.php (modified) (2 diffs)
-
inc/starter-content.php (modified) (2 diffs)
-
print.css (modified) (1 diff)
-
style-rtl.css (modified) (10 diffs)
-
style.css (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css
r46613 r46701 320 320 } 321 321 322 .editor-styles-wrapper p.has-normal-font-size, 322 323 .editor-styles-wrapper p.has-regular-font-size { 323 324 font-size: 1em; -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
r46613 r46701 320 320 } 321 321 322 .editor-styles-wrapper p.has-normal-font-size, 322 323 .editor-styles-wrapper p.has-regular-font-size { 323 324 font-size: 1em; -
trunk/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js
r46446 r46701 1 /* global twentyTwentyBgColors, twentyTwentyColor, Color,jQuery, wp, _ */1 /* global twentyTwentyBgColors, twentyTwentyColor, jQuery, wp, _ */ 2 2 /** 3 3 * Customizer enhancements for a better user experience. … … 75 75 76 76 // Get secondary color. 77 value[ context ].secondary = Color( {78 h: colors.bgColorObj.h(),79 s: colors.bgColorObj.s() / 2,80 l: ( colors.textColorObj.l() * 0.57 ) + ( colors.bgColorObj.l() * 0.43)81 } ).toCSS();77 value[ context ].secondary = colors.bgColorObj 78 .clone() 79 .getReadableContrastingColor( colors.bgColorObj ) 80 .s( colors.bgColorObj.s() / 2 ) 81 .toCSS(); 82 82 } 83 83 -
trunk/src/wp-content/themes/twentytwenty/assets/js/index.js
r46668 r46701 31 31 NodeList.prototype.forEach = function( callback, thisArg ) { 32 32 var i; 33 var len = this.length; 33 34 34 35 thisArg = thisArg || window; 35 36 36 for ( i = 0; i < this.length; i++ ) {37 for ( i = 0; i < len; i++ ) { 37 38 callback.call( thisArg, this[ i ], i, this ); 38 39 } … … 69 70 } 70 71 72 // Add a class to the body for when touch is enabled for browsers that don't support media queries 73 // for interaction media features. Adapted from <https://codepen.io/Ferie/pen/vQOMmO> 74 ( function() { 75 var matchMedia = function() { 76 // Include the 'heartz' as a way to have a non matching MQ to help terminate the join. See <https://git.io/vznFH>. 77 var prefixes = [ '-webkit-', '-moz-', '-o-', '-ms-' ]; 78 var query = [ '(', prefixes.join( 'touch-enabled),(' ), 'heartz', ')' ].join( '' ); 79 return window.matchMedia && window.matchMedia( query ).matches; 80 }; 81 82 if ( ( 'ontouchstart' in window ) || ( window.DocumentTouch && document instanceof window.DocumentTouch ) || matchMedia() ) { 83 document.body.classList.add( 'touch-enabled' ); 84 } 85 }() ); 86 71 87 /* ----------------------------------------------------------------------------------------------- 72 88 Cover Modals … … 524 540 } 525 541 } 526 527 /**528 * Toggles `focus` class to allow submenu access on tablets.529 */530 ( function( menuObj ) {531 var touchStartFn, j,532 parentLink = menuObj.querySelectorAll( '.primary-menu .menu-item-has-children > a' );533 534 if ( 'ontouchstart' in window ) {535 touchStartFn = function( e ) {536 var menuItem = this.parentNode;537 538 if ( ! menuItem.classList.contains( 'focus' ) ) {539 e.preventDefault();540 for ( j = 0; j < menuItem.parentNode.children.length; ++j ) {541 if ( menuItem === menuItem.parentNode.children[j] ) {542 continue;543