Bug description
Running PostCSS initial with preserve: false on :
{
opacity: 1;
pointer-events: initial;
}
will result in
The issue is that pointer-events IS NOT amongst the properties handled by the plugin and initial is a perfectly valid value. Wouldn't the expected behaviour be that the prop is preserved as a fallback if a replacement is found, as it was the case with the original plugin replace option. With the current behaviour all properties not handled by the plugin with value initial are simply stripped!
Source CSS
{
opacity: 1;
pointer-events: initial;
}
Expected CSS
{
opacity: 1;
pointer-events: initial;
}
Actual CSS
Playgound example
No response
Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css?
N/A
Debug output
PostCSS Initial is not available in @csstools/csstools-cli.
Extra config
No response
What plugin are you experiencing this issue on?
PostCSS Initial
Plugin version
2.0.0
What OS are you experiencing this on?
macOS
Node Version
20
Validations
Would you like to open a PR for this bug?
Bug description
Running PostCSS initial with
preserve: falseon :{ opacity: 1; pointer-events: initial; }will result in
{ opacity: 1; }The issue is that
pointer-eventsIS NOT amongst the properties handled by the plugin andinitialis a perfectly valid value. Wouldn't the expected behaviour be that the prop is preserved as a fallback if a replacement is found, as it was the case with the original pluginreplaceoption. With the current behaviour all properties not handled by the plugin with valueinitialare simply stripped!Source CSS
{ opacity: 1; pointer-events: initial; }Expected CSS
{ opacity: 1; pointer-events: initial; }Actual CSS
{ opacity: 1; }Playgound example
No response
Does it happen with
npx @csstools/csstools-cli <plugin-name> minimal-example.css?N/A
Debug output
PostCSS Initial is not available in
@csstools/csstools-cli.Extra config
No response
What plugin are you experiencing this issue on?
PostCSS Initial
Plugin version
2.0.0
What OS are you experiencing this on?
macOS
Node Version
20
Validations
Would you like to open a PR for this bug?