stop using customTheme in user card, instead use color slots. fix for opacity

inheritance polluting inheritors
This commit is contained in:
Henry Jameson 2020-02-20 18:13:40 +02:00
parent 0abc3f9b85
commit d19c64314f
4 changed files with 24 additions and 17 deletions

View file

@ -351,7 +351,8 @@ export const getColors = (sourceColors, sourceOpacity) => SLOT_ORDERED.reduce(({
throw new Error('Couldn\'t generate color for ' + key)
}
const opacitySlot = getOpacitySlot(key)
if (opacitySlot && outputColor.a === undefined) {
const ownOpacitySlot = value.opacity
if (opacitySlot && (outputColor.a === undefined || ownOpacitySlot)) {
const dependencySlot = deps[0]
if (dependencySlot && colors[dependencySlot] === 'transparent') {
outputColor.a = 0