Conversation
ダークモードビルドでスクロールバーがブラウザデフォルト(明るい色)のまま 浮いて見える問題を解消するため、テーマ別カスタムプロパティとスクロールバー CSS ルールを追加した。 - Firefox: scrollbar-color / scrollbar-width で対応 - Chrome/Safari/Edge: ::-webkit-scrollbar 系疑似要素で対応
Chrome 121+ では scrollbar-width が有効な場合 ::-webkit-scrollbar-* が無視されるため、 border-radius: 4px が Chrome では適用されず Safari でのみ効く非対称な挙動になっていた。
- @supports not selector(::-webkit-scrollbar) で Firefox 専用の scrollbar-color / scrollbar-width を排他化(Chrome 121+ で両方書くと ::-webkit-scrollbar-* が無視されるため共存は無意味) - --gce-scrollbar-track を削除し、webkit 側のトラック色を --gce-code-bg から直接参照することで重複変数を除去
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.gce-code-wrapのスクロールバーをテーマカラーに合わせ、ダークモードで浮いて見える問題を解消--gce-scrollbar-thumbカスタムプロパティをライト/ダーク各テーマの:rootに追加(GitHub 公式カラートークン準拠)@supports (scrollbar-color: auto)で Chrome 121+ / Firefox に標準プロパティを適用し、@supports not (scrollbar-color: auto)で Safari 等に webkit 疑似要素をフォールバック適用対応ブラウザ
scrollbar-color+scrollbar-width: thin::-webkit-scrollbar-*疑似要素Test plan
npm test— 全89テストパスnpm run build:all— ライト/ダーク両ビルド成功test-page.htmlでダークビルドを読み込み、スクロールバーの見た目を目視確認