[css-grid] translate `grid` property syntax into IE safe syntax when possible
See original GitHub issueThis code
.grid {
display: grid;
grid:
"left .... right" 100px /
1fr 10px 1fr;
}
.left-cell { grid-area: left; }
.right-cell { grid-area: right; }
Should translate into this:
.grid {
display: -ms-grid;
display: grid;
-ms-grid-columns: 1fr 10px 1fr;
-ms-grid-rows: 100px;
grid:
"left .... right" 100px /
1fr 10px 1fr;
}
.left-cell {
-ms-grid-row: 1;
-ms-grid-column: 1;
grid-area: left;
}
.right-cell {
-ms-grid-row: 1;
-ms-grid-column: 3;
grid-area: right;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Basic concepts of grid layout - CSS: Cascading Style Sheets
CSS Grid Layout introduces a two-dimensional grid system to CSS. Grids can be used to lay out major page areas or small user...
Read more >A Complete Guide to CSS Grid
Our comprehensive guide to CSS grid, focusing on all the settings both for the grid parent container and the grid child elements.
Read more >grid-template-rows | CSS-Tricks
The grid-template-rows CSS property is part of the CSS Grid Layout specification, defining the rows of a grid container by specifying the size ......
Read more >CSS Grid in IE: CSS Grid and the New Autoprefixer
Update: In version 9.3.1 you can enable CSS Grid translations by simply adding a ... Span syntax requires grid-column-end to be defined.
Read more >grid-template-areas | CSS-Tricks
So, if you have a top row in your grid container and you want the header of your layout to go in there,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Dan503 You are damn right! Your case is definitely the case of
grid-template
shortcut.grid
shortcut also supportsgrid-template
but also supports shortcuts withgrid-auto-
properties. So there are two reasons to usegrid
shortcut:grid-auto-
properties in the shortcut.And of course, you want that these properties work in IE (that why we are here). So if you use
grid-template
you can be sure that everything works in IE. So in your case it’s better to usegrid-template
. If someone wants to usegrid
for the second reason, he must understand thatgrid-auto-
properties don’t work in IE at all.Hm. I will look later on this week.