From 7663bdb5342c6875704845805a539695ac737cdf Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 20 Sep 2021 16:47:53 +0100 Subject: [PATCH] Revert preservation of base component styles by styleable helper to fix stale styles being applied after removal --- packages/client/src/utils/styleable.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/client/src/utils/styleable.js b/packages/client/src/utils/styleable.js index 89d983d73b..6a2562fb48 100644 --- a/packages/client/src/utils/styleable.js +++ b/packages/client/src/utils/styleable.js @@ -31,9 +31,6 @@ export const styleable = (node, styles = {}) => { // Creates event listeners and applies initial styles const setupStyles = (newStyles = {}) => { - // Use empty state styles as base styles if required, but let them, get - // overridden by any user specified styles - const baseString = node.style.cssText let baseStyles = {} if (newStyles.empty) { baseStyles.border = "2px dashed var(--spectrum-global-color-gray-600)" @@ -51,7 +48,7 @@ export const styleable = (node, styles = {}) => { // Applies a style string to a DOM node const applyStyles = styleString => { - node.style = `${baseString}${styleString}` + node.style = styleString } // Applies the "normal" style definition