[TASK] Deprecate _CSS_PAGE_STYLE and config.removePageCss
Plugins can instruct the Frontend to add CSS using the property "plugin.tx_myPlugin._CSS_DEFAULT_STYLE". This often kicks in as soon as an extension is loaded if this TypoScript is added by the extension as default TypoScript. Doing this has a drawback though: If the Frontend renders no HTML but something else - for instance json, this default CSS can destroy the output. In these cases, or when a Frontend integration does not want to have the default styles applied, property "config.removeDefaultCss" can be used to avoid loading these plugin styles. While "_CSS_DEFAULT_STYLE" is still widely used - for instance by ext:fluid_styled_content and lots of TER extensions, the sister property "_CSS_PAGE_STYLE" is much less well known: It has the same characteristics as "_CSS_DEFAULT_STYLE", but is meant to be used by integrators to add additional styles on plugin level. It's inclusion in Frontend can be suppressed using "config.removePageCss". However, there are more elegant ways to include CSS to the Frontend, typically using the PAGE object properties "includeCSS" or "cssInline". The documenation of property "_CSS_PAGE_STYLE" is also misleading since it states the styles are only applied when such a plugin is actively used on a page. But this is not true. The patch deprecates "_CSS_PAGE_STYLE" together with its toggle-off property "config.removePageCss". Resolves: #99050 Releases: main Change-Id: I9863d552f7c068a053fb5d32973b46e7b9fa9219 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76542 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Froemken <froemken@gmail.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Froemken <froemken@gmail.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/core/Documentation/Changelog/12.1/Deprecation-99050-TypoScript_CSS_PAGE_STYLEAndConfigremovePageCss.rst 75 additions, 0 deletions...99050-TypoScript_CSS_PAGE_STYLEAndConfigremovePageCss.rst
- typo3/sysext/frontend/Classes/Http/RequestHandler.php 11 additions, 1 deletiontypo3/sysext/frontend/Classes/Http/RequestHandler.php
- typo3/sysext/seo/Configuration/TypoScript/XmlSitemap/setup.typoscript 1 addition, 0 deletions.../seo/Configuration/TypoScript/XmlSitemap/setup.typoscript
- typo3/sysext/t3editor/Resources/Private/tsref.xml 0 additions, 4 deletionstypo3/sysext/t3editor/Resources/Private/tsref.xml
Please register or sign in to comment