Project

General

Profile

Actions

Bug #90820

closed

CSS/JS compression problem if css is used inline

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

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-03-23
Due date:
% Done:

100%

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

Description

If

TypoScript: config.compressCss = 1

Install Tool [FE][compressionLevel] > 0

and css is inline, it will be compressed and add as binary in the html this does not work.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #91071: Inline CSS automatically disable "Comments and whitespace" compressionNew2020-04-16

Actions
Actions #1

Updated by Susanne Moog about 4 years ago

  • Status changed from New to Needs Feedback

Tried with the following TypoScript:

config.compressCss = 1
page.cssInline {
    10 = TEXT
    10.value = body {background:lime;}

    20 = TEXT
    20.value = h1 {color: blue;}
}

This creates an external file with .gzip and that content, because of inlineStyleToTempFile. Next I tested with:

config.inlineStyle2TempFile = 0
config.compressCss = 1
page.cssInline {
    10 = TEXT
    10.value = body {background:lime;}

    20 = TEXT
    20.value = h1 span {color: blue;}
}

which results in:

<style type="text/css">
/*<![CDATA[*/
<!-- 
/*additionalTSFEInlineStyle*/
body {background:lime;}h1 span {color: blue;}
-->
/*]]>*/
</style>

which looks fine to me.

How to reproduce your issue? How do you add your inline CSS?

Actions #2

Updated by Timo Poppinga about 4 years ago

hi i did link this:

page {
    includeCSSLibs {
        main = EXT:xxxxx/Resources/Public/StyleSheets/main.css
        main {
            inline = 1
        }
    }
}
config {
    concatenateJs = 1
    compressJs= 1

    concatenateCss = 1
    compressCss = 1
}

and

[FE][compressionLevel] = 9

Actions #3

Updated by Gerrit Code Review about 4 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63884

Actions #4

Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63865

Actions #5

Updated by Susanne Moog about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Timo Poppinga about 4 years ago

thx

Actions #7

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions #8

Updated by Timo Poppinga about 4 years ago

  • Related to Bug #91071: Inline CSS automatically disable "Comments and whitespace" compression added
Actions

Also available in: Atom PDF