Biang

Persnal Style For bing.com

/* ==UserStyle==
@name:zh-CN     必应不再绿
@name         Biang 
@namespace     doufu.ru
@version       1.1.2
@description:zh-CN 必应个性化样式
@description    Persnal Style For bing.com
@author         Ryan
@preprocessor stylus
@var text columnMaxWidth "最大宽度(单栏)" 960px
@var text columnsMaxWidth "最大宽度(双栏栏)" 1536px
@var checkbox columnsEnabled "启用双栏" 1
==/UserStyle== */
@-moz-document domain("bing.com") {

    /** 公共样式 */
    #ev_talkbox_min,
    #b_opalpers,
    [aria-label="更多结果"] {
        display: none !important;
    }

    html {
        --max-width: 1600px;
        --block-px: 12px;
    }

    h2 {
        line-height: 24px;
        font-size: 20px;
    }

    em,
    strong {
        font-style: normal;
        color: #c00 !important;
    }

    a,
    #b_tween a:visited,
    #b_results .b_no a {
        color: rgb(0, 0, 204);
    }

    cite,
    #b_results cite.sb_crmb a,
    #b_results cite a.sb_metalink,
    #b_results .b_adurl cite a,
    #bk_wr_container cite a {
        color: #626675;
    }

    #id_h {
        position: absolute;
        float: none;
        top: 0px;
        z-index: 99;
    }

    .as-horizontal .as-menu {
        justify-content: center;
    }

    .sp-separator {
        flex: 0 1 100% !important;
    }

    .dynMap {
        width: calc(100% - 20px) !important;
        margin: 10px;
    }
}

@-moz-document regexp("https?://.*\\.bing\\.com/((\\?.*?)?)$") {

    /** 首页样式 搜索框居中 */
    .sbox {
        margin-left: -290px;
        width: 580px;
        margin-top: -26px;
        height: 52px;
        left: 50%;
    }
    .sbox.fix {
        margin-top: 0;
    }
    .sbox[style*="transform"]:not(.fix) {
        top: 45%;
    }
    .sbox:not([style]),
    .sbox[style=""] {
        top: 50%;
    }
}

@-moz-document regexp("https?://.*\\.bing\\.com/search.*$") {
    #b_skip_to_content,
    .b_logoArea {
        display: none !important;
    }
    .toggle_img {
        filter: sepia(100%) hue-rotate(190deg) saturate(500%);
    }
    .sb_pagF {
        /** 翻页居中 */
        display: flex;
        justify-content: center;
    }
    #b_context {
        --rgutter: 0;
    }
    #sb_form_q {
        max-width: 535px;
    }
    @media (max-width: 979.99px) {
        html body {
            width: 100%;
            min-width: unset;
        }
        body #b_header {
            width: calc(100% - 2 * var(--block-px));
            min-width: unset;
        }
        body {
            overflow: hidden;
        }

        #b_header {
            border-bottom: 0;
            padding: 24px var(--block-px) 0 var(--block-px);
        }
        #est_switch {
            margin-left: 0;
        }

        #b_header #sb_form {
            width: 100%;
            margin-right: 0;
        }
        .b_searchboxForm {
            display: flex;
            width: 100%;
            overflow: hidden;
        }
        .hasmic .b_searchbox {
            width: auto;
            flex-grow: 1;
        }
        .b_scopebar {
            margin-left: 0;
        }
        #b_results {
            width: 100%;
        }
        .b_respl #b_content {
            --lgutter: 0;
            /* 去除左边缩进 */
            --padding-x: 8px;
            padding: 40px var(--block-px) 0;
        }
        #b_results > li {
            padding-left: var(--block-px);
            padding-right: var(--block-px);
        }
        .b_topborder .b_topBleed .b_antiTopBleed,
        .b_nonfirsttopb .b_topBleed .b_antiTopBleed,
        #b_results > .b_algo {
            padding-left: var(--block-px);
            padding-right: var(--block-px);
        }
        #b_results > li .b_title {
            display: flex;
            gap: 8px;
        }
        .sh_favicon {
            display: flex;
            align-items: center;
        }
        #b_results > li .b_title > h2 {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }
        #recentSearchLGContainer {
            display: none;
        }
        #b_results > .b_ans {
            padding-left: var(--block-px);
            padding-right: var(--block-px);
        }
        #b_results .b_ans #brsv3,
        #b_results .b_ans #b_recents {
            width: 100%;
        }
        #b_results #brsv3 .b_vList,
        #b_results .b_ans #b_recents .b_vList {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        #b_results #brsv3 .b_vList li,
        #b_results #b_recents .b_vList li {
            margin: 0;
            width: auto;
        }
        #b_results #brsv3 .b_vList li:nth-child(2n+1),
        #b_results #b_recents .b_vList li:nth-child(2n+1) {
            margin-right: 0;
        }
    }
    @media (min-width: 768px) {
        html body {
            width: 768px;
            min-width: unset;
            margin: 0 auto;
        }
        #b_header {
            width: 768px;
            min-width: unset !important;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        #est_switch {
            width: 100%;
        }
        .b_scopebar {
            margin-left: 0;
        }
        #b_tween {
            padding-left: 0;
            text-align: center;
        }
        #sw_as .sa_drw .sa_sg {
            padding: 6px 0 !important;
        }
        .sa_as > * {
            flex-grow: 1;
        }
        #sw_as .rs_drw {
            display: flex;
            flex-wrap: wrap;
        }
        #sw_as .sa_as .sa_drw .sa_sgr {
            width: calc(50% - 16px);
            display: flex;
        }
        #sw_as .sa_as .sa_drw .sa_sg_icon_are {
            flex-shrink: 0;
        }
        #sw_as #sa_requery .sa_tm {
            flex-grow: 1;
            display: flex;
            align-items: center;
        }
        #b_content {
            width: 768px;
            --lgutter: 0;
            margin: 0 auto;
        }
        #b_results {
            width: 100%;
        }
        #b_footer {
            width: 768px;
            min-width: unset !important;
            margin: 0 auto;
            float: none;
            margin-bottom: 20px;
        }
        #b_footerItems {
            height: auto;
        }
        #b_footerItems:after {
            content: "";
            display: block;
            clear: both;
        }
    }
    @media (min-width: 960px) {
        html body {
            width: 920px;
            min-width: unset;
            margin: 0 auto;
            max-width: columnMaxWidth;
        }
        #b_content {
            max-width: columnMaxWidth;
        }
    }
    @media (min-width: 1280px) and (max-width: 1535.99px) {
        html body {
            width: 1280px;
            min-width: unset;
        }
        #b_content {
            width: 1280px;
        }
    }
    @media (min-width: 1536px) {
        html body {
            width: 1480px;
            min-width: unset;
        }
        #b_content {
            width: 1480px;
        }
    }
    if columnsEnabled {
        /* 如果不需要双列样式请删掉下面的 CSS */
        /* 双列样式开始 */
        @media (min-width: 1280.01px) {
            html body {
                width: 100%;
                min-width: unset;
                margin: 0 auto;
                max-width: columnsMaxWidth;
            }
            #b_content {
                --padding-inline: 40px;
                width: calc(100% - 2 * var(--padding-inline));
                max-width: columnsMaxWidth;
                padding-inline: --padding-inline;
            }
            #b_results {
                display: flex;
                flex-wrap: wrap;
                --columns: 2;
            }
            #b_results > li:not(#mfa_root):not(.b_pageBar):not(.b_pag) {
                width: calc(100% / var(--columns));
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
            #b_results > li:not(#mfa_root):not(.b_pageBar):not(.b_pag) > * {
                padding-left: var(--block-px);
                padding-right: var(--block-px);
            }
            #b_results .b_title {
                display: flex;
                gap: 8px;
            }
            #b_results .sh_favicon {
                display: flex;
                align-items: center;
            }
            #b_results .wr_fav {
                margin-left: 0;
            }
            li.b_pag {
                width: 100%;
                max-width: 100% !important;
            }
        }
        /* 双列样式结束*/
    }
}