Skip to content

stackexchange old vote buttons by aaronliu0130

Screenshot of stackexchange old vote buttons

Details

Authoraaronliu0130

LicenseCC-BY-SA 4.0

Categorystackexchange.com, stackoverflow.com, superuser.com, serverfault.com, askubuntu.com, stackapps.com

Created

Updated

Size1.8 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

turns the vote buttons of the stackexchange network (stackoverflow, superuser, askubuntu, serverfault, etc.) back

Notes

Source code

/* ==UserStyle==
@name         stackexchange old vote buttons
@version      20231021.18.11
@namespace    userstyles.world/user/aaronliu0130
@description  turns the vote buttons of the stackexchange network (stackoverflow, superuser, askubuntu, serverfault, etc.) back
@author       aaronliu0130
@license      CC-BY-SA 4.0
==/UserStyle== */

@-moz-document regexp(".*(stackexchange\\.com|stackoverflow\\.com|superuser\\.com|serverfault\\.com|askubuntu\\.com|stackapps\\.com).*") {
button.js-vote-down-btn,
button.js-vote-up-btn {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    padding: 0 !important;
}

button.js-vote-down-btn:hover,
button.js-vote-up-btn:hover {
    background: none !important;
}

/* 
 * As of October 2023, each post voting button carries the following attributes:
 *
 * data-selected-classes="fc-theme-primary-500 bc-theme-primary-500 bg-theme-primary-100" (MSE and probably the rest)
 * data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100" (SO)
 * data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200" (both)
 *
 * Apparently some JavaScript toggles all of those at once when votes are cast or withdrawn.
 *
 * The lengths to which some people go to avoid using semantic CSS clases are astounding.
 */
button.js-vote-down-btn:not(.fc-theme-primary-500):not(.fc-theme-primary),
button.js-vote-up-btn:not(.fc-theme-primary-500):not(.fc-theme-primary) {
    color: inherit !important;
}

button.js-vote-down-btn > svg,
button.js-vote-up-btn > svg {
    width: 36px;
    height: 36px;
}

.js-vote-count {
    color: var(--black-500) !important;
    font-size: var(--fs-title) !important;
    padding: 0 !important;
    font-weight: normal !important;
}
}

Reviews

No reviews yet.