Feature #93644

includeCSS should have options for rel="preload"

Added by David Bruchmann 2 months ago. Updated about 1 month ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2021-03-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Having this desired HTML:

  <link rel="preload" href="/typo3conf/ext/sitepackage/Resources/Public/Fonts/Adelle-Bold.woff" as="font" title="FontHeadingsBold" type="font/woff" crossorigin="anonymous" />
  <link rel="preload" href="/typo3conf/ext/sitepackage/Resources/Public/Fonts/Adelle-Bold.woff" as="font" title="FontHeadingsRegular" type="font/woff" crossorigin="anonymous" />
  <link rel="preload" href="/typo3conf/ext/sitepackage/Resources/Public/Fonts/GothamNarrSSm-Book_Web.woff" as="font" title="FontRegular" type="font/woff" crossorigin="anonymous" />
  <link rel="preload" href="/typo3conf/ext/sitepackage/Resources/Public/Fonts/GothamSSm-Medium_Web.woff" as="font" title="FontBold" type="font/woff" crossorigin="anonymous" />
  <link rel="stylesheet" href="/typo3conf/ext/sitepackage/Resources/Public/Css/fonts.css" crossorigin="anonymous" />

and this content in fonts.css:

@font-face {font-family: "FontRegular"; src: url("/typo3conf/ext/sitepackage/Resources/Public/Fonts/GothamNarrSSm-Book_Web.woff") format("woff"); font-display: swap;}
@font-face {font-family: "FontBold"; src: url("/typo3conf/ext/sitepackage/Resources/Public/Fonts/GothamSSm-Medium_Web.woff") format("woff"); font-display: swap;}
@font-face {font-family: "FontHeadingsRegular"; src: url("/typo3conf/ext/sitepackage/Resources/Public/Fonts/Adelle-Bold.woff") format("woff"); font-display: swap;}
@font-face {font-family: "FontHeadingsBold"; src: url("/typo3conf/ext/sitepackage/Resources/Public/Fonts/Adelle-Bold.woff") format("woff"); font-display: swap;}

I don't see an option how to achive it differently by TypoScript than as comment.

The feature request is to increase the amount of options, so that the desired code can be created in top of the css-files.

Also available in: Atom PDF