Skip to content

Add support for SvgSpriteIconProvider for SVG assets (support for TYPO3 V14 Themes) #546

Description

@OlivierSC

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions