Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A Slack CSS hack style sheet to customize the theming the Electron application.
ts-message:hover:not(.standalone):not(.multi_delete_mode):not(.highlight) {
background: #353535;
ts-message {
font-size: .8375rem !important;
#quick_switcher_btn {
background: #2B2B2B !important;
.channel-header .flex_header,
#col_messages > .row-fluid,
.channel_header_refresh #client_body:not(.onboarding):before,
.panel .heading,
background: #000 !important;
.ts_icon:not(.ts_icon_presence):before, ts-icon:before,
.panel .heading,
.initial_comment .comment,
#mentions_options {
color: #fff !important;
#quick_switcher_btn {
border-top: none !important;
.channel_header_refresh #client_body:not(.onboarding):before {
border-bottom: 1px solid #4C4C4C;
.monkey_scroll_handle_inner {
background: #333131 !important;
}, {
background: #6D6D6D !important;
.action_hover_container .ts_icon:before,
.action_hover_container .ts_icon:after,
#menu_items .ts_icon:before,
#menu_items .ts_icon:after {
color: #000 !important;
#search_container input,
#message-input {
background: #000 !important;
color: #fff !important;
.special_formatting {
background-color: inherit !important;
color: #39cc2f !important;
.mention {
background: inherit !important;
color: #e1dc28;

This comment has been minimized.

Copy link
Owner Author

@kuanb kuanb commented Nov 27, 2017

Update: Ignore this; the best solution is here:

How to use the above CSS in your Slack desktop application:
Navigate to /Applications, and open in your editor of choice. Next, add the below script to to the index.js file. Save the file and restart Slack. You should be using this Slack customization theme now.

// First make sure the wrapper app is loaded
document.addEventListener("DOMContentLoaded", function() { // eslint-disable-line
   // Then get its webviews
   let webviews = document.querySelectorAll(".TeamView webview");

   // Fetch our CSS in parallel ahead of time
   const cssURI = '';
   let cssPromise = fetch(cssURI).then(response => response.text());

   // Then wait for the views to load
   webviews.forEach(webview => {
      webview.addEventListener('ipc-message', message => {
         if ( == 'didFinishLoading')
            // Finally add the CSS in
            cssPromise.then(css => webview.insertCSS(css));

Want a new theme or to customize this one? Make your own Gist and replace the string value of cssURI with the link to your new raw Gist.

Credit to Bryan Keller for creating the original script and stylesheet. For more guidance and alternate methods of messing with Slack's theming, view this Gist.


This comment has been minimized.

Copy link

@jtlevy jtlevy commented Jun 3, 2019

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