Skip to content

Instantly share code, notes, and snippets.

@elderlabs
Last active April 27, 2025 19:11
Show Gist options
  • Save elderlabs/cae06cd191d997016fb4175098a8dc39 to your computer and use it in GitHub Desktop.
Save elderlabs/cae06cd191d997016fb4175098a8dc39 to your computer and use it in GitHub Desktop.
Restores the old pre-March 2025 Discord Desktop theme in BetterDiscord -- READ THE COMMENT BELOW
/**
* @name Restore Old Client Layout
* @author Your Mother
* @description Restores the pre-March 2025 Discord Desktop UI. Shamelessly stolen from @zrodevkaan in the BD chat. Thanks kaan.
* @version 1
* @source https://gist.github.com/elderlabs/cae06cd191d997016fb4175098a8dc39
*/
module.exports = class discordExperiments {
start() {
try {
BdApi.Webpack.getModule(x=>x.ZP.updatedUnsyncedSettings).ZP.updatedUnsyncedSettings({disableVisualRefresh: 1})
} catch (err) {
return console.log(err);
}
}
stop() {
BdApi.showNotice("Reload Discord to disable 'Restore Old Client Layout'.", {
type: "info",
buttons: [{
label: "Reload",
onClick: () => location.reload()
}]
});
}
}
@elderlabs
Copy link
Author

elderlabs commented Apr 15, 2025

The above no longer works. THANKS DISCORD. I swear the UI team is cross-eyed, as it doesn't appear they're able to line up elements on a page to save their lives -- or more likely, they don't care, never cared, and we the users are not a priority. We the users have no voice. If I ever have the power to to create change at Discord, people are getting fired, and policy is changing. Sadly that day may never come.

As a note to Discord, should someone ever read this, large-scale UI changes are an accessibility concern. This is why end-users are unhappy. You give us no choice, no voice, and minimize the large number of users that suffer each time a large change rolls out. Until you people understand that, you will not find success. You will not find happy users.

Rant aside:

Here's the CSS I've compiled from various sources in the BD guild, including a few of my own, to make the new client easier to live with. If you don't like parts of it, you're free to modify it. If you don't know how, try it. Add and remove bits, sections, and pieces one at a time until you have what you like.

Absolutely no promises this won't break something, work at all, or work long-term considering I have no idea how to grab a specific item's class without affecting other unintended items in the mess that is the Discord client. Chances are, something will break long-term.

I've done my best to ensure my changes here are as theme-agnostic as possible, but /shrug.

A significant portion of this was taken from a message by einthevariance in the BD guild.

/* Hide in-client annoyances */
@import url("https://smolalli.github.io/Themes/Snippets/removechatbuttons.css");
:root {
  --gift: none;
  --sticker: none;
  --invite: none;
  --store: none;
  --shop: none
  --events: none;
  --server-shop: none;
  --boost: none;
  --activity: none;
}

/* recolor friend username on hover*/
.discriminator__0a06e {
  color: var(--header-muted);
}

/* recolor friend status */
.text__19b6d {
  color: var(--text-muted);
}

/* Hide help button */
#app-mount > div.appAsidePanelWrapper_a3002d > div.notAppAsidePanel_a3002d > div.app_a3002d > div > div.layers__960e4.layers__160d8 > div > div > div > div.bar_c38106 > div.trailing_c38106 > a {
  display: none;
}

/* hide VC connected activity share bar */
#app-mount > div.appAsidePanelWrapper_a3002d > div.notAppAsidePanel_a3002d > div.app_a3002d > div > div.layers__960e4.layers__160d8 > div > div > div > div.content_c48ade > div.sidebar_c48ade > section > div.panel__5dec7.activityPanel_c48ade {
  display: none;
}

/* Recolor and resize chat bar */
#app-mount > div.appAsidePanelWrapper_a3002d > div.notAppAsidePanel_a3002d > div.app_a3002d > div > div.layers__960e4.layers__160d8 > div > div > div > div.content_c48ade > div.page_c48ade > div > div > div.content_f75fb0 > main > form > div > div > div.scrollableContainer__74017.themedBackground__74017 {
  background-color: var(--background-base-low);
  min-height: 56px;
}

/* Codebox color */
.visual-refresh .markup__75297 code {
  /* background: var(--background-base-code); */
  background: var(--background-base-low);
  /* background: var(--background-base-lower); */
  /* background: var(--background-base-lowest); */
}

/* Text File Preview Color */
.visual-refresh .textContainer__4d95d {
  background-color: var(--background-base-low);
}
/* timestamp background */
.timestamp__75297 {
  background-color: var(--background-mod-subtle);
}

/* message hover color */
.theme-dark .message__5126c.selected__5126c, .theme-dark.mouse-mode.full-motion .message__5126c:hover, .theme-dark.mouse-mode.full-motion.visual-refresh .message__5126c:hover, .theme-dark.visual-refresh .message__5126c.selected__5126c, .theme-light .message__5126c.selected__5126c, .theme-light.mouse-mode.full-motion .message__5126c:hover, .theme-light.mouse-mode.full-motion.visual-refresh .message__5126c:hover, .theme-light.visual-refresh .message__5126c.selected__5126c {
  background-color: var(--background-base-low);
}

/* add server/discovery butons color */
.circleIconButton__5bc7e {
  background-color: var(--background-floating);
  color: var(--header-muted);
}

/* context menu color */
.scroller_c1e9c4 {
  background-color: var(--background-base-low);
}

/* CSSIndex: Restore User Area (By @Obsidian) */ 
.visual-refresh section.panels_c48ade {
  background: var(--background-base-low) !important;
  margin-left: var(--custom-guild-list-width);
  margin-bottom: 17px;
  width: calc(100% - var(--space-xs)*2 - var(--custom-guild-list-width)) !important;
  .actionButtons_e131a9 button {
  padding: 0;
  }
}
nav.guilds_c48ade {
    margin-bottom: 0 !important;
}

/* fix last DM in list */
.visual-refresh .scroller__99e7c {
  margin-bottom: calc(var(--custom-app-panels-height, 0) + 24px);
}

/* optionally hide the bar at bottom of server list */
.sidebar_c48ade:after {
  display: none;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: Restore Guildbar Icons (by @DaddyBoard)
This makes the guild icons bigger, like how they were in the old UI. */
:root {
    --guildbar-scale: 1.14;
}
/* -- Fix server icons size -- */
/* Target non-server icons on the left bar */
.scroller_ef3116 > div:not(.stack_dbd263) {
    padding-top:8px;
    scale: var(--guildbar-scale);
}
/* Fix server icons size and add some padding */
.tutorialContainer__1f388 ~.stack_dbd263
.listItem__650eb > :nth-child(2) {
    scale: var(--guildbar-scale);
    margin: 3px 0;
}
/* Make folders take all space they need */
ul.stack_dbd263{
    height: auto !important;
}
/* Increase width of the folder background */
.expandedFolderBackground__48112 {
    transform: scaleX(calc(var(--guildbar-scale) * 0.95));
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: make Guildbar Icons circle again (by ?) */
.visual-refresh .wrapper_cc5dd2:not(:hover) img {
  transition: ease 0.5s!important;  /* ease out */
  border-radius: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents distortion */
}

.visual-refresh .wrapper_cc5dd2:hover img { 
  transition: ease 0.5s!important;  /* ease in */
}

.visual-refresh .selected_e5445c img {
  border-radius: 20% !important;
}

/* don't resize Discord logo button */
#app-mount > div.appAsidePanelWrapper_a3002d > div.notAppAsidePanel_a3002d > div.app_a3002d > div > div.layers__960e4.layers__160d8 > div > div > div > div.content_c48ade > div.sidebar_c48ade > nav > ul > div.itemsContainer_ef3116 > div > div.tutorialContainer__1f388 > div > div.listItemWrapper__91816 > div > svg > foreignObject > div > div > img {
  width: 100%;
  height: 100%;
}

/* don't color Discord logo button background */
.wrapper__6e9f8 .childWrapper__6e9f8, .wrapper__6e9f8:hover .childWrapper__6e9f8 {
  background-color: transparent !important;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: Reshapes wonky server icon preview in folder icons to circle (by @nspg911) */
.icon_f34534.guildIcon__48112 { 
  border-radius: 100% !important;
  scale: 96%;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: Make Channel Categories more Visible */
.name__29444 {
    text-transform: uppercase; 
    /* font-weight: bold;  */
    font-size: 12px;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: Hide Right Click Context Menu Options */
#message-tts,
#message-apps,
/* #message-report, */
/* #message-reply, */
#message-forward,
/* #message-add-reaction, */
.wrapper_f563df 	/* Quick React */
/* #message-mark-unread  */
{
  display: none;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: shrink title bar */
.base_c48ade {
    margin-top: -10px;
}
.title_c38106, .trailing_c38106 {
    margin-top: 10px;
    justify-content: left;
    padding-left: 10px;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: VC Connected Panel Text Shadow + Button Colors */
.panels_c48ade .container_e131a9 {	
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;	
}
#app-mount .panels_c48ade, .panel__5dec7.activityPanel_c48ade {	
    background: rgba(47,50,56,1);
}
#app-mount .buttonColor_e131a9 {	
    background: rgba(69,89,152,0);
}
#app-mount .buttonColor_e131a9:hover {	
    background: rgba(88,108,242,1);
}
#app-mount .buttonActive_e131a9 {	
    background: rgba(46,59,57,1);
}
[aria-label="Turn On Camera"] {	
    display: none;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* CSSIndex: Fix BD update notice location */
#bd-notices {
    grid-area: notice;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* Chatbar icon size */
.lottieIcon__5eb9b {
  width: 22px !important;
  height: 22px !important;
}
.spriteContainer__04eed {
  --custom-emoji-sprite-size: 22px !important;
}

/* ------------------------------------------------------------------------------------------------------------ */ 
/* recolor add friend button */
.visual-refresh .tabBar__133bf .addFriend__133bf.addFriend__133bf.addFriend__133bf {
  background-color: var(--button-primary-background);
  color: var(--text-low-contrast);
}

.visual-refresh .tabBar__133bf .addFriend__133bf.addFriend__133bf.addFriend__133bf:hover {
  /* background-color: var(--button-positive-background-hover); */
  background-color: var(--button-filled-brand-background);
  transition: ease-in 0.08s;
  color: var(--text-primary);
}

/* ------------------------------------------------------------------------------------------------------------ */ 

@LastStardaughter
Copy link

@elderlabs how do I use this in BD?

@elderlabs
Copy link
Author

@LastStardaughter copy/paste the CSS into BD's CSS editor in settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment