This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262769 - Support for css variables
Summary: Support for css variables
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal with 6 votes (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2016-07-11 13:14 UTC by Petr Hejl
Modified: 2017-09-10 22:26 UTC (History)
4 users (show)

See Also:
Exception Reporter:

patch (1.76 MB, patch)
2016-07-13 13:38 UTC, Milutin Kristofic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2016-07-11 13:14:25 UTC
We should support css variables as specified here:

React is already using it.
Comment 1 Milutin Kristofic 2016-07-13 13:38:38 UTC
Created attachment 160370 [details]

Here is my first try for parsing variables. Can I somehow test it with your examples?
Comment 2 Petr Hejl 2016-07-13 13:44:35 UTC
Clone and watch for errors in css.
Comment 3 Milutin Kristofic 2016-07-13 13:52:20 UTC
I see now, they use future CSS features because they use this plugin There are more stuff that css for example color function etc. 

I will look at this, but this is more about supporting cssnext
Comment 4 skylarmt 2017-07-24 04:26:57 UTC
Most major browsers now support CSS variables:  At minimum Netbeans shouldn't show syntax errors when handling them, but the best thing would be variable autocompletion.
Comment 5 skylarmt 2017-07-24 04:39:58 UTC
Here's the spec URL:
Comment 6 merlin2v 2017-09-10 22:26:37 UTC
I was looking up a way to have vars however NetBeans thinks it is an error.
Also I found that when using the CSS Styles window to edit styles it shows up the variable in category unknown as well as a var name will loose some of its beginning letters. 


    --myVar: 18;

  ↓    ↓    ↓    ↓

[+] Unknown
 yVar  |  18   |

Note that "yVar" was red and was strike through and missing 'm'