PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.22k stars 4.81k forks source link

CCC removes units for CSS variables with default values which makes wrong calculations #36574

Open dangelion opened 3 months ago

dangelion commented 3 months ago

Prerequisites

Describe the bug and add attachments

CCC removes units for CSS variables with default values which makes wrong calculations.

Here is a related issue: https://github.com/matthiasmullie/minify/issues/408

Expected behavior

No response

Steps to reproduce

Put in your css file a CSS variable like: --test-var: 0px; then enable CCC and check again the variable, it's: --test-var: 0;

So when you use this variable (for example inside calc()) it causes wrong calculations

PrestaShop version(s) where the bug happened

8.1.3

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

florine2623 commented 3 months ago

Hello @dangelion ,

I can't reproduce your issue. I clear the cache as well, but the variable is still intact. Could you specify which file exactly you modified ?

Waiting for your feedback. Thanks!

dangelion commented 3 months ago

Hi @florine2623 How you clear the cache?

I use the starter theme https://github.com/Oksydan/falcon with its CSS structure, I write CSS inside one of those files