.. _breaking-projects-category-icons-follow-the-colour-scheme:
=========================================================
Breaking: Category icons follow the backend colour scheme
=========================================================
Description
===========
The four category type icons of this extension, which
:php:`EXT:category_types` registers as :php:`category_types.projects.*`, were
registered with the core provider
:php:`\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider`. It renders the
default markup - the markup a :php:`sys_category` type icon reaches - as an
:html:`` tag. An image is opaque to CSS, so the icon kept the ink of its
file whatever the backend colour scheme said.
The four category types now ask for inlining with `inlineIcon: true` in
:file:`Configuration/CategoryTypes.yaml`, so :php:`EXT:category_types` registers
them with
:php:`\FGTCLB\AcademicBase\Imaging\IconProvider\CurrentColorSvgIconProvider`,
which inlines the file in both markups, and the four files are drawn in
`currentColor` with no colour of their own. A category type without that flag
keeps the core provider.
Impact
======
The four icons reach the **frontend**, through
:html:`` in
:file:`Pages/AcademicProject.html` and :file:`Partials/Project/Item.html`.
Neither call asks for the `inline` markup, so their rendered markup changes: an
:html:`` of a fixed pixel size becomes an inlined :html:`