Skip to content

自用全局样式 by hhp1614

Details

Authorhhp1614

LicenseNo License

Categoryuserstyles

Created

Updated

Size1.8 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

全局统一字体渲染

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         自用全局样式
@version      20220815.07.36
@namespace    userstyles.world/user/hhp1614
@description  全局统一字体渲染
@author       hhp1614
@license      No License
==/UserStyle== */

/* 全局 */
:root {
    --hhp-font: Sarasa Fixed SC;
    --hhp-code: hhp;
    --hhp-size: 17px;
    --hhp-line: 1.25;
}
*:not(i):not([class*="icon"]):not([class*="vjs"]):not([class*="fa-"]):not([class*="emoji"]):not([class*="danmaku"]) {
    font-family: var(--hhp-font);
    text-shadow: 0 0 1.2px !important;
    tab-size: 4;
}
pre,
pre *,
code[class*='language-'] {
    font-family: var(--hhp-font) !important;
    font-size: var(--hhp-size) !important;
}

@-moz-document url-prefix("chrome-extension://clngdbkpkpeebahjckkjfobafhncgmne") {
/* Stylus 设置页面 */
.CodeMirror {
    font-size: var(--hhp-size);
    line-height: var(--hhp-line);
}
}

/* 深色模式滚动条样式 */
@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar {
        background-color: #303536;
        color: #fff6e5;
    }
    ::-webkit-scrollbar-thumb {
        background-color: #686f73;
    }
    ::-webkit-scrollbar-thumb:hover {
        background-color: #838d93;
    }
    ::-webkit-scrollbar-thumb:active {
        background-color: #6c757a;
    }
    ::-webkit-scrollbar-corner {
        background-color: #242729;
    }
}

@-moz-document domain("bilibili.com") {
div[class*="danmaku"] {
    font-family: var(--hhp-font) !important;
}
}

@-moz-document domain("github.com") {
/* GitHub */
.blob-code,
.blob-num,
pre * {
    font-size: var(--hhp-size);
    line-height: var(--hhp-line);
}
.CodeMirror * {
    font-size: var(--hhp-size);
}
}

@-moz-document domain("cnblogs.com") {
/* 博客园 */
div[class*="highlight"] * {
    font-size: var(--hhp-size) !important;
}
}

Reviews

No reviews yet.