Breaking: Record and category icons follow the colour scheme
Description
The record icons of this extension were registered with the core provider
\TYPO3\, which renders
the default markup - the markup a
typeicon_ entry reaches - as an
<img>
tag. An image is opaque to CSS, so the icon kept the ink of its
file whatever the backend colour scheme said, and a dark drawing stayed dark on
the dark cards of the record list.
They are now registered with
\FGTCLB\,
which inlines the file in both markups, and the files themselves are drawn in
current with no colour of their own.
That covers the icon of the academic program page type and the twelve category
type icons of this extension, which
EXT: registers as
category_. The
twelve category types ask for it with inline in
Configuration/; without that flag a category type
icon keeps the core provider.
Two of those twelve were Font Awesome Pro files, which this project has no licence for. Every drawing of this extension has since been replaced by a Font Awesome Free icon, see Breaking: Icons renamed, credit points icon is a frontend icon.
The two content elements of this extension named their icon by file path rather
than by identifier.
Extension writes that
value into
typeicon_ verbatim, and
Icon registers icons from
ctrl.
only, so the path was never a registered identifier and
Icon answered with the
default-
placeholder. They now name a registered identifier, see
Breaking: Icons renamed, credit points icon is a frontend icon.
Impact
The twelve category type icons reach the frontend, in the facts of a
program: Partials/ renders
<ab: with the icon ViewHelper
of academic_base. The identifier is
category_ for a category type.
category_types registers them in the frontend icon
registry as well, with the same provider, see
Breaking: Icons renamed, credit points icon is a frontend icon. The call does
not ask for the inline markup, so their rendered markup changes: an
<img>
of a fixed pixel size becomes an inlined
<svg>
with
width="1em" height="1em"
, which follows the font size and the colour of
the text around it. Every site using the program plugins sees those icons resize
and recolour.
Site CSS or JavaScript that sized, coloured or addressed the
<img>
has
to address the
<svg>
instead.
In the backend, the page type icon and the twelve category type icons take the text colour around them, so they stay legible in a dark backend colour scheme. The content elements show their icon in the page module and the record list instead of the red not-found placeholder.
Affected Installations
Every installation of this extension. Installations that render the program plugins in the frontend are affected visibly.
Migration
Replace an image selector with an element selector in the site CSS, for example
/* before */
.program-categories .icon img { width: 32px; }
/* after */
.program-categories .icon svg { width: 1.25em; }
The icon element keeps the surrounding
<span class="t3js- wrapper, so a
selector written against the wrapper needs no change.