Project

General

Profile

Actions

Bug #60675

closed

CSS compressor is removing white spaces (font directive)

Added by Nico Niebergall over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Category:
Content Rendering
Target version:
Start date:
2014-07-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

Today I noticed the internal CSS compressor is removing white spaces between the font size and the font family. Of course the white space should stay there. Some browsers will still render the font family correct, some other's dont, but the CSS syntax is clearly wrong without the white space.

The white space is removed when you use a font-family surrounded with quotation marks, and only in this particular case. If you remove the quotation marks the white space won't get removed. According to the W3C the apostrophes are needed for strings with white spaces, as stated here: 4.3.7 Strings

This is a snippet of the code where I was facing this symptom:

Before minifying

body {
    font: 0.875em "Open Sans", Arial, Helvetica, sans-serif;
    line-height: 2em;
}

After minifying

body{font:0.875em"Open Sans",Arial,Helvetica,sans-serif;line-height:2em}

It doesn't matter if you use a single quotation or a double quotation mark, the white space is removed as soon as you surround the font-face with (single or double) quotation marks. Is this a bug?

Kind regards,
Nico


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #63974: CSS concatination and compression failes with fontClosed2014-12-18

Actions
Actions

Also available in: Atom PDF