Currently, when icons for content types are in SVG format, the provider used is "SvgIconProvider".
|
$iconProviderClass = $fileExtension === 'svg' ? SvgIconProvider::class : BitmapIconProvider::class; |
This provider generates a call to the SVG via an IMG tag.
<img src="path/to/ifile.svg"/>
This type of call doesn't seem to allow, in SVG file, the use of CSS variables offered by the TYPO3 backend, such as:
- currentColor
- icon-color-accent (V14)
Therefore, it doesn't allow for the use of the new themes offered by TYPO3 V14 with different color variations.
Would it be possible to switch to the "SvgSpriteIconProvider" provider, which generates a true SVG tag on the page and allows for the use of these CSS variables?
<svg><use xlink:href="path/to/ifile.svg"></svg>
Additional context
- TYPO3 V14 and "theme" feature
Currently, when icons for content types are in SVG format, the provider used is "SvgIconProvider".
content-blocks/Classes/Service/Icon/ContentTypeIconResolver.php
Line 46 in b816508
This provider generates a call to the SVG via an IMG tag.
<img src="path/to/ifile.svg"/>This type of call doesn't seem to allow, in SVG file, the use of CSS variables offered by the TYPO3 backend, such as:
Therefore, it doesn't allow for the use of the new themes offered by TYPO3 V14 with different color variations.
Would it be possible to switch to the "SvgSpriteIconProvider" provider, which generates a true SVG tag on the page and allows for the use of these CSS variables?
<svg><use xlink:href="path/to/ifile.svg"></svg>Additional context