-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.css
More file actions
259 lines (241 loc) · 9.53 KB
/
content.css
File metadata and controls
259 lines (241 loc) · 9.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
/*
* Twitter Float — compact layout styles
*/
/* ── Right sidebar ────────────────────────────────────────────────────────── */
[data-testid="sidebarColumn"] { display: none !important; }
/* ── Left nav ─────────────────────────────────────────────────────────────── */
nav[aria-label="Primary navigation"] a,
nav[aria-label="Primary"] a { padding: 8px !important; }
/* ── Main column ──────────────────────────────────────────────────────────── */
[data-testid="primaryColumn"] { max-width: 100% !important; min-width: 0 !important; }
/* ── Tweet cards ──────────────────────────────────────────────────────────── */
article[data-testid="tweet"] { padding-top: 8px !important; padding-bottom: 8px !important; }
/* ── Hide "Get the app" banners ───────────────────────────────────────────── */
[data-testid="BottomBar"],
[data-testid="AppDownloadCTA"] { display: none !important; }
/* ── Hide promoted tweets (CSS :has — Chrome 105+) ───────────────────────── */
article[data-testid="tweet"]:has([data-testid="promotedIndicator"]) { display: none !important; }
/* ── Hide "Who to Follow" inline suggestions ──────────────────────────────── */
[data-testid="WhoToFollowSection"],
[data-testid="inline_follow_suggestions"] { display: none !important; }
/* ── Compact media mode ───────────────────────────────────────────────────── */
/* Collapsed state: force BOTH height and max-height so that Twitter's inner
aspect-ratio div (which uses padding-bottom: X% relative to parent width)
cannot push the tweet card layout beyond 80px. overflow:hidden clips
the visible content; height:80px !important collapses the layout space. */
html.tf-compact-media [data-testid="tweetPhoto"]:not(.tf-media-expanded),
html.tf-compact-media [data-testid="videoComponent"]:not(.tf-media-expanded),
html.tf-compact-media [data-testid="card.layoutLarge.media"]:not(.tf-media-expanded),
html.tf-compact-media [data-testid="previewInterstitial"]:not(.tf-media-expanded),
html.tf-compact-media .tf-quoted-tweet:not(.tf-media-expanded) {
height: 80px !important;
max-height: 80px !important;
overflow: hidden !important;
cursor: zoom-in;
border-radius: 8px;
position: relative;
border: none !important;
outline: none !important;
box-shadow: none !important;
}
/* Also constrain immediate child wrappers (the padding-bottom aspect-ratio
div, or any position:relative wrapper Twitter adds) so they don't reserve
space beyond the 80px boundary. */
html.tf-compact-media [data-testid="tweetPhoto"]:not(.tf-media-expanded) > *,
html.tf-compact-media [data-testid="videoComponent"]:not(.tf-media-expanded) > *,
html.tf-compact-media [data-testid="card.layoutLarge.media"]:not(.tf-media-expanded) > *,
html.tf-compact-media [data-testid="previewInterstitial"]:not(.tf-media-expanded) > *,
html.tf-compact-media .tf-quoted-tweet:not(.tf-media-expanded) > * {
max-height: 80px !important;
overflow: hidden !important;
border: none !important;
outline: none !important;
box-shadow: none !important;
}
/* Expanded state */
html.tf-compact-media [data-testid="tweetPhoto"].tf-media-expanded,
html.tf-compact-media [data-testid="videoComponent"].tf-media-expanded,
html.tf-compact-media [data-testid="card.layoutLarge.media"].tf-media-expanded,
html.tf-compact-media [data-testid="previewInterstitial"].tf-media-expanded,
html.tf-compact-media .tf-quoted-tweet.tf-media-expanded {
height: auto !important;
max-height: 600px !important;
overflow: hidden !important;
cursor: default;
transition: max-height 0.25s ease;
}
/* Overlay hint so user knows media is collapsed */
html.tf-compact-media [data-testid="tweetPhoto"]:not(.tf-media-expanded)::after,
html.tf-compact-media [data-testid="videoComponent"]:not(.tf-media-expanded)::after,
html.tf-compact-media .tf-quoted-tweet:not(.tf-media-expanded)::after {
content: "tap to expand";
position: absolute;
bottom: 4px;
right: 6px;
font-size: 10px;
color: rgba(255,255,255,0.85);
background: rgba(0,0,0,0.45);
padding: 2px 6px;
border-radius: 9999px;
pointer-events: none;
}
/* ── New content banner ───────────────────────────────────────────────────── */
#tf-new-content-banner {
position: fixed;
top: 56px;
left: 50%;
transform: translateX(-50%);
background: #1d9bf0;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-weight: 700;
font-size: 13px;
padding: 8px 20px;
border-radius: 9999px;
cursor: pointer;
z-index: 99999;
box-shadow: 0 2px 12px rgba(0,0,0,.45);
white-space: nowrap;
transition: transform .15s, box-shadow .15s;
}
#tf-new-content-banner:hover {
transform: translateX(-50%) scale(1.05);
box-shadow: 0 4px 18px rgba(0,0,0,.55);
}
/* ── Auto-scroller bar ────────────────────────────────────────────────────── */
#tf-autoscroller {
position: fixed;
bottom: 14px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 6px;
background: rgba(0,0,0,.82);
border: 1px solid #2f3336;
border-radius: 9999px;
padding: 5px 12px;
z-index: 99999;
backdrop-filter: blur(10px);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 12px;
color: #71767b;
user-select: none;
transition: border-color .2s;
}
#tf-autoscroller.tf-active { border-color: #1d9bf0; }
#tf-autoscroller button {
background: none; border: none; color: #e7e9ea;
cursor: pointer; padding: 2px 4px; font-size: 15px; line-height: 1;
transition: color .15s;
}
#tf-autoscroller button:hover { color: #1d9bf0; }
.tf-speed-label { font-size: 11px; color: #555e67; }
#tf-scroll-speed { width: 64px; height: 4px; accent-color: #1d9bf0; cursor: pointer; }
/* ── Link preview tooltip ─────────────────────────────────────────────────── */
#tf-link-preview {
position: fixed;
display: none;
z-index: 99998;
width: 300px;
background: #16181c;
border: 1px solid #2f3336;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 24px rgba(0,0,0,.6);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
pointer-events: none;
}
#tf-link-preview.tf-loading {
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.tf-preview-loading {
font-size: 12px;
color: #555e67;
}
.tf-pi img {
width: 100%;
max-height: 150px;
object-fit: cover;
display: block;
}
.tf-pb { padding: 10px 12px; }
.tf-pt {
font-size: 13px;
font-weight: 700;
color: #e7e9ea;
margin-bottom: 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tf-pd {
font-size: 12px;
color: #8b98a5;
margin-bottom: 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tf-pu {
font-size: 11px;
color: #555e67;
text-transform: lowercase;
}
/* ── Article View (Unroll Mode) ───────────────────────────────────────────── */
#tf-unroll-btn {
position: fixed;
top: 12px;
right: 12px;
background: rgba(0,0,0,.82);
border: 1px solid #2f3336;
border-radius: 9999px;
padding: 4px 12px;
color: #e7e9ea;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 13px;
font-weight: 600;
cursor: pointer;
z-index: 99999;
backdrop-filter: blur(10px);
transition: all 0.2s;
}
#tf-unroll-btn:hover { border-color: #1d9bf0; color: #1d9bf0; }
#tf-unroll-btn.active { background: #1d9bf0; border-color: #1d9bf0; color: #fff; }
html.tf-article-view article[data-testid="tweet"] {
padding-top: 4px !important;
padding-bottom: 4px !important;
}
html.tf-article-view [data-testid="Tweet-User-Avatar"] {
display: none !important;
}
html.tf-article-view [data-testid="tweet"] [role="group"] {
display: none !important;
}
html.tf-article-view a[href$="/analytics"] {
display: none !important;
}
/* Hide the vertical connecting thread lines */
html.tf-article-view [data-testid="tweet"] div[style*="width: 2px"] {
display: none !important;
}
html.tf-article-view [data-testid="tweetText"] {
font-size: 16px !important;
line-height: 1.5 !important;
}
/* ── OP Highlighting ──────────────────────────────────────────────────────── */
.tf-op-badge {
background: #1d9bf0;
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 1px 4px;
border-radius: 4px;
margin-left: 6px;
vertical-align: text-top;
}