Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "span" in CSS Grid shorthand #186

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

kevinweber
Copy link
Contributor

Support span values in the column and row shorthand syntax.

@lencioni @ljharb @etripier
#173

@kevinweber
Copy link
Contributor Author

@robinweser What are your thoughts on this?

@robinweser
Copy link
Owner

Heyo, sorry for not responding that long.
That PR looks good to me! Will try to merge and release by tomorrow.

@robinweser robinweser merged commit dac7091 into robinweser:master Feb 4, 2020
@matthewharwood
Copy link
Contributor

matthewharwood commented Feb 8, 2020

@robinweser this caused a regression

it('should expand the shorthand column syntax with span as a start', () => {
  const input = { gridColumn: 'span 1' } // error with this valid input
  const output = {
    gridColumn: 'span 1', 
    msGridColumn: 3,
    msGridColumnSpan: 1,
  }
  expect(prefix(input)).toEqual(output) // error
})

Failing branch:
https://github.com/matthewharwood/inline-style-prefixer/blob/master/modules/__tests__/createPrefixer-test.js#L559

    TypeError: Cannot read property 'split' of undefined

      at gridRow (plugins/grid.js:94:3613)
      at Array.grid (plugins/grid.js:105:5)
      at prefixValue (utils/prefixValue.js:10:86)
      at prefix (createPrefixer.js:42:190)
      at Object.<anonymous> (__tests__/createPrefixer-test.js:567:18)

I hijacked this issue:
#176

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.

3 participants