43081j / 43081j/postcss-lit

Support for `/*css*/` flags

オープン 初心者向け
#55 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
90
フォーク
9
平均マージ
1日 9分
マージ済み PR(30日)
3

説明

Thanks for all the work on this! We just added it to our project and it's working great so far.

There are some situations where we use Lit-style templates without using the actual `lit` template function, like when we're really concerned about performance and don't expect to need to reevaluate the template. For example:

```ts
const mycss = /*css*/`
div {
color: red;
}
`;
```

There are several VSCode plugins that provide syntax highlighting for this syntax ([example](https://marketplace.visualstudio.com/items?itemName=pushqrdx.inline-html)). However to my knowledge there isn't yet a Postcss custom syntax defined for this.

Since the syntax is almost exactly the same, it would be great if this custom syntax supported `/*css*/` as well as `css`. It may be technically outside the scope of a plugin intended for Lit, but there is surely a lot of overlap between the groups that use `/*css*/` and `css`, and it should be a trivial amount of work.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Look at the existing syntax parsing logic in the source code, likely in a file like src/syntax.js or similar. Identify where the 'css' tag is recognized and add support for the '/*css*/' comment flag. Test by running the project's test suite to ensure both syntaxes are handled correctly.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
tooling
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。