Bug #91071
open
Inline CSS automatically disable "Comments and whitespace" compression
Added by Timo Poppinga about 4 years ago.
Updated over 3 years ago.
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 to Task #63884: Remove dependency to $this->formEngine->getIconHtml() added
- Related to deleted (Task #63884: Remove dependency to $this->formEngine->getIconHtml())
- Related to Bug #90820: CSS/JS compression problem if css is used inline added
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.
- Target version changed from 10 LTS to Candidate for patchlevel
- TYPO3 Version changed from 10 to 9
Also available in: Atom
PDF