Highlighted

grid-template-columns gives error in Dreamweaver

New Here ,
Apr 21, 2020

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?  

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

Because Dreamweaver linting is behind the times. Ignore the error or turn off linting.

Views

586

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

grid-template-columns gives error in Dreamweaver

New Here ,
Apr 21, 2020

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?  

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

Because Dreamweaver linting is behind the times. Ignore the error or turn off linting.

Views

587

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 21, 2020

Copy link to clipboard

Copied

Because Dreamweaver linting is behind the times. Ignore the error or turn off linting.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 21, 2020

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 21, 2020

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/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 21, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
osgood_ LATEST
LEGEND ,
Apr 21, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...