Skip to content

saner-so by LifeJustDLC

Details

AuthorLifeJustDLC

LicenseUnlicense

Categorystackoverflow.com

Created

Updated

Size1.2 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

exact 80 characters wide code block on stackoverflow. you can stop blame SO and start blame code poster lol

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         saner-so
@version      20240902.15.32
@namespace    https://userstyles.world/user/LifeJustDLC
@description  exact 80 characters wide code block on stackoverflow. you can stop blame SO and start blame code poster lol
@author       LifeJustDLC
@license      Unlicense
==/UserStyle== */

@-moz-document domain("stackoverflow.com") {
/*
01234567890123456789012345678901234567890123456789012345678901234567890123456789
0---------1---------2---------3---------4---------5---------6---------7---------
*/

:root {
    --code-fs-num: 15;
    --code-scale: calc(var(--code-fs-num)/14);
    --code-mw: calc(80ch * var(--code-scale) + 40px);
    --main-fs: 18px;
    --main-mw: calc(var(--code-mw) + 132px); /* practically good */
    /* --main-mw: calc(var(--code-mw) + 96px); */ /* theoretically right */
    --comment-fs: 16px;
}

.s-code-block * {
    font-size: calc(var(--code-fs-num) * 1px);
}

.s-code-block {
    min-width: var(--code-mw);
}

.snippet-code {
    padding: 0;
}

.s-btn.s-btn__filled {
    margin-left: 4px;
}

.js-post-body p {
    font-size: var(--main-fs);
}

.comment-text * {
    font-size: var(--comment-fs);
}

#mainbar {
    min-width: var(--main-mw);
}

#sidebar {
    max-width: 200px;
}
}

Reviews

No reviews yet.