Add shorthand expansion and compression to the lexer
Add lexer methods to expand CSS shorthands into longhands and compress longhands back into shorthand values.
csstree-shorthand-expansion-compression
Normalized profile
What this task asks for
Add lexer methods to expand CSS shorthands into longhands and compress longhands back into shorthand values. Add two methods to the lexer: `expandShorthand(propertyName, value)` expands a CSS shorthand into an object mapping each longhand name to its value string. `compressShorthand(propertyName, longhands)` compresses an object of longhand name-value pairs back into a shorthand value string. When a component is omitted from the value, the corresponding longhand receives its CSS initial value. Must support at minimum: margin, padding, border, border-top, border-right, border-bottom, border-left, background, font, outline, overflow, flex, flex-flow, gap, text-decoration, list-style, inset, and border-radius. Must work with custom syntax created via fork(). Expanding a shorthand and then compressing the result should produce an equivalent shorthand value.
Intent
- feature implementation
- data transformation
Work surfaces
- parser
Technology
- CSSTree
- CSS
Expected artifacts
- repository patch
What makes it difficult
- strict behavioral compatibility or exact-output validation
Published evidence
Model × harness outcomes
Counts are tied to these exact configurations. Harnesses are not treated as equivalent across benchmarks.
- Models
- 13
- Configurations
- 41
- Trials
- 164
Showing 41 of 41 configurations
| Model | Harness | Effort | Result | Passes |
|---|---|---|---|---|
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | max | Mixed | 1/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | medium | Mixed | 1/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | high | Mixed | 1/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | xhigh | Mixed | 1/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| claude-sonnet-4-6anthropic | mini-swe-agentpublished configuration | high | Mixed | 1/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | xhigh | Mixed | 1/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | max | Mixed | 3/4 |
| gemini-3-1-pro-previewvertex_ai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gemini-3-5-flashvertex_ai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| gpt-5-4openai | mini-swe-agentpublished configuration | xhigh | Mixed | 1/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | xhigh | Mixed | 2/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | xhigh | Mixed | 1/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | max | Mixed | 2/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | medium | Mixed | 3/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | high | All passed | 4/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | xhigh | All passed | 4/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | max | All passed | 4/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | xhigh | Mixed | 3/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | max | All passed | 4/4 |
| kimi-k2-7-codeopenrouter | mini-swe-agentpublished configuration | default | No passes | 0/4 |