Merged
Conversation
Chrome 121+ は @supports (scrollbar-color: auto) に入るため scrollbar-width: thin が適用され、スクロールバーが約8pxに縮小していた。auto に変更してブラウザデフォルト (約15px)を維持する。 また、はてなブログの table { margin-bottom: 1em } が .gce-table にも適用され、 スクロール領域内の末尾に余白が生じていた。margin: 0 を明示して外部CSSを打ち消す。
はてなブログ対応のバグ修正(テーブル末尾余白)が退行しないよう保護する。
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.
概要
はてなブログにスクリプトを埋め込んだ際に発生する2つのスタイル問題を修正。
問題と修正
問題1: スクロールバーの幅が小さい
Chrome 121+ は
@supports (scrollbar-color: auto)ブロックに入るためscrollbar-width: thin(約8px)が適用され、ドラッグしにくい状態になっていた。scrollbar-width: autoに変更してブラウザデフォルト幅(約15px)を維持する。問題2: 最終行と外枠の余白
はてなブログのグローバル CSS が
table要素にmargin-bottom: 1em等を付与しており、.gce-tableにも適用されてスクロール領域内の末尾に余白が生じていた。.gce-container .gce-tableにmargin: 0を明示して外部 CSS を打ち消す。変更ファイル
src/styles.tsscrollbar-width: thin→auto、.gce-tableにmargin: 0追加test/styles.test.tsmargin: 0を検証するテストケース追加テスト
npm test: 100 tests passednpm run build: 成功