csstools / csstools/postcss-plugins
CSS Values lvl 5, standard if() syntax
- 主要言語
- CSS
- スター
- 1.1k
- フォーク
- 83
- 平均マージ
- 10時間 16分
- マージ済み PR(30日)
- 16
説明
### What would you want to propose?
Spec: https://drafts.csswg.org/css-values-5/#if-notation
This is the draft for a standard conditional selector.
There is a plugin that does similar thing called postcss-conditional-values, it could either be modified to support new experimental syntax, or a new plugin could be made partly based on it.
Would be nice to have a polyfill for this in the future with the standard syntax.
### Suggested solution
Spec allows media queries, and overall it is differs from postcss-conditional-values in a number of ways, so a new plugin is probably better.
Spec allows stuff like this:
```css
.valid-if {
--if-clause: media(width >= 600px): blue;
color: if(...var(--if-clause); else: green;);
}
```
I don't think is something that can be polyfilled
### Additional context
Overall this is more of a different syntax for queries, and doesn't replace postcss-conditional-values.
This request is related to https://github.com/csstools/postcss-plugins/issues/134 for some part.
### Validations
- [x] Follow our [Code of Conduct](https://github.com/csstools/postcss-plugins/blob/master/CODE_OF_CONDUCT.md)
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
### Would you like to open a PR for this feature?
- [ ] I'm willing to open a PR
コントリビューションガイド
調査の方向性
まず CSS Values Level 5 の if() 記法の仕様を読み、既存の postcss-conditional-values plugin と比較してください。この issue では、ファイル、テスト、定義済みの実装範囲が指定されていません。完了とするには、新しい plugin が標準構文の有用なサブセットをサポートできるかどうか、およびその範囲をどのように検証すべきかについて合意する必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- css
- 領域
- frontend, web-dev
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100