Project

General

Profile

Actions

Bug #91071

open

Inline CSS automatically disable "Comments and whitespace" compression

Added by Timo Poppinga almost 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2020-04-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If an CSS files in marked as inline the compression is automatically disabled this effects "comments and whitespace" and "gzip" compression.

This behevior works fine for "gzip" compression.

"Comments and whitespace" compression should not be automatically disbaled


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90820: CSS/JS compression problem if css is used inlineClosed2020-03-23

Actions
Actions #1

Updated by Timo Poppinga almost 4 years ago

  • Related to Task #63884: Remove dependency to $this->formEngine->getIconHtml() added
Actions #2

Updated by Timo Poppinga almost 4 years ago

  • Related to deleted (Task #63884: Remove dependency to $this->formEngine->getIconHtml())
Actions #3

Updated by Timo Poppinga almost 4 years ago

  • Related to Bug #90820: CSS/JS compression problem if css is used inline added
Actions #4

Updated by Timo Poppinga almost 4 years ago

btw: this also effects the fix of relative url paths:

TYPO3\CMS\Core\Resource\ResourceCompressor Line 356

        if (!file_exists(Environment::getPublicPath() . '/' . $targetFile) || $this->createGzipped && !file_exists(Environment::getPublicPath() . '/' . $targetFile . '.gzip')) {
            $contents = $this->compressCssString(file_get_contents($filenameAbsolute));
            if (strpos($filename, $this->targetDirectory) === false) {
                $contents = $this->cssFixRelativeUrlPaths($contents, PathUtility::dirname($filename) . '/');
            }
            $this->writeFileAndCompressed($targetFile, $contents);
        }
        return $this->returnFileReference($targetFile);

this was an side effect of compression but comes in really handy for inline css.

To fix this issue some more refactoring is necessary because TYPO3 dose not difference between gzip and whitespace compression this is done one process flow.

As well there should be an option to run cssFixRelativeUrlPaths without compression.

Actions #5

Updated by Christian Eßl almost 4 years ago

  • Target version changed from 10 LTS to Candidate for patchlevel
  • TYPO3 Version changed from 10 to 9
Actions #6

Updated by Riccardo De Contardi about 3 years ago

  • Category set to Frontend
Actions

Also available in: Atom PDF