Skip to content
Permalink
Browse files

Bundled Themes: Fix failing tests for Twenty Twenty.

Follow up of [46271].

See #48110.

git-svn-id: https://develop.svn.wordpress.org/trunk@46277 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
desrosj committed Sep 23, 2019
1 parent e4a1254 commit e256cb1befb3d1b4e8334fb3b7c10eb29d185a49
@@ -45,14 +45,14 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
var colorObj = new Color( {
h: self.accentHue,
s: s,
l: l,
l: l
} ),
item;

item = {
color: colorObj,
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.
@@ -133,7 +133,7 @@ _twentyTwentyColor.prototype.getAccentColor = function() {
* @param {number} accentHue - The hue for our accent color.
* @return {Object} - this
*/
function twentyTwentyColor( backgroundColor, accentHue ) {
function twentyTwentyColor( backgroundColor, accentHue ) { // jshint ignore:line
var color = new _twentyTwentyColor( backgroundColor, accentHue );
color.setAccentColorsArray();
return color;
@@ -64,21 +64,21 @@
value[ context ] = {
text: colors.getTextColor(),
accent: colors.getAccentColor().toCSS(),
background: backgroundColor,
background: backgroundColor
};

// Get borders color.
value[ context ].borders = Color( {
h: colors.bgColorObj.h(),
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();

// Get secondary color.
value[ context ].secondary = Color( {
h: colors.bgColorObj.h(),
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();
}

@@ -142,7 +142,7 @@ twentytwenty.coverModals = {
position: 'fixed',
width: '100%',
top: getAdminBarHeight( true ),
left: 0,
left: 0
};
}

@@ -205,7 +205,7 @@ twentytwenty.coverModals = {
} else {
modal.classList.remove( 'active' );
}
},
}

}; // twentytwenty.coverModals

@@ -237,7 +237,7 @@ twentytwenty.focusManagement = {
}
}
} );
},
}

}; // twentytwenty.focusManagement

@@ -285,7 +285,7 @@ twentytwenty.intrinsicRatioVideos = {
video.style.width = iTargetWidth + 'px';
video.style.height = ( video.dataset.origheight * ratio ) + 'px';
} );
},
}

}; // twentytwenty.instrinsicRatioVideos

@@ -378,7 +378,7 @@ twentytwenty.smoothScroll = {
}
} );
}
},
}

}; // twentytwenty.smoothScroll

@@ -404,7 +404,7 @@ twentytwenty.modalMenu = {
}
} );
}
},
}
}; // twentytwenty.modalMenu

/* -----------------------------------------------------------------------------------------------
@@ -565,7 +565,7 @@ twentytwenty.toggles = {
} );
}
} );
},
}

}; // twentytwenty.toggles

0 comments on commit e256cb1

Please sign in to comment.
You can’t perform that action at this time.