grid-template-rows: auto 1fr;
-ms-grid-rows: auto 1fr;
grid-template-columns: 1fr auto 1fr;
-ms-grid-columns: 1fr auto 1fr;
Why am I getting lots of { expected css(css-lcurlyexpectied)
for various css items likegrid-template-areas: 'intro' 'menu'; and justify-items: center;?
Is there a url to find what -ms to use for grid-area: gallery2; and other grid items like padding-top: 1rem;?
Hi @kat,
It is a little hard to troubleshoot something like this. I’m not sure how your VSC is set up - are you using a plugin for the rule checking? Are you differentiating warnings versus errors?
For my VCS, I would get the first and third declarations underlined with a warning to include the prefixed version. Since they are there, you can ignore the warning.
I haven’t seen this error. Perhaps a screenshot of the code (for some context) and the error?
I think you are asking for a resource to understand what needs to be prefixed? CanIUse is pretty good for edge cases, but I think you will be doing a lot of lookups! This is about the best article I could find with a Google lookup.
Cheers,
Bob
You can take a look if there is a better CSS linter, not really sure if the one you are using is so bad. You just have to see if your warnings are addressed. Any errors likely need attention.
I can’t quite tell what is going on from the screenshot, but some thoughts. The coloring of the declarations is there for a reason. Notice that grid-template-columns is a different color than the other declarations. That indicates it is invalid for some reason. In this case it is because the declaration before it is lacking a semicolon at the end. Additionally, when I see a whole series of declarations that are invalid, it usually makes me feel like the an earlier part of my code is malformed, leading to “down-stream” errors. The only other thing you should look out for is the use of backticks vs single quotes vs double quotes. Backticks will throw errors many times.
Good Luck,
Bob
Hi @kat,
It looks like to me that the only errors and warnings are either caused by the asterisks in your CSS, the order of your declarations, or can be ignored.
In the end, the best test is to try your page on different browsers to see if it actually works as expected.
Cheers,
Bob
Hi @kat,
Basically you want the non-prefixed version last. There are some exceptions, but that is a pretty good rule. The order of the prefixes doesn’t really matter.
Bob
Generally speaking, if multiple different CSS declarations of the same specificity affect the same property of the same HTML element, the last such declaration in the stylesheet overrides all of the preceding ones.