Created
March 15, 2020 23:45
-
-
Save onionmk2/dd1167f55c0d7472f0455ef416e7ff34 to your computer and use it in GitHub Desktop.
stylus for twitter
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
/* begin------------幅を広げる------------*/ | |
/* デフォのcssがmax-width: 600px; のような値を入れてくるせいで無駄に狭い。デフォのcssを殺して最大化。 */ | |
[data-testid="primaryColumn"] { | |
max-width: -webkit-fill-available; | |
} | |
/* URLが https://twitter.com/home なら子セレクタ(>)だけに限定できる。 | |
しかし それ以外のURLでは、 子孫セレクタで一括指定する以外修正できないので、やむなく子孫セレクタを使用。*/ | |
[data-testid="primaryColumn"] div { | |
max-width: -webkit-fill-available; | |
} | |
/* [data-testid="primaryColumn"] div に max-width: -webkit-fill-available;を指定した副作用で | |
メディアを含むツイートが大きく表示されすぎるようになる。 | |
ツイート1個1個の高さを最大500pxぐらいに制限すると、「文字は全部よめる」「画像はプレビューできる」くらいの | |
良い感じの大きさになる。*/ | |
[data-testid="primaryColumn"] article[role="article"] { | |
max-height: 500px; | |
} | |
/* end------------幅を広げる------------*/ | |
/* begin------------トレンド・おすすめユーザーの列を消す------------*/ | |
/* 検索も消える、がアドレスバーで検索すれば問題ないので気にしない。 */ | |
[data-testid="sidebarColumn"] { | |
display: none; | |
} | |
/* end------------トレンド・おすすめユーザーの列を消す------------*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment