mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
Fixed incorrect darkening of email-cta button on hover with some colours
refs https://github.com/TryGhost/Team/issues/928 - the background color of the button was incorrectly applied to the original accent colour rather than the adjusted accent color - added adjustment of text color on hover too in case it went outside of a visible range
This commit is contained in:
parent
8db674191d
commit
503845ce59
6
ghost/admin/app/helpers/hex-contrast.js
Normal file
6
ghost/admin/app/helpers/hex-contrast.js
Normal file
@ -0,0 +1,6 @@
|
||||
import {Color, textColorForBackgroundColor} from '@tryghost/color-utils';
|
||||
import {helper} from '@ember/component/helper';
|
||||
|
||||
export default helper(function hexContrast([hex]) {
|
||||
return textColorForBackgroundColor(Color(hex)).hex();
|
||||
});
|
@ -55,8 +55,8 @@
|
||||
}
|
||||
.email-cta-button-text-input:hover,
|
||||
.gh-btn-accent:hover {
|
||||
color: {{hex-adjust this.ui.textColorForAdjustedAccentBackground l=-15}};
|
||||
background-color: {{hex-adjust this.settings.accentColor l=-15}}
|
||||
color: {{hex-contrast this.ui.adjustedAccentColor}};
|
||||
background-color: {{hex-adjust this.ui.adjustedAccentColor l=-15}}
|
||||
}
|
||||
.email-cta-button-text-input::placeholder {
|
||||
{{!-- TODO: saturation adjustment for white/black doesn't work --}}
|
||||
|
Loading…
Reference in New Issue
Block a user