purgetss 6.2.13 → 6.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2543,6 +2543,8 @@ function purgeTailwind(uniqueClasses) {
|
|
|
2543
2543
|
//! In other words, we need to validate the color value, before we can alter its opacity.
|
|
2544
2544
|
let defaultHexValue = (classProperties.includes('from')) ? classProperties.match(/\#[0-9a-f]{6}/g)[1] : classProperties.match(/\#[0-9a-f]{6}/i)[0];
|
|
2545
2545
|
let classWithoutDecimalOpacity = `${classProperties.replace(new RegExp(defaultHexValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), `#${opacityValue.transparency}${defaultHexValue.substring(1)}`)}`;
|
|
2546
|
+
// Special case: #000000
|
|
2547
|
+
if (classProperties.includes('from') && defaultHexValue == '#000000') classWithoutDecimalOpacity = classWithoutDecimalOpacity.replace('00000000', '000000');
|
|
2546
2548
|
|
|
2547
2549
|
let defaultTextValue = classProperties.match(/'[^']*'/i)[0];
|
|
2548
2550
|
defaultTextValue = defaultTextValue.substring(1, defaultTextValue.length);
|
package/package.json
CHANGED