Fixed: Theme compilation problem because of lack of rgba capability of the compiler environment.(#2910)

This commit is contained in:
Didier Korthoudt authored and GitHub committed 2020-09-11 09:01:33 +02:00
1 parent c30464ee77
commit 6143ec4180
1 file changed
+5 -1
+5 -1
View File
@@ -561,7 +561,11 @@ var cachedBlackColor,
- (void)_initCSSStringFromComponents
{
var hasAlpha = CPFeatureIsCompatible(CPCSSRGBAFeature) && _components[3] != 1.0;
// Fix to avoid a problem when compiling a theme (missing the alpha component as theme compiler doesn't have CSS rgba capability)
var hasAlpha = YES;
#if PLATFORM(DOM)
hasAlpha = CPFeatureIsCompatible(CPCSSRGBAFeature) && _components[3] != 1.0;
#endif
_cssString = (hasAlpha ? "rgba(" : "rgb(") +
parseInt(_components[0] * 255.0) + ", " +