Feature #26372
closedAdd media type configuration option for TypoScript setting config.inlineStyle2TempFile
0%
Description
The TypoScript option config.inlineStyle2TempFile adds the inline css markup with the attribute media="all".
See TSpagegen::renderContentWithHeader where the inline css gets added at two places:
if (trim($style)) {
if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
$pageRenderer->addCssFile(TSpagegen::inline2TempFile($style, 'css'));
} else {
$pageRenderer->addCssInlineBlock('additionalTSFEInlineStyle', $style);
}
}
and
if (count($temp_styleLines)) {
if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
$pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(LF, $temp_styleLines), 'css'));
} else {
$pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(LF, $temp_styleLines));
}
}
The media attribute should be configurable via TypoScript.
I propsose a new TypoScript setting
config.inlineStyle2TempFile.media
which defaults to "all" and supports values similar to the media attribute of the TypoScript setting config.includeCSS[].