GithubHelp home page GithubHelp logo

Comments (10)

vunguyentuan avatar vunguyentuan commented on May 30, 2024 1

I've put the autocomplete variables on top, I hope this is the correct behavior that you are expecting

from vscode-css-variables.

vunguyentuan avatar vunguyentuan commented on May 30, 2024

from vscode-css-variables.

vunguyentuan avatar vunguyentuan commented on May 30, 2024

@mthines Can you send me your src/styles/base/colors.scss? I need that to test the parser

from vscode-css-variables.

mthines avatar mthines commented on May 30, 2024

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.

vunguyentuan avatar vunguyentuan commented on May 30, 2024
--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.

vunguyentuan avatar vunguyentuan commented on May 30, 2024

Ok, Let me try to use csstree parser instead of postcss parser. I think it should solve this issue

from vscode-css-variables.

mthines avatar mthines commented on May 30, 2024
--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.

vunguyentuan avatar vunguyentuan commented on May 30, 2024

@mthines Can you check the new version?, I just published.

from vscode-css-variables.

mthines avatar mthines commented on May 30, 2024

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.

mthines avatar mthines commented on May 30, 2024

It works great now!
Good job mate 💪

from vscode-css-variables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.