-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwitter-reading-dark.user.css
More file actions
206 lines (181 loc) · 5.24 KB
/
Copy pathtwitter-reading-dark.user.css
File metadata and controls
206 lines (181 loc) · 5.24 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
/* ==UserStyle==
@name Twitter Reading Dark
@namespace suienzan
@version 1.1.2
@updateURL https://userstyles.world/api/style/719.user.css
@description A dark twitter theme for reading only. Need :has() support. Seeing https://developer.mozilla.org/en-US/docs/Web/CSS/:has#browser_compatibility.
@author Midori <suienzan@gmail.com>
@preprocessor stylus
@var select theme "Theme" ["0:Default*", "1:IM@S Light", "2:IM@S Dark"]
@var checkbox noLike "Hide like button" 0
@var checkbox noNav "Hide nav in timeline" 0
@var checkbox noPost "Hide What’s happening" 1
==/UserStyle== */
@-moz-document regexp('^https:\/\/(.*\.)?(twitter|x).com\/?.*') {
/** IM@S Light **/
if theme==1 {
:root {
--color-custom-background: #fbfafa;
--color-custom-background-alpha: #fbfafabf;
--color-custom-background-accent: #ebe1ff;
--color-custom-background-accent-alpha: #ebe1ff66;
}
}
/** IM@S Dark **/
else if theme==2 {
:root {
--color-custom-background: #3f3538;
--color-custom-background-alpha: #3f3538bf;
--color-custom-background-accent: #515558;
--color-custom-background-accent-alpha: #51555866;
}
}
/** Default **/
else {
:root {
--color-custom-background: #333435;
--color-custom-background-alpha: #333435bf;
--color-custom-background-accent: #444648;
--color-custom-background-accent-alpha: #44464866;
}
}
/** color **/
/* main background */
body,
#RemoveThisLineIfWontBreak,
/* primaryColumn */
/* light */
:not([role='radiogroup'])>.r-14lw9ot,
/* dark */
:not([role='radiogroup'])>.r-kemksi,
/* Chat & Grok buttons */
[data-testid="chat-drawer-main"]>.bg-background,
/* buttons in /i/grok */
[data-testid='primaryColumn'] button.r-rs99b7:has(svg+.r-4qtqp9):not(.r-wamsre),
/* button in /explore > 'For you' tab */
.r-loe9s5 {
background-color: var(--color-custom-background) !important;
}
/* empty line use as border in /compose/tweet */
.r-kuekak,
/* timeline in /:name/status/:id */
.r-hjejmn,
/* highlight background in menu */
/* light */
.r-x572qd,
/* dark */
.r-g2wdr4,
/* buttons:hover in /i/grok */
[data-testid='primaryColumn'] button.r-wamsre {
background-color: var(--color-custom-background-accent);
}
/* blurred background in top nav */
/* light */
.r-6026j,
/* dark */
.r-5zmot {
background-color: var(--color-custom-background-alpha);
}
/* dialog overlay */
.r-11z020y {
background-color: var(--color-custom-background-accent-alpha);
}
/** border color **/
/* vertical */
/* light */
.r-jxzhtn,
/* dark */
.r-1kqtdi0,
/* horizontal */
/* light */
.r-j5o65s,
/* dark */
.r-1igl3o0,
/* unfocused search bar in /explore */
.r-1roi411,
/* card, media & etc... */
.r-1ets6dv,
/* border of grok & chat button */
.r-1xsrhxi,
/* border in /:name/status/:id */
.r-2sztyj {
border-color: var(--color-custom-background-accent);
}
/* border under What’s happening, indeed 1px height box */
.r-109y4c4 {
background-color: var(--color-custom-background-accent);
}
/* buttons in /i/grok */
[data-testid='primaryColumn'] button.r-rs99b7:has(svg + .r-4qtqp9),
[data-testid='primaryColumn'] button:has(svg + .r-4qtqp9)>.r-rs99b7 {
border-color: var(--color-custom-background-accent) !important;
}
/* profile photo */
.r-hjejmn.r-1udh08x {
background-color: transparent;
}
[class='css-1dbjc4n r-hjejmn'] {
background-color: transparent;
}
/** fix **/
/* remove padding under 'Post your reply' */
.r-1h8ys4a.r-1mmae3n {
padding-bottom: 0;
}
/** hide annoying **/
/* Sidebar */
[data-testid='sidebarColumn'],
/* inline prompt */
[data-testid='cellInnerDiv']:has([data-testid='inlinePrompt']),
/* Spaces promotion in mobile view */
[data-testid='TopNavBar']+ :has([data-testid='placementTracking']) {
display: none;
}
/* Who to follow & etc... */
/* in desktop home page */
[data-testid='primaryColumn']:has([data-testid='tweetButtonInline']),
/* in mobile home page */
body:has([data-testid='TopNavBar']):has([href='/home/pinned/edit']) [data-testid='primaryColumn'],
/* in user profile page */
[data-testid='primaryColumn']:has([data-testid='UserName']) {
/* title */
[data-testid='cellInnerDiv']:has(h2[role='heading']),
/* Who to follow content */
[data-testid='cellInnerDiv']:has([data-testid='UserCell']),
/* Show more */
[data-testid='cellInnerDiv']:has(a[href*='/i/connect_people']) {
display: none;
}
}
/* Like button */
if noLike {
[data-testid='like'][role='button'],
:has(> [data-testid='like'][role='button']) {
display: none;
}
}
/* Hide What’s happening */
if noPost {
.r-109y4c4 {
display: none;
}
[data-testid='primaryColumn']>[tabindex='0']> :has([d*='M6 5c-1.1 0-2']) {
display: none;
}
}
/* nav in timeline */
if noNav {
.r-1e5uvyk nav:not(:has(a)) {
display: none;
}
/* mobile view */
body:has([data-testid='TopNavBar']) {
[data-testid='TopNavBar'] nav[role='navigation'] {
display: none;
}
header>div:empty {
height: 53px !important;
}
}
}
}