File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ const Self = class ColorElement extends NudeElement {
3131 static Color ;
3232 static all = { } ;
3333 static dependencies = new Set ( ) ;
34+
35+ /** @type {Map<string, Color> } */
3436 static resolvedColors = new Map ( ) ;
3537
3638 static globalStyles = [ { css : baseGlobalStyles } ] ;
@@ -143,6 +145,7 @@ const Self = class ColorElement extends NudeElement {
143145 * Resolve a color value and cache it.
144146 * @param {string } value Color value to resolve.
145147 * @param {Element } element Element to get computed style from to resolve the color value.
148+ * @returns {Color | null } Resolved color value or null if the value cannot be resolved.
146149 */
147150 static resolveColor ( value , element ) {
148151 try {
@@ -165,7 +168,7 @@ const Self = class ColorElement extends NudeElement {
165168 Self . resolvedColors . set ( value , color ) ;
166169 element . style . backgroundColor = "" ;
167170
168- return color ;
171+ return Self . Color . get ( color ) ;
169172 }
170173 }
171174} ;
You can’t perform that action at this time.
0 commit comments