You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have multiple declarations with the same property name in a single block, CSS automatically collapses them for you, retaining only the last one. While we shouldn't opt the generic parser into this by default (other languages might have a good reason to allow multiple declarations with the same name), it would be nice to give the parser an option to do this for you automatically.
The text was updated successfully, but these errors were encountered:
Oooh, or better idea: treat declaration values with the same property name as monoids. Default to the List monoid so the multiple values just get collected in an array, allow easily opting into CSS's behavior of using the Last monoid, but also allow just providing a "join" callback to the parser that can implement arbitrary monoidal behavior, like merging properties into a conjoined value. (My InfoTree format I invented for Bikeshed, which is vaguely CSSish, has both of these behaviors, depending on the key - some override with last-wins behavior, others combine in a reasonable way.)
When you have multiple declarations with the same property name in a single block, CSS automatically collapses them for you, retaining only the last one. While we shouldn't opt the generic parser into this by default (other languages might have a good reason to allow multiple declarations with the same name), it would be nice to give the parser an option to do this for you automatically.
The text was updated successfully, but these errors were encountered: