Custom CSS allows you to write your own styles to customize Discord’s appearance beyond what themes provide. This is perfect for making small tweaks or creating your own unique look.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/betterdiscord/betterdiscord/llms.txt
Use this file to discover all available pages before exploring further.
What is custom CSS?
Custom CSS is a built-in BetterDiscord feature that lets you:- Write your own CSS styles that apply to Discord
- Override or extend existing theme styles
- Test CSS changes in real-time
- Create personalized modifications without creating a full theme
Accessing the custom CSS editor
Click Custom CSS
Click on Custom CSS in the BetterDiscord settings menu.
You can configure how the custom CSS editor opens in BetterDiscord settings under Settings > Custom CSS.
Using the built-in CSS editor
The built-in editor provides several features:- Syntax highlighting - Color-coded CSS for easier reading
- Line numbers - Keep track of your code
- Auto-save - Changes save automatically (when live update is enabled)
- Toolbar actions - Quick access to save, update, and open actions
Editor settings
You can configure the editor behavior:- Live Update - Automatically applies changes as you type
- Open Action - Choose how the editor opens (built-in, detached, system, or external)
Writing custom CSS
Basic example
Here’s a simple example to change the Discord background color:Targeting elements
Discord uses unique class names for its elements. To customize specific parts:- Use Discord’s DevTools (press
Ctrl+Shift+IorCmd+Option+I) - Use the element inspector to find class names
- Write CSS rules targeting those classes
Using CSS variables
You can define your own CSS variables for easier customization:Custom CSS file location
Your custom CSS is stored in a file:- Windows:
%appdata%/BetterDiscord/data/stable/custom.css - macOS:
~/Library/Application Support/BetterDiscord/data/stable/custom.css - Linux:
~/.config/BetterDiscord/data/stable/custom.css
The path includes the Discord release channel (stable, canary, or PTB). Each channel has its own custom CSS file.
How custom CSS works
Loading and injection
When BetterDiscord starts:- Reads the
custom.cssfile from your data folder - Injects the CSS into Discord’s page
- Watches the file for changes
- Automatically reloads when the file is modified
Live updates
When live update is enabled:- Changes are applied as you type in the editor
- The CSS is saved automatically (with a debounce to avoid excessive writes)
- You see changes instantly without manually saving
Application order
Custom CSS is applied after themes, which means:- Your custom CSS can override theme styles
- Themes won’t override your custom CSS
- You can use
!importantif needed, but it’s usually not necessary
Common customizations
Changing font
Hiding elements
Custom scrollbars
Transparency effects
Editor modes
Built-in editor
Opens within Discord’s settings panel. Best for quick edits. Pros:- No need to switch applications
- Live preview alongside the editor
- Auto-save with live update
- Limited screen space
- Can’t see full Discord while editing
Detached window
Opens in a floating window that stays on top. Pros:- More screen space than built-in
- Can position anywhere on screen
- Still has live preview
- Resizable window
- Takes up screen space
- May hide parts of Discord
System editor
Opens the CSS file in your default text editor. Pros:- Use your preferred editor with all its features
- Better for large CSS files
- Can use editor plugins and extensions
- No live preview in Discord
- Must save file manually to see changes
- Need to switch between applications
External editor
Opens in BetterDiscord’s web-based editor (if available). Pros:- Full-featured web editor
- Can access from anywhere
- Advanced editing features
- Requires internet connection
- Opens in browser
File watching
BetterDiscord automatically watches thecustom.css file:
- Changes from any source are detected
- The CSS is automatically reloaded
- You’ll see an event notification when the CSS updates
This means you can edit the file in any text editor, and Discord will automatically reload your changes.
Debugging CSS
If your CSS isn’t working:Use DevTools
- Open DevTools (
Ctrl+Shift+IorCmd+Option+I) - Go to the Elements/Inspector tab
- Check if your CSS rules are being applied
- Look for crossed-out rules (being overridden)
Check specificity
If your rule isn’t applying, you may need to increase specificity:Validate syntax
Check for common syntax errors:- Missing semicolons
- Unclosed brackets
- Invalid property values
- Typos in property names
Best practices
Advanced techniques
CSS animations
Media queries
Pseudo-elements
Troubleshooting
If custom CSS isn’t loading:- Check if Custom CSS is enabled - Go to BetterDiscord Settings > Custom CSS
- Check the file location - Ensure the file exists in the correct location
- Check file permissions - Make sure BetterDiscord can read/write the file
- Try reloading Discord - Press
Ctrl+R(orCmd+Ron macOS) - Check for syntax errors - Use a CSS validator or your editor’s linter