CssVarNamespacer
Class
stablesince v22.1
A service that can be used to manually namespace CSS variable names at runtime. This is useful when reading or setting CSS variables dynamically in JavaScript that were transformed by the compiler during the build.
namespace
stringPrepends the namespace prefix to a CSS variable name.
@paramname
stringThe CSS variable name to namespace, including the leading --.
@returns
stringThe namespaced CSS variable name, including the leading --. Returns the input
unchanged if no namespace is configured.
Jump to details