Bundled Themes: Fix failing tests for Twenty Twenty.
Follow up of [46271]. See #48110. Built from https://develop.svn.wordpress.org/trunk@46277 git-svn-id: http://core.svn.wordpress.org/trunk@46089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c117b9957f
commit
1a961be653
|
@ -45,14 +45,14 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
||||||
var colorObj = new Color( {
|
var colorObj = new Color( {
|
||||||
h: self.accentHue,
|
h: self.accentHue,
|
||||||
s: s,
|
s: s,
|
||||||
l: l,
|
l: l
|
||||||
} ),
|
} ),
|
||||||
item;
|
item;
|
||||||
|
|
||||||
item = {
|
item = {
|
||||||
color: colorObj,
|
color: colorObj,
|
||||||
contrastBackground: colorObj.getDistanceLuminosityFrom( self.bgColorObj ),
|
contrastBackground: colorObj.getDistanceLuminosityFrom( self.bgColorObj ),
|
||||||
contrastText: colorObj.getDistanceLuminosityFrom( self.textColorObj ),
|
contrastText: colorObj.getDistanceLuminosityFrom( self.textColorObj )
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check a minimum of 4.5:1 contrast with the background and 3:1 with surrounding text.
|
// Check a minimum of 4.5:1 contrast with the background and 3:1 with surrounding text.
|
||||||
|
@ -133,7 +133,7 @@ _twentyTwentyColor.prototype.getAccentColor = function() {
|
||||||
* @param {number} accentHue - The hue for our accent color.
|
* @param {number} accentHue - The hue for our accent color.
|
||||||
* @return {Object} - this
|
* @return {Object} - this
|
||||||
*/
|
*/
|
||||||
function twentyTwentyColor( backgroundColor, accentHue ) {
|
function twentyTwentyColor( backgroundColor, accentHue ) { // jshint ignore:line
|
||||||
var color = new _twentyTwentyColor( backgroundColor, accentHue );
|
var color = new _twentyTwentyColor( backgroundColor, accentHue );
|
||||||
color.setAccentColorsArray();
|
color.setAccentColorsArray();
|
||||||
return color;
|
return color;
|
||||||
|
|
|
@ -64,21 +64,21 @@
|
||||||
value[ context ] = {
|
value[ context ] = {
|
||||||
text: colors.getTextColor(),
|
text: colors.getTextColor(),
|
||||||
accent: colors.getAccentColor().toCSS(),
|
accent: colors.getAccentColor().toCSS(),
|
||||||
background: backgroundColor,
|
background: backgroundColor
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get borders color.
|
// Get borders color.
|
||||||
value[ context ].borders = Color( {
|
value[ context ].borders = Color( {
|
||||||
h: colors.bgColorObj.h(),
|
h: colors.bgColorObj.h(),
|
||||||
s: colors.bgColorObj.s() * 0.3922,
|
s: colors.bgColorObj.s() * 0.3922,
|
||||||
l: colors.isDark ? colors.bgColorObj.l() + 9 : colors.bgColorObj.l() - 9,
|
l: colors.isDark ? colors.bgColorObj.l() + 9 : colors.bgColorObj.l() - 9
|
||||||
} ).toCSS();
|
} ).toCSS();
|
||||||
|
|
||||||
// Get secondary color.
|
// Get secondary color.
|
||||||
value[ context ].secondary = Color( {
|
value[ context ].secondary = Color( {
|
||||||
h: colors.bgColorObj.h(),
|
h: colors.bgColorObj.h(),
|
||||||
s: colors.bgColorObj.s() / 2,
|
s: colors.bgColorObj.s() / 2,
|
||||||
l: ( colors.textColorObj.l() * 0.57 ) + ( colors.bgColorObj.l() * 0.43 ),
|
l: ( colors.textColorObj.l() * 0.57 ) + ( colors.bgColorObj.l() * 0.43 )
|
||||||
} ).toCSS();
|
} ).toCSS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ twentytwenty.coverModals = {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
top: getAdminBarHeight( true ),
|
top: getAdminBarHeight( true ),
|
||||||
left: 0,
|
left: 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ twentytwenty.coverModals = {
|
||||||
} else {
|
} else {
|
||||||
modal.classList.remove( 'active' );
|
modal.classList.remove( 'active' );
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
}; // twentytwenty.coverModals
|
}; // twentytwenty.coverModals
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ twentytwenty.focusManagement = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
}
|
||||||
|
|
||||||
}; // twentytwenty.focusManagement
|
}; // twentytwenty.focusManagement
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ twentytwenty.intrinsicRatioVideos = {
|
||||||
video.style.width = iTargetWidth + 'px';
|
video.style.width = iTargetWidth + 'px';
|
||||||
video.style.height = ( video.dataset.origheight * ratio ) + 'px';
|
video.style.height = ( video.dataset.origheight * ratio ) + 'px';
|
||||||
} );
|
} );
|
||||||
},
|
}
|
||||||
|
|
||||||
}; // twentytwenty.instrinsicRatioVideos
|
}; // twentytwenty.instrinsicRatioVideos
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ twentytwenty.smoothScroll = {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
}; // twentytwenty.smoothScroll
|
}; // twentytwenty.smoothScroll
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ twentytwenty.modalMenu = {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}; // twentytwenty.modalMenu
|
}; // twentytwenty.modalMenu
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------------------------
|
||||||
|
@ -565,7 +565,7 @@ twentytwenty.toggles = {
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
}
|
||||||
|
|
||||||
}; // twentytwenty.toggles
|
}; // twentytwenty.toggles
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-46276';
|
$wp_version = '5.3-alpha-46277';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue