User Story
As a style author, I have heard an ask to construct arrays containing expressions, so that style authorws can compute array values dynamically instead of being limited to static literal arrays.
Rationale
literal exists to represent static arrays and objects.
However, many style properties accept arrays whose elements would naturally be computed from expressions. Today, there is no way to do this without awkward workarounds, and some use cases cannot be expressed at all.
A new semiliteral expression would preserve the existing semantics of literal while evaluating expressions within arrays and objects. This makes the expression language more consistent and enables dynamic construction of array-valued properties without breaking existing styles.
Impact
Without semiliteral, authors must duplicate expressions, rely on unintuitive workarounds, or are unable to express certain data-driven styles. Supporting computed arrays makes the style specification more expressive while remaining backwards compatible.
AI Assistance
With assistance for summarisation.
User Story
As a style author, I have heard an ask to construct arrays containing expressions, so that style authorws can compute array values dynamically instead of being limited to static
literalarrays.Rationale
literalexists to represent static arrays and objects.However, many style properties accept arrays whose elements would naturally be computed from expressions. Today, there is no way to do this without awkward workarounds, and some use cases cannot be expressed at all.
A new
semiliteralexpression would preserve the existing semantics ofliteralwhile evaluating expressions within arrays and objects. This makes the expression language more consistent and enables dynamic construction of array-valued properties without breaking existing styles.Impact
Without
semiliteral, authors must duplicate expressions, rely on unintuitive workarounds, or are unable to express certain data-driven styles. Supporting computed arrays makes the style specification more expressive while remaining backwards compatible.AI Assistance
With assistance for summarisation.