Skip to content

bgjar.com dark mode by bruno

Screenshot of bgjar.com dark mode

Details

Authorbruno

LicenseNo License

Categorybgjar

Created

Updated

Size4.9 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

There wasn't any, Dark Reader didn't do it any justice. This works very well, I must say, and was very interesting to do.

Notes

Tried to be as faithful to the original as possible. Took minimal liberties.

Source code

/* ==UserStyle==
@name           bgjar.com
@namespace      github.com/openstyles/stylus
@version        1.0.1
@description    A new userstyle
@author         bruno
@preprocessor   stylus

@var            checkbox    darkTransparent     'Dark transparent background'   1
==/UserStyle== */
@-moz-document url-prefix("https://bgjar.com/") {
    :root {
        --primary: hsl(211, 100%, 50%);
        --primary-dark: hsl(211, 66%, 42%);
        --secondary: hsl(211, 66%, 28%);
        --secondary-dark: hsl(211, 27%, 20%);
        --body-bg: hsl(210, 39%, 11%);
        --bg-vdark: hsl(210.5, 27.1%, 12.7%);
        --offwhite: hsl(0, 20%, 86%);
        --offwhite-sub: hsl(0, 18%, 84%);
        --border-color: var(--secondary);
    }

    body {
        background: var(--body-bg);
    }

    #index .example-card {
        border: 1px solid var(--secondary);
    }

    #indexFooter {
        background-color: var(--bg-vdark);
        color: var(--offwhite);
    }

    div.container:has(div[role="alert"]) {
        display: none;
    }

    #indexHero .index-hero-wrapper {
        padding: 3rem 0;
    }

    #index .example-card {
        margin-bottom: 1rem;
    }

    #index {
        margin-top: 1rem !important;
    }

    #index > .row > div {
        padding-right: .5rem;
        padding-left: .5rem;
    }

    #indexFooter {
        margin-top: 2rem;
    }

    .btn-link:hover {
        color: hsl(211, 100%, 50%);
    }

    .btn-link {
        color: hsl(211, 95%, 55%);
    }
}

@-moz-document regexp("https://bgjar.com/.+") {
    #workspace {
        color: var(--offwhite);
        color-scheme: dark;
    }

    input {
        background-color: #000 !important;
        color: var(--offwhite) !important;
        border-color: #161515 !important;
    }

    div.form-group > div:nth-child(2) > div:nth-child(2) > span {
        background-color: var(--secondary);
        border-color: var(--border-color) !important;
        color: var(--offwhite);
    }

    .bg-light {
        background-color: var(--body-bg) !important;
    }

    #workspace .sidebar .setting-header {
        border-top: 1px solid var(--border-color);
    }

    .gradient-color-picker.as-list-item {
        border-bottom: 1px dashed var(--border-color);
    }

    .border-bottom,
    #workspace .sidebar .setting-header {
        border-bottom: 1px solid var(--border-color) !important;
    }

    .pcr-app {
        background: #00000078;
        backdrop-filter: blur(20px);
    }

    :is(.gradient-color-picker.as-list-item, .gradient-color-picker .stop-item):hover {
        background-color: var(--secondary-dark);
    }

    #workspace .sidebar .setting-header {
        color: var(--offwhite-sub);
    }

    .custom-range::-moz-range-track {
        background-color: var(--secondary);
    }

    .custom-range {
        background-color: transparent !important;
    }

    .custom-range::-moz-range-thumb {
        background-color: var(--primary);
        cursor: w-resize;
    }

    .custom-range:focus::-moz-range-thumb {
        box-shadow: 0 0 0 1px var(--secondary), 0 0 0 .2rem rgba(0, 123, 255, .25);
    }

    .color-picker .color-badge {
        border: 1px solid var(--offwhite);
    }

    .bgjar-btn-primary {
        background-color: var(--secondary);
    }

    #workspace .sidebar .sidebar-branding {
        background-color: transparent;
        transform: scale(.8);
        color: var(--offwhite);
        transition: transform .8s ease;
    }

    #workspace .sidebar .sidebar-branding:hover {
        transform: scale(.9);
    }

    #workspace .sidebar .sidebar-branding:hover .sidebar-logo-highlight {
        color: var(--primary);
    }

    #workspace .sidebar .sidebar-logo-highlight {
        color: var(--secondary);
        transition: color 1s;
    }

    .bgjar-btn-primary {
        color: var(--offwhite);
        background-color: var(--secondary);
    }

    .bgjar-btn-primary.focus,
    .bgjar-btn-primary:focus,
    .bgjar-btn-primary:hover {
        background-color: var(--primary-dark);
    }

    .bgjar-btn-primary:not(:disabled):not(.disabled).active,
    .bgjar-btn-primary:not(:disabled):not(.disabled):active,
    .show > .bgjar-btn-primary.dropdown-toggle {
        background-color: var(--secondary-dark);
        border-color: var(--secondary);
    }

    .sidebar-branding:hover .sidebar-logo-highlight {
        color: var(--primary);
    }

    div.pl-3 {
        color: var(--primary);
        font-weight: bold;
        letter-spacing: 1px;
    }

    .card {
        background-color: var(--bg-vdark);
    }

    pre {
        color: var(--offwhite);
    }

    if darkTransparent {
        #workspace #canvas.show-bg > svg {
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUPDw8AAACOAoydAAAAE0lEQVQI12NgYPj/n4oElU1jAADtvT/BM8KnAAAAAABJRU5ErkJggg==');
        }
    }
}

Reviews

No reviews yet.