ionic-team / ionic-team/ionic-framework

feat: refresher should have global css variable to control background

オープン
#25,780 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
package: core type: feature request
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

説明

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

- [ ] v4.x
- [ ] v5.x
- [X] v6.x
- [ ] Nightly

### Current Behavior

Looks bad. 🤮 👎
![refresher-current](https://user-images.githubusercontent.com/60390085/185416186-2af00991-9825-4c02-94ee-0580633c62ce.gif)
(GIF colors are not accurate. In real it looks a bit uglier.)

### Expected Behavior

Look good. 😎 👍
![refresher-expected](https://user-images.githubusercontent.com/60390085/185416208-54890f73-70ba-4cef-bb71-3c73124e1114.gif)

### Steps to Reproduce

The refresher background and border should use either the same colors from item or card like `--ion-card-background` and `--ion-border-color` instead of `--ion-color-step-250` and `--ion-color-step-200`.

The current colors looks ugly if you define all color-step variable for light and dark mode. There are also other issues in Ionic with color-step in light mode. I guess this is only tested for dark mode. But in this case, it looks weird in both themes.

My current workaround:

```css
ion-refresher {
--ion-color-step-250: var(--ion-card-background);
--ion-color-step-200: var(--ion-border-color);
}
```

### Code Reproduction URL

https://codepen.io/infacto/pen/QWmzBez

### Ionic Info

`@ionic/angular: 6.1.8` (ionic info not available, ionic CLI not in use for my monorepo.)

### Additional Information

https://ionicframework.com/docs/api/refresher

https://github.com/ionic-team/ionic-framework/blob/436a8ce50847d26f8fb63ce64ea85be6f5c0bc8e/core/src/components/refresher/refresher.md.vars.scss#L12-L16

You can see e.g. the fallback `#ffffff` (white) of `--ion-color-step-250` which is gray, if set.

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

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

調査の方向性

Start with core/src/components/refresher/refresher.md.vars.scss, especially lines 12-16, and compare the behavior in the linked CodePen reproduction. Trace how the refresher background and border currently use the color-step variables. Done means the refresher exposes a global CSS variable for controlling these colors and its light and dark themes no longer produce the reported appearance.

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

評価

技術スタック
css, typescript
領域
design, frontend
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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