CSS Variables Syntax Checker

113 views
Skip to first unread message

MJ

unread,
Sep 26, 2020, 8:07:12 AM9/26/20
to Ajax.org Cloud9 Editor (Ace)
When using css variables e.g. 
:root {
--primary-text: blue;
}
ace flags up a red box with a cross with a tooltip saying that it expects RBRACE before the variable.

Paul Ryder

unread,
Dec 16, 2020, 5:44:24 PM12/16/20
to Ajax.org Cloud9 Editor (Ace)
I can confirm this. Very frustrating as i'd like to use this in a CSS editing project. Probably going to have to go with Monaco or something, purely because of this. I think it really just comes down to modernizing the syntax highlighting. I don't even know if ACE is still being worked on? I only just started playing with it, but this seems like an error that should have been resolved about a year ago.

Brad Moran

unread,
Dec 18, 2020, 9:36:11 PM12/18/20
to Ajax.org Cloud9 Editor (Ace)
It's merely an annoyance. It's discussed here:


Ace is active and supported, but the CSSlint module they use isn't and I guess nobody has bothered to fix it.. I and 99% of the world code css variables with .scss files which Ace supports very well so there just aren't many squeaky wheels on this issue. Just using sass/scss for variables is well worth the effort to rustle up a compiler.

Switching to Monaco because of this would be foolhardy. Ace is a great editor. As with any open source project; some things you just have to either live with or fix yourself. Having a few warnings on the screen isn't that big a deal.
Reply all
Reply to author
Forward
0 new messages