Repository navigation
Expand file tree
/
Copy pathdesktop.css
More file actions
159 lines (139 loc) · 6.33 KB
/
Copy pathdesktop.css
File metadata and controls
159 lines (139 loc) · 6.33 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
/**
* @name Visual Refresh Compact Title Bar
* @author Wolfÿ
* @version 1.2.0-Alpha
* @description A Discord theme to compact the new visual refresh title bar
* @invite avia
* @source https://github.com/MEWPASCO/visual-refresh-compact-title-bar-fork
* @website https://www.avariaxyz.win/
*/
/*
* Fork of https://github.com/chloecinders/visual-refresh-compact-title-bar
* with personal customizations. Credit for the original theme goes to its creator(s).
*/
/*
* === Class names ===
* Discord appends a build hash to its class names, and on 2026-11-10 the format
* changed (chat_f75fb0 -> chat_z_gUBg). Nothing below contains a hash any more.
*
* :is([class^="x_"], [class*=" x_"]) a class that is exactly "x" + hash
* (so "bar_" does not match "toolbar_")
* [class*="x_"] a name distinctive enough to match as is
*
* checked = confirmed against a DOM dump of 2026-11-10
* unchecked = name carried over from the old client; if it stops matching, the
* part that depends on it silently does nothing
*
* Structure that changed in the same update: the chat is no longer a direct
* child of the page. It is page > div > chat, so "page > chat" became
* "page > div > chat".
*/
.visual-refresh {
/* === VARIABLES === */
--vr-header-snippet-top: 0px;
--vr-header-snippet-server-padding: 0px;
--vr-header-snippet-space: 300px;
--vr-header-snippet-button-padding: 0;
--vr-top-spacing: 20px;
/* === CHAT PADDING ADJUSTMENT === */
/* checked: div.chat_z_gUBg, div.subtitleContainer_z_gUBg, main.chatContent_z_gUBg
(a <section> in a call), div.chatLayerWrapper_FrbQJp. The header is the
<section> that holds div.upperContainer_ (section.container_ybUK7Z). */
div:is([class^="chat_"], [class*=" chat_"]),
div:is([class^="subtitleContainer_"], [class*=" subtitleContainer_"]),
[class*="chatContent_"],
div[class*="chatLayerWrapper_"] {
& section:has(> [class*="upperContainer_"]) {
padding-right: var(--vr-header-snippet-space);
}
}
/* === PAGE ANCHOR SETUP === */
/* checked: div.page_pog62O > div > div.chat_z_gUBg */
div:is([class^="page_"], [class*=" page_"]) {
&:not(:has(> div > div:is([class^="chat_"], [class*=" chat_"]))) {
anchor-name: --vr-header-snippet;
}
& > div > div:is([class^="chat_"], [class*=" chat_"]) {
anchor-name: --vr-header-snippet;
}
}
/* === BASE STRUCTURE ADJUSTMENTS === */
/* checked: div.base_pog62O holds div.content_pog62O. unchecked: that the top
bar and the notice are still its direct children. */
div:is([class^="base_"], [class*=" base_"]) {
grid-template-rows: [top] var(--vr-top-spacing) [titleBarEnd] min-content [noticeEnd] 1fr [contentEnd] min-content [end];
/* If update icon exists (like a Discord client update available) */
&:has(div:is([class^="bar_"], [class*=" bar_"]) > div[class*="trailing_"] [class*="updateIconForeground_"]) {
& div:is([class^="chat_"], [class*=" chat_"]),
& div:is([class^="subtitleContainer_"], [class*=" subtitleContainer_"]),
& [class*="chatContent_"],
& div[class*="chatLayerWrapper_"] {
& section:has(> [class*="upperContainer_"]) {
padding-right: calc(var(--vr-header-snippet-space) + 50px);
}
}
& [class*="videoControls_"] [class*="topControls_"] [class*="toolbar_"] {
margin-right: calc(var(--vr-header-snippet-space) + 30px) !important;
}
}
/* Content Layer */
& > div:is([class^="content_"], [class*=" content_"]) {
z-index: 0;
}
/* Top Title Bar */
& > div:is([class^="bar_"], [class*=" bar_"]) {
position: absolute;
position-anchor: --vr-header-snippet;
top: var(--vr-header-snippet-top);
right: anchor(right);
width: anchor-size(width);
padding: 0 var(--vr-header-snippet-button-padding) 0 0;
& > :is([class^="title_"], [class*=" title_"]) {
display: none;
}
/* Trailing Buttons Styling (Inbox, Help) */
& > div[class*="trailing_"] {
background: none;
border: none;
height: var(--custom-channel-header-height);
top: var(--vr-top-spacing);
}
}
/* Adjust Top Bar when Notice Appears */
&:has(> :is([class^="notice_"], [class*=" notice_"])) {
& > div:is([class^="bar_"], [class*=" bar_"]) {
top: anchor(top);
}
}
/* Lower z-index if thread sidebar is open */
&:has([class*="threadSidebarOpen_"][class*="threadSidebarFloating_"]) > :is([class^="bar_"], [class*=" bar_"]) {
z-index: 0;
}
}
/* === FALLBACKS === */
/* If no chat exists (e.g., friends tab), adjust title bar positioning.
Checked on div.base only, instead of on every element in the page. */
div:is([class^="base_"], [class*=" base_"]):not(:has(div:is([class^="page_"], [class*=" page_"]) > div > div:is([class^="chat_"], [class*=" chat_"]))) > div:is([class^="bar_"], [class*=" bar_"]) {
right: 0 !important;
}
/* Adjust server list top margin (unchecked) */
ul[data-list-id="guildsnav"] > [class*="itemsContainer_"] > :is([class^="stack_"], [class*=" stack_"]) {
margin-top: var(--vr-header-snippet-server-padding);
}
/* Disable drag on toolbar/video controls/topic (unchecked) */
& [class*="videoControls_"] [class*="topControls_"],
section:has(> [class*="upperContainer_"]) [class*="toolbar_"],
div:is([class^="topic_"], [class*=" topic_"]) {
-webkit-app-region: no-drag;
}
/* Move search bar to fit new layout (unchecked). Limited to the chat header:
the DM list has its own div.searchBar_u88IQl that must not move. */
section:has(> [class*="upperContainer_"]) [class*="searchBar_"] {
position: relative;
right: var(--vr-header-snippet-space);
}
/* === UPDATE: Fix top bar size when notice appears === */
div:is([class^="base_"], [class*=" base_"]):has(> :is([class^="notice_"], [class*=" notice_"])) {
--vr-top-spacing: 0px !important;
}
}