Skip to content

dark mode for docs.python.org by s-light

Details

Authors-light

LicenseCC0

Categorydocs.python.org

Created

Updated

Size9.1 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

simple dark mode.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           simple dark mode for sphinx docs
@namespace      github.com/openstyles/stylus
@version        1.0.0
@description    tested on docs.python.org and mariadb-corporation.github.io
@author         s-light.eu
==/UserStyle== */
@-moz-document domain("docs.python.org"),
domain("mariadb-corporation.github.io") {
    :root {
        --bg: black;
        --bg-light: hsl(250, 100%, 10%);
        --bg-light2: hsl(250, 100%, 20%);
        --bg-highlight: hsl(250, 100%, 30%);
        --bg-highlight2: hsl(250, 100%, 50%);
        --bg-gradient: linear-gradient( to bottom,
        var(--bg-highlight),
        var(--bg-highlight2));
        --bg-gradient-dark: linear-gradient( to bottom,
        var(--bg-light),
        var(--bg-light2));
        --bg-gradient-verydark: linear-gradient( to bottom,
        hsl(250, 100%, 5%),
        var(--bg-light));

        --text: hsl(42, 65%, 50%);
        --text-highlight: hsl(170, 100%, 50%);

        --sidebar_width: 25rem;
    }


    html,
    body {
        background-color: var(--bg);
        color: var(--text);
        font-size: 22px;
    }

    div.document,
    div.body,
    div.related {
        background-color: transparent;
        color: inherit;
    }



    div.body {
        max-width: max(800px, 70rem);
    }

    div.related a {
        color: var(--text-highlight);
    }


    div.sphinxsidebar[role="navigation"] {
        background: var(--bg-gradient-verydark);
        color: inherit;
        width: var(--sidebar_width) !important;
    }

    div.bodywrapper {
        margin: 0 0 0 var(--sidebar_width) !important;
    }

    div.sphinxsidebarwrapper {
        width: calc(100% - 0.7rem) !important;
    }

    #sidebarbutton {
        background: var(--bg-gradient-dark);
        margin-left: calc(var(--sidebar_width) - 0.7rem) !important;
    }


    div.sphinxsidebar p,
    div.sphinxsidebar h3,
    div.sphinxsidebar h3 a,
    div.sphinxsidebar h4,
    div.sphinxsidebar ul,
    div.sphinxsidebar a {
        color: inherit;
    }


    code,
    .note code {
        background-color: var(--bg-light2);
        color: inherit;
    }

    .highlight pre {
        background-color: var(--bg-light);
        color: inherit;
    }


    div.note {
        background: var(--bg-light);
        border: none;
        box-shadow: 0 0 5px 0 var(--text-highlight);
    }

    div.warning {
        background: var(--bg-light);
        border: none;
        box-shadow: 0 0 5px 0 var(--text-highlight);
    }

    div.body h1,
    div.body h2,
    div.body h3,
    div.body h4,
    div.body h5,
    div.body h6 {
        font-family: Overlock;
        background: var(--bg-gradient-dark);
        color: inherit;
    }

    input,
    div.sphinxsidebar input {
        background: transparent;
        color: inherit;
        border: 0px solid var(--bg-light);
        box-shadow: 0 0 10px 0px var(--bg-highlight2) inset;
    }
}

@-moz-document domain("docs.python.org"),
domain("mariadb-corporation.github.io") {
    /* credits - https://github.com/kakawait/pygments-darcula */
    /* ----[ BASE ]---- */
    .highlight .hll {
        background-color: #214283
    }

    .highlight {
        background: #2B2B2B;
        color: #A9B7C6
    }

    .highlight .c {
        color: #808080
    }

    /* Comment */
    .highlight .err {
        color: #960050
    }

    /* Error */
    .highlight .g {
        color: #808072
    }

    /* Generic */
    .highlight .k {
        color: #CB772F
    }

    /* Keyword */
    .highlight .l {
        color: #6897BB
    }

    /* Literal */
    .highlight .n {
        color: #A9B7C6
    }

    /* Name */
    .highlight .o {
        color: #A9B7C6
    }

    /* Operator */
    .highlight .p {
        color: #A9B7C6
    }

    /* Punctuation */
    .highlight .ch {
        color: #808080
    }

    /* Comment.Hashbang */
    .highlight .cm {
        color: #53833D
    }

    /* Comment.Multiline */
    .highlight .cp {
        color: #808080
    }

    /* Comment.Preproc */
    .highlight .cpf {
        color: #808072
    }

    /* Comment.PreprocFile */
    .highlight .c1 {
        color: #808080
    }

    /* Comment.Single */
    .highlight .cs {
        color: #808080
    }

    /* Comment.Special */
    .highlight .gd {
        color: #A9B7C6
    }

    /* Generic.Deleted */
    .highlight .ge {
        color: #808072;
        font-style: italic
    }

    /* Generic.Emph */
    .highlight .gr {
        color: #a94545
    }

    /* Generic.Error */
    .highlight .gh {
        color: #88BE05;
        font-weight: bold
    }

    /* Generic.Heading */
    .highlight .gi {
        color: #88BE05
    }

    /* Generic.Inserted */
    .highlight .go {
        color: #78909C
    }

    /* Generic.Output */
    .highlight .gp {
        color: #808072;
        font-weight: bold
    }

    /* Generic.Prompt */
    .highlight .gs {
        color: #808072;
        font-weight: bold
    }

    /* Generic.Strong */
    .highlight .gu {
        color: #A9B7C6
    }

    /* Generic.Subheading */
    .highlight .gt {
        color: #808080
    }

    /* Generic.Traceback */
    .highlight .kc {
        color: #CB772F
    }

    /* Keyword.Constant */
    .highlight .kd {
        color: #CB772F
    }

    /* Keyword.Declaration */
    .highlight .kn {
        color: #CB772F
    }

    /* Keyword.Namespace */
    .highlight .kp {
        color: #CB772F
    }

    /* Keyword.Pseudo */
    .highlight .kr {
        color: #CB772F
    }

    /* Keyword.Reserved */
    .highlight .kt {
        color: #CB772F
    }

    /* Keyword.Type */
    .highlight .ld {
        color: #6A8759
    }

    /* Literal.Date */
    .highlight .m {
        color: #6897BB
    }

    /* Literal.Number */
    .highlight .s {
        color: #6A8759
    }

    /* Literal.String */
    .highlight .na {
        color: #A9B7C6
    }

    /* Name.Attribute */
    .highlight .nb {
        color: #8888C6
    }

    /* Name.Builtin */
    .highlight .nc {
        color: #A9B7C6
    }

    /* Name.Class */
    .highlight .no {
        color: #CB772F
    }

    /* Name.Constant */
    .highlight .nd {
        color: #F1C829;
        font-weight: normal
    }

    /* Name.Decorator */
    .highlight .ni {
        color: #A9B7C6
    }

    /* Name.Entity */
    .highlight .ne {
        color: #A34029
    }

    /* Name.Exception */
    .highlight .nf {
        color: #FFC66D
    }

    /* Name.Function */
    .highlight .nl {
        color: #A9B7C6
    }

    /* Name.Label */
    .highlight .nn {
        color: #A9B7C6
    }

    /* Name.Namespace */
    .highlight .nx {
        color: #88BE05
    }

    /* Name.Other */
    .highlight .py {
        color: #A9B7C6
    }

    /* Name.Property */
    .highlight .nt {
        color: #F1C829
    }

    /* Name.Tag */
    .highlight .nv {
        color: #A9B7C6
    }

    /* Name.Variable */
    .highlight .ow {
        color: #A9B7C6
    }

    /* Operator.Word */
    .highlight .w {
        color: #A9B7C6
    }

    /* Text.Whitespace */
    .highlight .mb {
        color: #6897BB
    }

    /* Literal.Number.Bin */
    .highlight .mf {
        color: #6897BB
    }

    /* Literal.Number.Float */
    .highlight .mh {
        color: #6897BB
    }

    /* Literal.Number.Hex */
    .highlight .mi {
        color: #6897BB
    }

    /* Literal.Number.Integer */
    .highlight .mo {
        color: #6897BB
    }

    /* Literal.Number.Oct */
    .highlight .sb {
        color: #6A8759
    }

    /* Literal.String.Backtick */
    .highlight .sc {
        color: #6A8759
    }

    /* Literal.String.Char */
    .highlight .sd {
        color: #6A8759
    }

    /* Literal.String.Doc */
    .highlight .s2 {
        color: #6A8759
    }

    /* Literal.String.Double */
    .highlight .se {
        color: #6897BB
    }

    /* Literal.String.Escape */
    .highlight .sh {
        color: #6A8759
    }

    /* Literal.String.Heredoc */
    .highlight .si {
        color: #6A8759
    }

    /* Literal.String.Interpol */
    .highlight .sx {
        color: #6A8759
    }

    /* Literal.String.Other */
    .highlight .sr {
        color: #6A8759
    }

    /* Literal.String.Regex */
    .highlight .s1 {
        color: #6A8759
    }

    /* Literal.String.Single */
    .highlight .ss {
        color: #6A8759
    }

    /* Literal.String.Symbol */
    .highlight .bp {
        color: #A9B7C6
    }

    /* Name.Builtin.Pseudo */
    .highlight .vc {
        color: #A9B7C6
    }

    /* Name.Variable.Class */
    .highlight .vg {
        color: #A9B7C6
    }

    /* Name.Variable.Global */
    .highlight .vi {
        color: #A9B7C6
    }

    /* Name.Variable.Instance */
    .highlight .il {
        color: #6897BB
    }

    /* Literal.Number.Integer.Long */
    /* ----[ PROPERTIES ]---- */
    .highlight.properties .cm {
        color: #808080
    }

    /* Comment.Multiline */
    .highlight.properties .na {
        color: #CB772F
    }

    /* Name.Attribute */
    .highlight.properties .se {
        color: #6A8759
    }

    /* Literal.String.Escape */
}

Reviews

No reviews yet.