Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate scss file in Fluid Template for better performance #58

Open
Oktopuce opened this issue Feb 11, 2022 · 0 comments
Open

Concatenate scss file in Fluid Template for better performance #58

Oktopuce opened this issue Feb 11, 2022 · 0 comments

Comments

@Oktopuce
Copy link

Hi,

Don't know if it's already planned or not but should be a good idea to concatenate all scss file in multiple fluid template, in order to have only one css file in FE, for better performance.
And even better : concatenate with global css file.

Assume you have two fluid file with scss :

  • first.html

<wsscss:asset.scss href="EXT:site_default/Resources/Public/Scss/my_first.scss" identifier="my_first_id"/>

  • second.html

<wsscss:asset.scss href="EXT:site_default/Resources/Public/Scss/my_second.scss" identifier="my_second_id"/>

  • current result in FE :
<link rel="stylesheet" type="text/css" href="[/typo3temp/assets/compressed/merged-0c1e871c37caac4f59a998628336356d-48b21eea7ae3b100fa56f2b76cbae4ce.css?1643706417]" media="all">
<link href="/typo3temp/assets/css/my_first.css?1643712172" rel="stylesheet" type="text/css" >
<link href="/typo3temp/assets/css/my_second.css?1643712172" rel="stylesheet" type="text/css" >

  • expected result in FE :
<link rel="stylesheet" type="text/css" href="[/typo3temp/assets/compressed/merged-0c1e871c37caac4f59a998628336356d-48b21eea7ae3b100fa56f2b76cbae4ce.css?1643706417]" media="all">
<link href="/typo3temp/assets/css/concatenated.css?1643712172" rel="stylesheet" type="text/css" >

or even better - don't know if it's possible - concatenate in global scss :

<link rel="stylesheet" type="text/css" href="[/typo3temp/assets/compressed/merged-0c1e871c37caac4f59a998628336356d-48b21eea7ae3b100fa56f2b76cbae4ce.css?1643706417]" media="all">

Could also be interesting for better performance to add CSS at the bottom of the HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant