Skip to content

Add format viewhelper to convert arrays to css custom properties #1228

@schliesser

Description

@schliesser

Introduce a new ViewHelper (e.g. <f:format.cssVariables>) to convert array-structured data to CSS custom properties.

The ViewHelper recursively processes a given Fluid array, converting each key-value pair into a CSS variable.
The array keys are transformed into CSS variable names (e.g., :html:camelCaseKey becomes :html:--camelcasekey),
and the corresponding values are used as the variable values.
Only string values are rendered.

See: https://review.typo3.org/c/Packages/TYPO3.CMS/+/89729

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions