Skip to content

Instantly share code, notes, and snippets.

@hiko-p
Last active August 14, 2026 11:04
Show Gist options
  • Select an option

  • Save hiko-p/f2cf9746163a32400f354f4384a283e9 to your computer and use it in GitHub Desktop.

Select an option

Save hiko-p/f2cf9746163a32400f354f4384a283e9 to your computer and use it in GitHub Desktop.
Twitterのタイムラインをできるだけ広げて表示するカスタムCSS。いくつか要素非表示もしてます。
/*--------------------------------------
フォント
--------------------------------------*/
.r-1k78y06,
.r-1qd0xha,
.r-1tl8opc,
.r-fm7h5w,
.errorContainer{
font-family: 'Moralerspace Argon JPDOC',"Segoe UI",Meiryo,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}
/*--------------------------------------
配色
--------------------------------------*/
/* 左右の背景 */
html,header,main{
background-color: rgba(38,38,38,1) !important;
}
/* TL背景 */
.r-kemksi{
background-color: rgba(47,47,47,1);
}
/* TLヘッダー */
.r-5zmot{
background-color: rgba(47,47,47,0.6);
}
/* ボーダー */
.r-1kqtdi0{
border-color: rgba(66,66,66,1);
}
.r-1igl3o0{
border-bottom-color: rgba(111,111,111,1);
}
/*--------------------------------------
左メニュー
--------------------------------------*/
/* Grok、クリエイタースタジオ、プレミアムのナビゲーションリンクを非表示 */
[role="navigation"] a[href="/i/grok"],
[role="navigation"] a[href="/i/jf/creators/studio"],
[role="navigation"] a[href="/i/premium_sign_up"] {
display: none;
}
/* 「もっと見る」配下のビジネス、広告のナビゲーションリンクを非表示 */
[data-testid="Dropdown"] a[href="/i/verified-orgs-signup"],
[data-testid="Dropdown"] a[href="https://ads.x.com/?ref=gl-tw-tw-twitter-ads-rweb"]{
display: none;
}
header{
max-width: 300px;
}
/*--------------------------------------
中央コンテンツ
--------------------------------------*/
/* 投稿フォーム */
.r-1ye8kvj.r-13qz1uu.r-f8sm7e.r-1lg4w6u.r-1abdc3e.r-184en5c.r-16y2uox.r-1phboty.r-th6na.r-1ua6aaf.r-1kqtdi0.r-kemksi.css-g5y9jx > .css-g5y9jx > .r-184en5c.r-kemksi.css-g5y9jx{
display: none;
}
/* コンテンツの幅 */
div[data-testid^="primaryColumn"]{
max-width: 100%;
}
.r-113js5t{
width: 100%;
}
.r-1ye8kvj,
.r-htvplk{
max-width: 100%;
}
/* フォントサイズと行間 */
.r-a023e6,
.r-1i10wst{
font-size: 18px;
}
.r-rjixqe,
.r-135wba7{
line-height: 28px;
}
/* 引用内画像 */
.css-g5y9jx.r-14gqq1x .css-g5y9jx.r-1awozwy .css-g5y9jx.r-o7ynqc.r-6416eg.r-1ny4l3l{
width: 100%;
}
/* 画像 */
.css-g5y9jx.r-1pi2tsx.r-1ny4l3l.r-1loqt21{
max-width: 100%;
max-height: calc(100vh - 90px);
width: calc((100vh - 90px) * 16 / 3);
object-fit: contain;
}
.css-g5y9jx.r-1w2pmg{
padding-bottom: 800px !important;
}
/* 動画 */
.css-g5y9jx.r-1adg3ll.r-1udh08x{
max-height: calc(100vh - 90px);
}
.r-1p0dtai.r-1pi2tsx.r-1d2f490.r-u8s1d.r-ipm5af.r-13qz1uu{
max-width: 100%;
max-height: calc(100vh - 90px);
width: calc((100vh - 90px) * 16 / 3);
object-fit: contain;
}
.css-g5y9jx.r-sdzlij.r-1phboty.r-rs99b7.r-lrvibr.r-2yi16.r-1qi8awa.r-3pj75a.r-1loqt21.r-o7ynqc.r-6416eg.r-1ny4l3l{
/* もう一度見るボタン */
width: fit-content;
}
.css-g5y9jx.r-sdzlij.r-1phboty.r-rs99b7.r-lrvibr.r-2yi16.r-1qi8awa.r-1loqt21.r-o7ynqc.r-6416eg.r-1ny4l3l{
/* プレイヤー下部の一時停止ボタン・リプレイボタン */
width: fit-content;
}
/*--------------------------------------
--------------------------------------*/
/* 右メニュー全般 */
.r-1hycxz,
.r-1loqt21.r-1ny4l3l.r-184en5c.r-1f1sjgu.r-ymttw5.r-18u37iz.r-kemksi.css-175oi2r{
display: none;
}
/* Grokボタン、tweetボタン */
.r-bnwqim.r-1va2g9v.r-6gpygo.r-173mn98.r-633pao.css-g5y9jx{
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment