Skip to content

Conversation

matmannion
Copy link

@matmannion matmannion commented Sep 15, 2025

Fixes the case in the flex shorthand where the third value isn't an explicit value or dimension, which was causing a parse error when called with (e.g.) flex: 0 0 auto

@domenic
Copy link
Member

domenic commented Sep 16, 2025

@asamuzaK can you take a look?

@matmannion would you be willing to send a regression test to jsdom as well? Similar to, e.g., jsdom/jsdom#3893

@asamuzaK
Copy link
Contributor

We also need to fix L56 block to:

if (name === "none") {
  return {
    "flex-grow": "0",
    "flex-shrink": "0",
    "flex-basis": "auto"
  };
}
flex["flex-basis"] = name;
return flex;

And L126 block to:

case "Identifier": {
  flex["flex-basis"] = val2.name;
  break;
}

@matmannion matmannion force-pushed the fix/flex-shorthand-auto branch from f75fda9 to 7661755 Compare September 17, 2025 09:49
@matmannion
Copy link
Author

Thanks @asamuzaK, have updated.

@domenic no problem, I'll PR adding the jsdom regression test

@asamuzaK
Copy link
Contributor

LGTM

@heath-freenome
Copy link

Sweet! When can we get this released?

@domenic
Copy link
Member

domenic commented Sep 18, 2025

jsdom releases usually happen on weekends when I am free (which is not every weekend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants