Skip to content

fix: align iOS 27 glass button and FAB pressed appearance - #141

Merged
rdlabo merged 3 commits into
mainfrom
fix/ios27-glass-button-pressed-state
Sep 10, 2026
Merged

fix: align iOS 27 glass button and FAB pressed appearance#141
rdlabo merged 3 commits into
mainfrom
fix/ios27-glass-button-pressed-state

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fix the black-looking glass FAB background and align the pressed appearance of ion-button and ion-fab-button with the iOS 27 reference. Both use shared icon-button scale values and pressed glass styling; pressing the back button now fades its glyph without fading the entire glass surface.

Preserve the translucent fill, reduce the FAB's outer shadow, and reinforce the pressed contour with lighter top/bottom borders and darker sides. Keep dark-mode pressed styling applied to both components.

Validation:

  • npm run build, Prettier checks for all five changed SCSS files, and git diff --check passed.
  • Compared native iOS 27 and Capacitor/WKWebView screenshots at 3× resolution. For the 44pt back-button reference, the final contour adjustment reduced mean absolute RGB error in the fixed rim region from 6.806 to 5.938; shadow-region error changed from 1.199 to 1.167. Curve rasterization differences remain.
  • Checked button/FAB pressed styles in the demo, including dark mode. FAB scaling shares the reference-derived values; separate native FAB-size pixel equivalence is not established.

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment on lines +7 to +9
&::part(native) {
@include api.glass-background-button-activated-dark($include-background: false);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 ダークモードで押下中のFABが拡大されない

ダークテーマでは、このmixinが後からtransform: translateZ(0)を出力し、通常テーマのscaleを上書きします。そのため、FABの押下時だけ拡大しません。

Learn more

glass-background-button-activated-dark は背景や枠線だけでなく、transform: translateZ(0) も生成します。このルールは通常テーマの 押下時scale と同じ要素、同じ詳細度に適用され、ダークテーマ側が後勝ちします。結果として背景は切り替わりますが、scale成分が失われます。

Example: 通常サイズのFABをダークモードで押すと、通常テーマが設定した scale(1.38) translateZ(0)translateZ(0) に置換されます。ライトモードでは1.38倍に拡大しますが、ダークモードでは等倍のままです。

Recommended fix: ダーク用mixinからtransformを分離するか、FAB向け呼び出しではtransformを生成しないオプションを追加してください。あるいは、ダーク側でsmall/default/largeそれぞれのscaleを保持したtransformを再指定してください。

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +346 to +350
&::part(native) {
@include api.glass-background-button-activated;
opacity: 1;
color: var(--color);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 システム設定のダークモードで押下ボタンがライト配色になる

通常テーマの押下ルールはダーク側より詳細度が高く、新しい背景色、枠線、影を上書きさせません。system版とalways版では、押下ボタンがライト用ガラス配色になります。

Learn more

通常テーマのセレクターには .ios があり、クラス相当の詳細度がダーク側より1つ高くなります。そのため、後から読み込まれる ダーク用mixinbackground-color、border、box-shadowでも、この追加ルールを上書きできません。.ion-palette-darkで囲むclass版は親クラスで詳細度が増えますが、system版とalways版にはその親がありません。

Example: ionic-theme-ios26.scssionic-theme-ios26-dark-system.scss を読み込み、OSをダーク設定にしてdefault fillのボタンを押します。ダーク側はselected色の56%背景を指定しますが、通常側のglass背景96%と通常側の輪郭・影が勝ちます。

Recommended fix: system版とalways版でもダーク側のセレクターが通常側以上の詳細度になるよう、theme-dark-buttonの対象に同じ.ios条件を追加してください。FABのように同一要素へ競合するプロパティについては、生成CSSの詳細度と読み込み順の両方を確認してください。

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  90 passed

Details

stats  90 tests across 2 suites
duration  1 minute, 50 seconds
commit  56d1ebc
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

github-actions Bot added a commit that referenced this pull request Sep 10, 2026
github-actions Bot added a commit that referenced this pull request Sep 10, 2026
github-actions Bot added a commit that referenced this pull request Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios26/pr-141/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

@rdlabo

rdlabo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo
rdlabo merged commit 99b0871 into main Sep 10, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

CI passed for the merge commit 99b0871f770b. Install the immutable version with:

npm install @rdlabo/ionic-theme-ios26@9.1.0-beta.pr141.sha99b0871f770b

github-actions Bot added a commit that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant