I'm having trouble with a misbehaving grid. For context, I have a single page application that I am trying to turn into a grid-layout at large screens. My HTML has a div of "main-grid" that wraps the entire page:
<body>
<div class="main-grid">
...
</div>
<script ... > </script>
</body>
I did not add any properties to this element prior to this media query:
@include media-md {
.main-grid {
display:grid;
grid-template-columns: minmax(1em,1fr) repeat(3, minmax(10rem,30rem)) minmax(1em,fr);
gap: 2em;
}
The issue I am having is two fold First: This scss compiles into this:
.main-grid {
display: -ms-grid;
display: grid;
-ms-grid-columns: minmax(1em, 1fr) (minmax(10rem, 30rem))[3] minmax(1em, fr);
grid-template-columns: minmax(1em, 1fr) repeat(3, minmax(10rem, 30rem)) minmax(1em, fr);
gap: 2em;
}
I understand from research that IE uses the bracketed syntax instead of repeat, but VSCode does not seem to understand this. It is throwing an error at [3] and causing chrome and FF to gray-out my regular grid options as well.
I have removed these previously and typed out each column, still Chrome and FF do not recognize this code. Anyone know whats up with it? Just in case I'm not being clear enough: Here's a live shot of my devtools for reference on the wonky grid and grayed-out styling;