summaryrefslogtreecommitdiff
path: root/.config/firefox/userContent.css
blob: b27805791fd2407c78d63bff3c5c088d33bd0741 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/* To enable:
 * - set toolkit.legacyUserProfileCustomizations.stylesheets
 * - move this file to $profiledir/chrome
 *   (Firefox does not read "~/.config/firefox"; I just wanted a
 *   somewhat memorable directory for this dotfile)
 *
 * References:
 * https://web.archive.org/web/20211023121642/https://kb.mozillazine.org/UserContent.css
 * https://developer.mozilla.org/en-US/docs/Web/CSS/@document
 *
 * To elevate this file slightly above "thinly disguised collection of
 * web design pisstakes", I'll also list some websites whose layout I
 * find functional and praiseworthy:
 *
 * https://aphyr.com
 * https://drewdevault.com
 * https://jvns.ca
 * https://lobste.rs
 * https://nullprogram.com
 * https://protesilaos.com
 * https://rachelbythebay.com/w
 * https://www.joshwcomeau.com
 * https://www.stilldrinking.org
 */

@-moz-document domain(askubuntu.com), domain(serverfault.com),
               domain(stackexchange.com), domain(stackoverflow.com),
               domain(superuser.com) {

    /* https://stackoverflow.blog/2022/01/25/attention-distraction-focus-flow-state-programming/
     *
     * > Modern apps have been engineered to capture your attention.
     * > We explore how to break free and find more focus for your own
     * > programming.
     *
     * Not that you'd know anything about "engineering to capture our
     * attention", eh SX?
     *
     * (2014) https://meta.stackexchange.com/questions/222721/how-to-avoid-hot-network-questions-on-the-sidebar
     * (2015) https://meta.stackoverflow.com/questions/284350/can-we-have-an-adhd-stack-overflow-version
     * (2015) https://meta.stackoverflow.com/questions/308022/is-it-a-good-idea-to-disable-hot-network-questions-to-boost-productivity
     * (2019) https://meta.stackexchange.com/questions/325060/updating-the-hot-network-questions-list-now-with-a-bit-more-network-and-a-litt
     *
     * > User preference to remove HNQ sidebar section globally
     *
     * 👏
     *
     * Keeping the CSS rules because I'm not always logged in.
     */

    #hireme, #hot-network-questions {
        display: none;
    }
}

@-moz-document domain(bugs.debian.org), domain(debbugs.gnu.org) {
    body {
        margin: auto !important;
        max-width: 40em;
    }
}

@-moz-document domain(cr.yp.to) {
    body {
        margin: auto;
        max-width: 50em;
    }
}

@-moz-document domain(danluu.com) {
    body {
        max-width: 40em;
        margin: auto;
    }
}

@-moz-document domain(emacswiki.org) {
    .content.browse {
        max-width: 70ch;
        margin: auto;
    }
}

@-moz-document domain(inbox.sourceware.org), domain(list.orgmode.org),
               domain(lore.kernel.org), domain(yhetil.org) {

    pre {
        margin: auto;
        max-width: 120ch;
    }

    .q {
        white-space: pre-wrap !important;
    }
}

@-moz-document domain(lists.debian.org), domain(lists.freedesktop.org),
               domain(lists.gnu.org),
               regexp("https://sourceware.org/pipermail/.*") {
    body {
        margin: auto !important;
        max-width: fit-content;
    }
}

@-moz-document regexp("https://lwn.net/.*") {
    .maincolumn {
        max-width: 60em;
        margin: auto;
    }
}

@-moz-document domain(martinfowler.com) {
    body {
        max-width: fit-content;
        margin: auto !important;
    }
}

@-moz-document domain(mjg59.dreamwidth.org) {
    .column-right #content {
        max-width: 45em;
        margin: auto;
    }
}

@-moz-document domain(pubs.opengroup.org) {
    body {
        max-width: 40em;
        margin: auto !important;
    }
}

@-moz-document domain(reddit.com) {
    #siteTable, .commentarea {
        max-width: 80em;
        margin: auto !important;
    }

    section.listingsignupbar, section.commentsignupbar,
    aside.read-next.active {
        display: none !important;
    }
}

@-moz-document domain(undeadly.org) {
    main {
        display: grid;
        grid-template-columns: 75% 25%;
    }

    #primary {
        min-width: unset;
        width: unset !important;
        float: unset !important;
        max-width: 70ch;
        margin: auto;
    }

    #extras {
        width: unset !important;
        float: unset !important;
    }
}