cssinjs / cssinjs/jss

[jss-vendor-prefixer] CSS Grid and Vendor prefix

Open
#1,010 10 comments 1 reaction 1 assignee Claimed by @AleshaOleg View on GitHub
complexity:moderate enhancement
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

__Expected behavior:__
Hello
When using CSS Grid with recat-jss I expect that Vendor prefix will kick in i IE and add the -ms prefix to some of the CSS Grid properties.

__Describe the bug:__
Here is an example:
```javascript
'& .head-section': {
display: 'grid',
gridTemplateColumns: '1fr 1fr 240px',
gridRow: props => props.notificationSection ? '2' : '1',
gridColumn: '1 / span 2'
padding: '0 30px',
}
```

This works fine in Chrome or Firefox.
In IE 11 however, I see the following css rules in developer tools:
```css
display: -ms-grid;
-ms-grid-colum: 1 / span 2;
grid-template-columns: 1fr 1fr 240px;
grid-row: 2;
```
Notice that only the display property has correct propertyname and value. The other properties are flagged red in IE dev tools and are not applied.

According to Autoprefix, the other values should be pared like this for IE:
```css
display: -ms-grid;
-ms-grid-colum: 1;
-ms-grid-column-span: 2;
ms-grid-columns: 1fr 1fr 240px;
ms-grid-row: 2;
```

Is there any reason for this behavior?

__Codesandbox link:__

__Versions (please complete the following information):__
- react-jss: 8.6.1
- Browser [e.g. chrome, safari]: IE 11
- OS [e.g. Windows, macOS]: Windows

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.