Skip to content

Instantly share code, notes, and snippets.

@hiko-p
Last active May 24, 2025 14:18
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 NF',"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="/jobs"],
[role="navigation"] a[href="/i/premium_sign_up"],
[role="navigation"] a[href="/i/verified-orgs-signup"]{
display: none;
}
/* 「もっと見る」配下の収益化、広告のナビゲーションリンクを非表示 */
[data-testid="Dropdown"] a[href="/i/monetization"],
[data-testid="Dropdown"] a[href="https://ads.x.com/?ref=gl-tw-tw-twitter-ads-rweb"]{
display: none;
}
.r-184id4b{
margin-bottom: 0;
margin-top: 0;
}
.r-2yi16{
min-height: 0;
}
.r-1qi8awa{
min-width: 0;
}
.r-o96wvk{
width: 100%;
}
.css-175oi2r.r-lrvibr.r-1g40b8q.r-obd0qt.r-16y2uox,
.css-175oi2r.r-184id4b,
.css-175oi2r.r-e7q0ms.r-12kyg2d{
/* 左メニュー各パーツ(ロゴ・メニュー・ポストボタン・アカウントメニュー)の幅 */
min-width: 300px;
max-width: 300px;
}
.r-64el8z{
/* ロゴ・Postボタン領域 */
min-width: 280px;
max-width: 280px;
margin-left: 10px;
}
.r-is05cd{
padding-left: 0;
padding-right: 0;
}
.r-pt392{
margin-left: 0;
}
.css-175oi2r.r-obd0qt.r-16y2uox{
/* アカウント追加・ログアウトメニュー */
align-items: unset;
}
/*--------------------------------------
中央コンテンツ
--------------------------------------*/
/* 投稿フォーム */
.r-1h8ys4a.css-175oi2r > div.css-175oi2r > .css-175oi2r > .r-3pj75a.css-175oi2r{
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-175oi2r.r-1pi2tsx.r-1ny4l3l.r-1loqt21,
.css-175oi2r.r-1kqtdi0.r-1phboty.r-rs99b7.r-1867qdf.r-1udh08x.r-o7ynqc.r-6416eg.r-1ny4l3l,
.css-175oi2r.r-14gqq1x{
/* 画像・動画領域の最大高 */
max-height: 800px;
}
div[data-testid^="tweetPhoto"]{
/* 1枚の画像・動画の最大高 */
max-height: 800px;
}
.css-175oi2r.r-zl2h9q.r-1iusvr4.r-16y2uox.r-18u37iz,
.css-175oi2r.r-1iusvr4.r-16y2uox.r-18u37iz{
/* 4分割の場合の上段、下段 (画像・動画領域全体の半分) */
max-height: 400px;
}
/*--------------------------------------
--------------------------------------*/
/* 右メニュー全般 */
.r-1hycxz,
.r-1loqt21.r-1ny4l3l.r-184en5c.r-1f1sjgu.r-ymttw5.r-18u37iz.r-kemksi.css-175oi2r{
display: none;
}
/* Grokボタン */
.r-5wli1b.r-bnwqim.r-1jte41z.r-hvns9x.r-1rtiivn.r-6gpygo.r-173mn98.css-175oi2r{
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment