Bug #69309
closedconfig.compressCss breaks CSS3 calc() value
0%
Description
When enabling config.compressCss
, CSS3 calc() definitions may break, because it strips space characters where they are needed to be kept.
Example:
left:calc(1em + 100px);
becomes
left:calc(1em+100px);
which is wrong, as the CSS parser cannot differ between negative values and subtraction any more.
See http://www.w3.org/TR/css3-values/#calc:
Note that the grammar requires spaces around binary ‘+’ and ‘-’ operators. The ‘*’ and ‘/’ operators do not require spaces.
Stumbled upon it in TYPO3 CMS 6.2.14, but I think it's going to be a problem with all versions. Checked in Safari 8.0.8 (10600.8.9) and Chrome 44.0.2403.155 (64-bit).
Note:
config.minifyCss
doesn't have the problem.
Updated by Arne-Kolja Bachstein about 9 years ago
Just to clear things up: I actually had the problem, it's not just a theory (think it might sound like it above).
Updated by Wouter Wolters about 9 years ago
This is a known problem and is fixed within the 7.x versions.
A backport to 6.2 is not in the works yet because of some problems. See https://forge.typo3.org/issues/62463 for more details about the 6.2 branch.
Updated by Arne-Kolja Bachstein about 9 years ago
Thanks, did not find that issue when looking for previously reported ones.
Updated by Wouter Wolters about 9 years ago
- Status changed from New to Closed
I don't think we can come up with a fix here. The current solution leads to segfaults on some PCRE versions. For version 7.x this is fixed as I already said.
If you find a solution that works without breaking 6.2 you can file a new report.