Project

General

Profile

Actions

Bug #69309

closed

config.compressCss breaks CSS3 calc() value

Added by Arne-Kolja Bachstein about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2015-08-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
CSS
Complexity:
Is Regression:
No
Sprint Focus:

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.

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #62463: bug in compressing the css-files!?Closed2014-10-25

Actions
Has duplicate TYPO3 Core - Bug #69648: Built-in css minification destroys certain CSS constructsClosed2015-09-10

Actions
Actions #1

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).

Actions #2

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.

Actions #3

Updated by Arne-Kolja Bachstein about 9 years ago

Thanks, did not find that issue when looking for previously reported ones.

Actions #4

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.

Actions

Also available in: Atom PDF