Skip to content

Support "span" in CSS Grid shorthand#186

Merged
robinweser merged 2 commits intorobinweser:masterfrom
kevinweber:kw--grid-shorthand-span
Feb 4, 2020
Merged

Support "span" in CSS Grid shorthand#186
robinweser merged 2 commits intorobinweser:masterfrom
kevinweber:kw--grid-shorthand-span

Conversation

@kevinweber
Copy link
Copy Markdown
Contributor

Support span values in the column and row shorthand syntax.

@lencioni @ljharb @etripier
#173

@kevinweber
Copy link
Copy Markdown
Contributor Author

@robinweser What are your thoughts on this?

@robinweser
Copy link
Copy Markdown
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
Copy Markdown
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