Skip to content

Commit ac62f55

Browse files
Preserve original background color
1 parent fe90abf commit ac62f55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/color-element.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ const Self = class ColorElement extends NudeElement {
165165
}
166166

167167
// One of the supported color values; resolve and cache it
168+
let backgroundColor = element.style.backgroundColor;
168169
element.style.backgroundColor = value;
169170
let color = getComputedStyle(element).backgroundColor;
170-
element.style.backgroundColor = "";
171+
element.style.backgroundColor = backgroundColor;
171172

172173
let resolvedColor = Self.resolveColor(color);
173174
if (resolvedColor) {

0 commit comments

Comments
 (0)