Comments (10)
I've put the autocomplete variables on top, I hope this is the correct behavior that you are expecting
from vscode-css-variables.
from vscode-css-variables.
@mthines Can you send me your src/styles/base/colors.scss
? I need that to test the parser
from vscode-css-variables.
Here you go.
:root {
/// Interface
// Primary
--c-primary-text: #273447;
--c-primary-base: #343f4f;
--c-primary-light-1: #415168;
--c-primary-light-2: #57677f;
--c-primary-light-3: #708099;
// Grey
--c-grey-text: #7c8ca2;
--c-grey-base: #a0adc0;
--c-grey-light-1: #d6dde5;
--c-grey-light-2: #eef1f5;
--c-grey-light-3: #f4f6f9;
--c-white: #ffffff;
/// States
// Error
--c-error-text: #da494e;
--c-error-base: #f7696d;
--c-error-light-1: #ffc7c9;
--c-error-light-2: #ffe5e6;
--c-error-light-3: #fff5f5;
// Alert
--c-alert-text: #CC8B00;
--c-alert-base: #F0B400;
--c-alert-light-1: #fde696;
--c-alert-light-2: #fff7db;
--c-alert-light-3: #fffcf0;
// Success
--c-success-text: #21ab41;
--c-success-base: #52d16f;
--c-success-light-1: #acf1bd;
--c-success-light-2: #d8f8e0;
--c-success-light-3: #eefcfc;
// Overlay
--c-transparent: rgba(0, 0, 0, 0);
--c-overlay: #{transparentize(#06333d, 0.7)};
--c-overlay-transparent-1: #{transparentize(#06333d, 0.95)};
--c-overlay-transparent-2: #{transparentize(#06333d, 0.88)};
--c-overlay-light-1: #{transparentize(#ffffff, 0.75)};
--c-overlay-dark-1: #{transparentize(black, 0.75)};
}
from vscode-css-variables.
--c-overlay: #{transparentize(#06333d, 0.7)};
--c-overlay-transparent-1: #{transparentize(#06333d, 0.95)};
--c-overlay-transparent-2: #{transparentize(#06333d, 0.88)};
--c-overlay-light-1: #{transparentize(#ffffff, 0.75)};
--c-overlay-dark-1: #{transparentize(black, 0.75)};
This not valid css syntax, what do you expect when using variable --c-overlay-dark-1
?
from vscode-css-variables.
Ok, Let me try to use csstree
parser instead of postcss
parser. I think it should solve this issue
from vscode-css-variables.
--c-overlay: #{transparentize(#06333d, 0.7)}; --c-overlay-transparent-1: #{transparentize(#06333d, 0.95)}; --c-overlay-transparent-2: #{transparentize(#06333d, 0.88)}; --c-overlay-light-1: #{transparentize(#ffffff, 0.75)}; --c-overlay-dark-1: #{transparentize(black, 0.75)};
This not valid css syntax, what do you expect when using variable
--c-overlay-dark-1
?
It's valid SCSS syntax, and it looks like this should works with SCSS as well?
from vscode-css-variables.
@mthines Can you check the new version?, I just published.
from vscode-css-variables.
It now finds the variables, and there's no error in the console, but the autocompleting seems a bit weird?
See video :)
https://user-images.githubusercontent.com/16097850/103015829-5ff4c680-4541-11eb-9bc7-75ed0531abef.mp4
from vscode-css-variables.
It works great now!
Good job mate 💪
from vscode-css-variables.
Related Issues (20)
- Setting to Disable .js / .ts Autocomplete? HOT 8
- How to debug this extension in vscode? HOT 1
- [Bug] should only show css variables suggestion in style block for vue file HOT 1
- Allow CDN links in lookupFiles list HOT 1
- Ctrl + click for references doesn't work properly when extension is enabled
- [Bug] Accepting autocomplete is problematic in daily use HOT 1
- It is not working in *.styl file
- Preview colors for node_module
- Server crashed 5 times!!! HOT 1
- How to add yarn berry packages into cssVariables.lookupFiles list?
- Any settings to insert CSS variable name without `var()`? HOT 2
- lookupFiles not work with workspace folder HOT 1
- color preview is not rendered HOT 1
- Adds extra hyphens when starting by typing hyphens HOT 2
- Warn if not defined
- No suggestion if try to re-define css variable
- Add ability to add variables that are not in any css files as they'll be generated at run time
- sass预设不同的主题
- [Bug] Extension crashes when getting permission denied
- Tailwind CSS IntelliSense extension and "Tailwind CSS" language mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-css-variables.