Review main Merged

76542[TASK] Deprecate _CSS_PAGE_STYLE and config.removePageCss

Christian Kuhn CR +2 V +2 Normal +87 −5 updated 11/10/22, 15:40

Commit message

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".

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 4