Twenty Twenty: Fix typos in a variable name and inline comment in assets/js/color-calculations.js.
Props tanvirul. Merges [46747] to the 5.3 branch. Fixes #48704. git-svn-id: https://develop.svn.wordpress.org/branches/5.3@46769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
379c09d621
commit
03b7f795f5
@ -38,7 +38,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
|||||||
minSaturation = 65,
|
minSaturation = 65,
|
||||||
maxSaturation = 100,
|
maxSaturation = 100,
|
||||||
minLightness = 30,
|
minLightness = 30,
|
||||||
maxLighness = 80,
|
maxLightness = 80,
|
||||||
stepSaturation = 2,
|
stepSaturation = 2,
|
||||||
stepLightness = 2,
|
stepLightness = 2,
|
||||||
pushColor = function() {
|
pushColor = function() {
|
||||||
@ -86,7 +86,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
|||||||
|
|
||||||
// We're using `for` loops here because they perform marginally better than other loops.
|
// We're using `for` loops here because they perform marginally better than other loops.
|
||||||
for ( s = minSaturation; s <= maxSaturation; s += stepSaturation ) {
|
for ( s = minSaturation; s <= maxSaturation; s += stepSaturation ) {
|
||||||
for ( l = minLightness; l <= maxLighness; l += stepLightness ) {
|
for ( l = minLightness; l <= maxLightness; l += stepLightness ) {
|
||||||
pushColor( s, l );
|
pushColor( s, l );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
|
|||||||
return 7 <= color.contrastBackground;
|
return 7 <= color.contrastBackground;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// If we have AAA-compliant colors, alpways prefer them.
|
// If we have AAA-compliant colors, always prefer them.
|
||||||
if ( aaa.length ) {
|
if ( aaa.length ) {
|
||||||
this.accentColorsArray = aaa;
|
this.accentColorsArray = aaa;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user