champorado
  • 2022-11-18 17:50:22 +0800 +0800
    champorado

    champorado

    2022.11.18

    Fixed code overflow

    In the theme’s /static/css/md.css everything below /* code blocks */ was altered to the following:

    .md code {
        font-size: calc(0.85rem * var(--scale));
        padding: 0 0.25rem;
        background: var(--color-bg)
    }
    
    .md pre {
        overflow-x: scroll;
        background: var(--color-bg);
        scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
        scrollbar-width: thin;
        margin: 1rem 0;
        font-size: calc(0.8rem * var(--scale));
        padding: 0.5rem;
    }
    
    .md pre::-webkit-scrollbar {
        width: 1em;
    }
    
    .md pre::-webkit-scrollbar-track {
        background: var(--scrollbar-bg);
    }
    
    .md::-webkit-scrollbar-thumb {
        background-color: var(--scrollbar-thumb);
        border-radius: 6px;
        border: 3px solid var(--scrollbar-border);
    }
    

    Background color was added to easier distinguish code from prose.

    2022-11-18 17:50:22 +0800 +0800 2022.11.18