1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Qiitaの下書き一覧で二重スクロールバーを防ぐためのCSS

Last updated at Posted at 2018-12-22

現状

  • 現状ではスクール可能な要素が入れ子になっているため,下の画像のようにスクロールバーが二重になっています
  • これだとサクッとプレビューを見たいときに,最下端を表示するためのスクロール操作がスムーズにできず,何となくストレスです.
  • また,プレビューの最下端が画面下部にくっついてしまっているのも,何となく歯がゆい感じがします
    image.png

改善案

インスペクタ―を見たところ,要素のサイズが固定になっていることが問題のようです

css
.draftItems{
    height: 850px;
}
.draftsPreviewContent{
    max-height: 785px;
}

を次のように書き換えるといい感じになりました.

css
.draftItems{
    height: 100%;
}
.draftsPreviewContent{
    max-height: calc(100vh - 17rem)
}

image.png

同じように気持ち悪いなあと思っていた人は,これでやり過ごしてください

尚,サイトごとにスタイルシートをあてる方法としては以下が参考になるかもしれません

追記

2019/07/21現在,Firefox 68.0.1で確認したところ,スクロールバーが二重になる問題が修正されていそうなことを確認しました

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?