Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Expected RBRACE at line 4, col 2. Is this error a bug?

New Here ,
May 16, 2019 May 16, 2019

/* CSS Document */

:root {

--main-bg-color: white;

--main-text-color: white;

}

I am getting the error:

Expected RBRACE at line 4, col 2.

Expected RBRACE at line 5, col 2.

I am pretty new and did some research on CSS linting but I am still somewhat lost on what to do here.

25.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 16, 2019 May 16, 2019

In the latest versions of DW, Linting only fires after the file is saved. As shown here, once the file has been saved, the red line numbers pop up...

@andrewm30596637,

Even the online CSS Linting tools don't quite understand how to work with CSS Variables yet.

There's nothing technically wrong with your code, but If the red line numbers bother you, you can turn off linting under Edit > Preferences > Linting.

Translate
Community Expert ,
May 16, 2019 May 16, 2019

which DW version ? how to you proceed...

I don't get any error here

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 16, 2019 May 16, 2019

In the latest versions of DW, Linting only fires after the file is saved. As shown here, once the file has been saved, the red line numbers pop up...

@andrewm30596637,

Even the online CSS Linting tools don't quite understand how to work with CSS Variables yet.

There's nothing technically wrong with your code, but If the red line numbers bother you, you can turn off linting under Edit > Preferences > Linting.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 16, 2019 May 16, 2019

good catch Jon,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 01, 2020 Jul 01, 2020

Dear Dreamweaver Team,

as the bug is in CSSLint that doesn't seem to be maintained any longer, would you please move on to another way of linting CSS? Would be great. Because this error gets a bit in the way and css vars get more common nowadays.
See here: https://github.com/CSSLint/csslint/issues/720

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 22, 2024 Dec 22, 2024
LATEST

The following is how to resolve warnings in dw21's css editor.

https://community.adobe.com/t5/dreamweaver%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A9%E3%83%A0-discussions/...

 

 

 

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