Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS/PostCSS fallback not working #559

Closed
1 task done
johnbwoodruff opened this issue Dec 19, 2016 · 12 comments · Fixed by #568
Closed
1 task done

CSS/PostCSS fallback not working #559

johnbwoodruff opened this issue Dec 19, 2016 · 12 comments · Fixed by #568
Labels

Comments

@johnbwoodruff
Copy link

Checklist

  • I'm sure this issue is not a duplicate?

Screenshot

screen shot 2016-12-19 at 11 29 53 am

Description

As you can see from the image above, the CSS icons are no longer working. From #556 I gather it's due to my workspace settings where I specify the following file association:

"files.associations": {
    "*.css": "postcss"
},

Obviously I assume there's no icon for postcss, however before the latest update to 4.2.0, it would properly fall back to the CSS icon. Now it simply shows the non-associated file icon.

Expected functionality

If I associate my files with something else that doesn't have an icon, it should fall back to the default for that file extension.

@JonathanWolfe
Copy link
Contributor

JonathanWolfe commented Dec 19, 2016

There is an icon for PostCSS (icon here).

This makes me think there's something disconnecting languageIDs and forced file associations.

@JimiC
Copy link
Member

JimiC commented Dec 19, 2016

@JonathanWolfe That icon is associated with .pcss extension.

@robertohuertasm
Copy link
Member

Hi both of you. Icons can only be linked to languages via language services. VSCode provides a few out of the box but you can add others via extension (that was your case @JonathanWolfe).

With the latest release we tried to leverage the power of languages in order to allow users further customization. Before that, we only used direct icon extension association so the user never had the opportunity to choose anything else. We decided that .css extension had this icon and end of the discussion.

@jbw91, fallback functionality cannot be accomplished with the current vscode api but we're working in a series of enhancements that will allow user customization. Stay tuned.

For the moment, our only option is make the changes to support postcss language id. Are you using this extension?

@johnbwoodruff
Copy link
Author

@robertohuertasm Yes, I am using the PostCSS extension.

@robertohuertasm
Copy link
Member

Ok @jbw91, we'll provide a language association for you as soon as possible.

@JimiC
Copy link
Member

JimiC commented Dec 21, 2016

@robertohuertasm

Working on this I stumbled upon the following behavior:
Using { icon: 'postcss', extensions: [], languages: [languages.postcss] }, if .pcss and .postcss are present or .css files have been associated with PostCSS, and the user has not installed the PostCSS syntax extension, the files have the default icon.
Upon installing the extension the postcss icon is displayed on all of them.

Is this the expected behavior?

@robertohuertasm
Copy link
Member

Yes it is. If .css was still using a file extension matching then it will work as expected. But as now it's also using language matching this is how the current API is working.

@megalofauna
Copy link

postcss-icon-bug

I installed the postcss language syntax extension and am wondering why the PostCSS icon isn't showing up in the Exlorer pane.

New to VS Code. Not sure if my issue is related to this older issue, but didn't want to post a dup.

As you can see from my screenshot, I've attempted to fix the issue by associating .pcss files with 'postcss'. No luck.

Suggestions?

@jens1o
Copy link
Member

jens1o commented Mar 12, 2018

@megalofauna You're not using vscode-icons but the default theme, perhaps you want to install it?

@JimiC
Copy link
Member

JimiC commented Mar 12, 2018

@jens1o It has already been addressed in another issue the user opened.

@jens1o
Copy link
Member

jens1o commented Mar 12, 2018

@JimiC Pardon me, didn't saw the relationship :/

@megalofauna
Copy link

Sorry for the confusion on my end, folks. As @JimiC noted, my issue is resolved. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants