abe33/atom-project-palette-finder

Color files not added

Closed this issue · 5 comments

If I do a Palette: Find All Colors it will show me the colors in all my files, but when I run the Palette: View, it does not show the colors from one of the main files that I need.

I gave the scopes in the settings set to

vendor/assets/thirdparty/styles/global/_colors.scss, app/assets/stylesheets/modules/_colors.scss, _colors.scss

The app/assets colors file shows up fine, but the one from the thirdparty does not show up in the View. The ones in thirdparty DO show up when I run the Find All Colors.

The colors are setup in a BEM type naming convention, so I'm not sure if that's causing any of the issues.

A quick example of some of the colors in there are written out like:

$color__action--primary: #515761 !default;
$color__action--secondary: #8b94a2 !default;
$color__action--tertiary: #767f8e !default;

Not sure what I can do to help provide more information so that I can get these colors to show up in the palette, as well as be available in the autocomplete and highlight extensions. The other file works perfectly, it's just this one, so I am assuming it has to do with the naming convention.

Thanks for all the hard work!

I think I have omitted to support the !default construct, I'll fix that asap.

I have installed the newest version of this module (2.4.12 which includes the fixed pigments version 3.10, i double checked that) and it still isn't working for me.
I have one file _foundation_and_overrides.scss with color-variables without the !default tag and further variables in _colors.scss with the !default tag, but only the variables from the first file are shown in the palette (all variables are shown in the "show all" view).
If i remove the !default the variables do show up.

Thanks for the work and help!

Edit: it also doesn't work if the variables with !default are in the same file as the none !defaults if it is important to you.

@Miradorn Ok, I may have missed something. Have you a sample file that you can provide so that I try to understand where it fails?

the following variables in a colors.scss file is enough:

$white: #fff;
$black: #000 !default;

$white is shown in the palette: view, $black is only shown in palette: find all colors

Ok thanks, I'll take a look at that tonight.