mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Modify code writing
This commit is contained in:
parent
aedf3f4cba
commit
0dcb10ce7c
@ -3,16 +3,11 @@ import {isLinearGradient, isRadialGradient} from '../css/types/image';
|
||||
import {BACKGROUND_CLIP} from '../css/property-descriptors/background-clip';
|
||||
|
||||
export const isFontColorGradient = (styles: CSSParsedDeclaration) => {
|
||||
if (
|
||||
return (
|
||||
styles.backgroundImage.length === 1 &&
|
||||
(isLinearGradient(styles.backgroundImage[0]) || isRadialGradient(styles.backgroundImage[0]))
|
||||
) {
|
||||
return (
|
||||
(styles.textFillColor === 0 || styles.color === 0) &&
|
||||
styles.backgroundClip.length === 1 &&
|
||||
styles.backgroundClip[0] === BACKGROUND_CLIP.TEXT
|
||||
);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
(isLinearGradient(styles.backgroundImage[0]) || isRadialGradient(styles.backgroundImage[0])) &&
|
||||
(styles.textFillColor === 0 || styles.color === 0) &&
|
||||
styles.backgroundClip.length === 1 &&
|
||||
styles.backgroundClip[0] === BACKGROUND_CLIP.TEXT
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user