Issue Feature Closed

#26372Add media type configuration option for TypoScript setting config.inlineStyle2TempFile

Patrick Rodacker 04/28/11, 01:29 updated 09/06/13, 09:18

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[].

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.