Open core-ai-bot opened 2 years ago
Comment by ficristo
Wednesday Apr 26, 2017 at 18:34 GMT
Are you referring about syntax highlighting? The default themes don't do a really good job here, but you could try some custom ones. Apart syntax highlighting and previewing theyr values, were you thinking something else?
I used this snippet to look:
:root {
--color: red;
}
body {
color: var(--color);
}
Comment by fluxxus
Thursday Apr 27, 2017 at 11:40 GMT
@
ficristo Sorry, I wasn't clear enough. I am not talking about syntax highlighting in various themes.
I am talking more about suggesting declared variables, basically autocomplete for CSS variables.
Using your example I would like to have a dropdown list of suggested values after opening the left parenthesis in color: var(list of possible values)
.
VS Code has it built-in without extensions. Also when the suggested values list pops up, each variable's value is shown in that popup also.
Comment by ficristo
Thursday Apr 27, 2017 at 18:03 GMT
Ah, makes sense. Does VSCode show variables only present in the current file or is able to scan through your CSS files?
Comment by fluxxus
Thursday Apr 27, 2017 at 18:43 GMT
@
ficristo Only variables present in the current file are available. It doesn't scan other CSS files, nor it works when@
import is used at the top of the current CSS file.
I think that this second option could be really useful, especially for writing modular CSS. From what I know HTTP/2 will allow for parallel requests, basically we will be able to structure our CSS the same way we do it with preprocessors.
So, if that could be implemented, it will be a great bonus.
Comment by ficristo
Monday May 01, 2017 at 14:11 GMT
Note to self: see also https://github.com/adobe/brackets/issues/7882
From what I see Brackets are not aware of CSS Custom Properties a.k.a. CSS Variables.
It would be nice to have built-in suppport for them(or maybe via an extension). And if it could show variable's value after it resolves it(at least for color), that would be awesome. I am thinking of some small popup for that or similar.
CSS custom properties are here(Edge has support now) and more and more people will start using them, it would be nice to have support for them.