Skip to content

Commit 1294ed3

Browse files
committed
fix trace selector styling on IE
1 parent 80368bb commit 1294ed3

File tree

2 files changed

+99
-10
lines changed

2 files changed

+99
-10
lines changed

scripts/postcss.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const internetExplorerPostCSS = () => {
2727
combineSelectors,
2828
customProperties,
2929
removeRoot,
30-
autoprefixer({browsers: ['ie 11']}),
30+
autoprefixer({browsers: ['ie 11'], grid: true}),
3131
cssnano,
3232
];
3333
fs.readFile(`${BUILD_ENV}/${fileName}.ie.css`, (err, css) => {
@@ -37,16 +37,12 @@ const internetExplorerPostCSS = () => {
3737
to: `${BUILD_ENV}/${fileName}.ie.min.css`,
3838
})
3939
.then(result => {
40-
fs.writeFile(
41-
`${BUILD_ENV}/${fileName}.ie.min.css`,
42-
result.css,
43-
error => {
44-
if (error) {
45-
/* eslint-disable no-console */
46-
console.log(error);
47-
}
40+
fs.writeFile(`${BUILD_ENV}/${fileName}.ie.min.css`, result.css, error => {
41+
if (error) {
42+
/* eslint-disable no-console */
43+
console.log(error);
4844
}
49-
);
45+
});
5046
});
5147
});
5248
};

src/styles/components/widgets/_trace-type-selector.scss

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,52 @@ $image-size: 60px;
1616
flex-shrink: 0;
1717
flex-grow: 0;
1818

19+
&:nth-of-type(4n + 3) {
20+
-ms-grid-column: 1;
21+
}
22+
&:nth-of-type(4n) {
23+
-ms-grid-column: 2;
24+
}
25+
&:nth-of-type(4n + 1) {
26+
-ms-grid-column: 3;
27+
}
28+
&:nth-of-type(4n + 2) {
29+
-ms-grid-column: 4;
30+
}
31+
&:nth-of-type(3),
32+
&:nth-of-type(4),
33+
&:nth-of-type(5),
34+
&:nth-of-type(6) {
35+
-ms-grid-row: 2;
36+
}
37+
&:nth-of-type(7),
38+
&:nth-of-type(8),
39+
&:nth-of-type(9),
40+
&:nth-of-type(10) {
41+
-ms-grid-row: 3;
42+
}
43+
44+
.trace-item {
45+
&:nth-of-type(2n + 1) {
46+
-ms-grid-column: 1;
47+
}
48+
&:nth-of-type(2n + 2) {
49+
-ms-grid-column: 2;
50+
}
51+
&:nth-of-type(3),
52+
&:nth-of-type(4) {
53+
-ms-grid-row: 2;
54+
}
55+
&:nth-of-type(5),
56+
&:nth-of-type(6) {
57+
-ms-grid-row: 3;
58+
}
59+
&:nth-of-type(7),
60+
&:nth-of-type(8) {
61+
-ms-grid-row: 4;
62+
}
63+
}
64+
1965
&:not(:first-of-type) {
2066
position: relative;
2167
&::before {
@@ -37,6 +83,53 @@ $image-size: 60px;
3783
&--double {
3884
grid-column: span 2;
3985
flex-grow: 0;
86+
87+
&:nth-of-type(2n + 1) {
88+
-ms-grid-column: 1;
89+
}
90+
&:nth-of-type(2n + 2) {
91+
-ms-grid-column: 3;
92+
}
93+
&:nth-of-type(5),
94+
&:nth-of-type(6) {
95+
-ms-grid-row: 2;
96+
}
97+
&:nth-of-type(7),
98+
&:nth-of-type(8) {
99+
-ms-grid-row: 3;
100+
}
101+
102+
.trace-item {
103+
&:nth-of-type(4n + 1) {
104+
-ms-grid-column: 1;
105+
}
106+
&:nth-of-type(4n + 2) {
107+
-ms-grid-column: 2;
108+
}
109+
&:nth-of-type(4n + 3) {
110+
-ms-grid-column: 3;
111+
}
112+
&:nth-of-type(4n) {
113+
-ms-grid-column: 4;
114+
}
115+
&:nth-of-type(3),
116+
&:nth-of-type(4) {
117+
-ms-grid-row: 1;
118+
}
119+
&:nth-of-type(5),
120+
&:nth-of-type(6),
121+
&:nth-of-type(7),
122+
&:nth-of-type(8) {
123+
-ms-grid-row: 2;
124+
}
125+
&:nth-of-type(9),
126+
&:nth-of-type(10),
127+
&:nth-of-type(11),
128+
&:nth-of-type(12) {
129+
-ms-grid-row: 3;
130+
}
131+
}
132+
40133
.trace-grid__column__items {
41134
display: grid;
42135
grid-gap: 0;

0 commit comments

Comments
 (0)