Asset.styleAttr ViewHelper <f:asset.styleAttr>
ViewHelper for inline style attributes that need CSP hash coverage via style-.
When csp is true (default), the style value is hashed and registered with the HashCollection so that the CSP header includes the corresponding sha256-... hash.
Usage:
Go to the source code of this ViewHelper: Asset\StyleAttrViewHelper.php (GitHub).
Arguments of the <f:asset.styleAttr> ViewHelper
csp
-
- Type
- bool
- Default
- true
Whether to collect a CSP hash for this style value
value
-
- Type
- string
- Required
- 1
The inline style value (e.g. "color: green; text-decoration: underline;")