Copy link to clipboard
Copied
In my css file I have
@media (min-width: 768px) {
.cards { grid-template-columns: repeat(4, 1fr); }
}
and I get an error saying
Expected RBRACE
I got the code from https://travishorn.com/responsive-grid-in-2-minutes-with-css-grid-layout-4842a41420fe and all is working as expected.
Why is there an error?
Because Dreamweaver linting is behind the times. Ignore the error or turn off linting.
Copy link to clipboard
Copied
Because Dreamweaver linting is behind the times. Ignore the error or turn off linting.
Copy link to clipboard
Copied
Thank you for your answer, Ben.
I've looked at Linting. If possible I don't want to turn it off for css completely.
Do you know if I can add a rule to turn this one only?
Copy link to clipboard
Copied
I haven't found a way to kill that error specifically. DW just doesn't understand "fr" yet.
Hopefully in the next release. Or use the online validation tool instead: https://jigsaw.w3.org/css-validator/
Copy link to clipboard
Copied
Thank you for reminding me of the link. Bit of a waste of time that DW isn't up-to-date coz I've spent quite some time on this.
Copy link to clipboard
Copied
Dont place too much dependency on validatimg code within an editor - from experience l can inform you theres not one single editor alive and kicking that is 100% accurate, they all get something wrong somewhere or miss something obvious.
Just use validators as a guide, you know what you have written is valid so move on, validators will flag up stuff you sometimes mistype/overlook so look upon them as being helpful rather than accurate in their interpretation.
Validation these days is a thing of the past, even the 'official' validator gets it all wrong particularly as many good developers use advanced front end frameworks which it does not recognise.