The parameters and hash arguments to a style-of helper invocation are analyzed as if the helper invocation is an element or component invocation. The arguments to style-of can be dynamic in the same way that attributes can be dynamic.
The return value of the style-of helper is a string that can be set to an html class attribute. This value should be considered opaque. Do not try to manipulate it or depend on the value inside it.
Merging the class names from CSS Blocks with class names from styles not managed by CSS Blocks may result in unexpected behavior, especially with opticss enabled.
There is a new synthetic helper for css-blocks in glimmer and ember applications called
style-of
.Original Specification is at: https://github.com/linkedin/css-blocks/issues/383
The parameters and hash arguments to a
style-of
helper invocation are analyzed as if the helper invocation is an element or component invocation. The arguments tostyle-of
can be dynamic in the same way that attributes can be dynamic.The return value of the
style-of
helper is a string that can be set to an htmlclass
attribute. This value should be considered opaque. Do not try to manipulate it or depend on the value inside it.Merging the class names from CSS Blocks with class names from styles not managed by CSS Blocks may result in unexpected behavior, especially with opticss enabled.
Closes #383.