Closed manabuyasuda closed 5 years ago
grid: true
は非推奨になっていて、代わりに"no-autoplace"
を使う。
もしくは自動配置サポートもする"autoplace"
を使う。
変換前
.container {
display: grid;
grid-template-columns: 200px 1fr;
grid-template-rows: 50px 1fr 50px;
}
aside {
grid-column: 1 / 2;
grid-row: 1 / 4;
}
header {
grid-column: 2 / 3;
grid-row: 1 / 2;
}
grid:no-autoplace
(true
)で変換後
.container {
display: -ms-grid;
display: grid;
-ms-grid-columns: 200px 1fr;
grid-template-columns: 200px 1fr;
-ms-grid-rows: 50px 1fr 50px;
grid-template-rows: 50px 1fr 50px
}
aside {
-ms-grid-column: 1;
-ms-grid-column-span: 1;
grid-column: 1/2;
-ms-grid-row: 1;
-ms-grid-row-span: 3;
grid-row: 1/4
}
header {
-ms-grid-column: 2;
-ms-grid-column-span: 1;
grid-column: 2/3;
-ms-grid-row: 1;
-ms-grid-row-span: 1;
grid-row: 1/2
}
autoplace
で変換後。no-autoplace
に.container > :nth-child(1)
のセレクターが追加される。
.container {
display: -ms-grid;
display: grid;
-ms-grid-columns: 200px 1fr;
grid-template-columns: 200px 1fr;
-ms-grid-rows: 50px 1fr 50px;
grid-template-rows: 50px 1fr 50px
}
.container > :nth-child(1) {
-ms-grid-row: 1;
-ms-grid-column: 1
}
.container > :nth-child(2) {
-ms-grid-row: 1;
-ms-grid-column: 2
}
.container > :nth-child(3) {
-ms-grid-row: 2;
-ms-grid-column: 1
}
.container > :nth-child(4) {
-ms-grid-row: 2;
-ms-grid-column: 2
}
.container > :nth-child(5) {
-ms-grid-row: 3;
-ms-grid-column: 1
}
.container > :nth-child(6) {
-ms-grid-row: 3;
-ms-grid-column: 2
}
aside {
-ms-grid-column: 1;
-ms-grid-column-span: 1;
grid-column: 1/2;
-ms-grid-row: 1;
-ms-grid-row-span: 3;
grid-row: 1/4
}
header {
-ms-grid-column: 2;
-ms-grid-column-span: 1;
grid-column: 2/3;
-ms-grid-row: 1;
-ms-grid-row-span: 1;
grid-row: 1/2
}