Quantcast
Channel: CSSタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8945

VSCode で `.css` ファイルを PostCSS として読み込ませる

$
0
0

こちらの stackoverflow に答えがありますが、あまり日本語の記事が見当たらないので残しておきます。
https://stackoverflow.com/questions/49981905/how-to-parse-css-files-as-postcss-in-vscode

1. VSCode の設定から "files.associations"を追加する

VSCode の Settings の Preferences から、設定用の json ファイルを開きます。

そしてそこに以下を追記します。

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

2. PostCSS の言語サポートプラグインをインストールする

1番だけだと、.cssファイルがただのテキストファイルのような表示で読み込まれてしまいます。

なので、PostCSS の言語サポートプラグインをインストールすることで、PostCSS用の表示を可能にします。

https://marketplace.visualstudio.com/items?itemName=cpylua.language-postcss


Viewing all articles
Browse latest Browse all 8945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>