Weighs the soul of incoming HTTP requests to stop AI crawlers

deduplicate css rules by using media query to set variables (#420)

* deduplicate css rules by using media query to set variables

* Update xess/xess.css

Co-authored-by: Xe Iaso <me@xeiaso.net>
Signed-off-by: Benjamin Armintor <armintor@gmail.com>

---------

Signed-off-by: Benjamin Armintor <armintor@gmail.com>
Co-authored-by: Xe Iaso <me@xeiaso.net>

authored by

Benjamin Armintor
Xe Iaso
and committed by
GitHub
9e760b1c fc54e952

+26 -60
+1
docs/docs/CHANGELOG.md
··· 10 10 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 11 11 12 12 ## [Unreleased] 13 + - Use CSS variables to deduplicate styles 13 14 14 15 - Fixed native packages not containing the stdlib and botPolicies.yaml 15 16 - Change import syntax to allow multi-level imports
+25 -60
xess/xess.css
··· 3 3 --body-preformatted-font: Iosevka Curly Iaso, monospace; 4 4 --body-title-font: Podkova, serif; 5 5 6 - --dark-background: #1d2021; 7 - --dark-text: #f9f5d7; 8 - --dark-text-selection: #d3869b; 9 - --dark-preformatted-background: #3c3836; 10 - --dark-link-foreground: #b16286; 11 - --dark-link-background: #282828; 12 - --dark-blockquote-border-left: 1px solid #bdae93; 13 - 14 - --light-background: #f9f5d7; 15 - --light-text: #1d2021; 16 - --light-text-selection: #d3869b; 17 - --light-preformatted-background: #ebdbb2; 18 - --light-link-foreground: #b16286; 19 - --light-link-background: #fbf1c7; 20 - --light-blockquote-border-left: 1px solid #655c54; 6 + --background: #1d2021; 7 + --text: #f9f5d7; 8 + --text-selection: #d3869b; 9 + --preformatted-background: #3c3836; 10 + --link-foreground: #b16286; 11 + --link-background: #282828; 12 + --blockquote-border-left: 1px solid #bdae93; 21 13 22 14 --progress-bar-outline: #b16286 solid 4px; 23 15 --progress-bar-fill: #b16286; 24 16 } 17 + @media (prefers-color-scheme: light) { 18 + :root { 19 + --background: #f9f5d7; 20 + --text: #1d2021; 21 + --text-selection: #d3869b; 22 + --preformatted-background: #ebdbb2; 23 + --link-foreground: #b16286; 24 + --link-background: #fbf1c7; 25 + --blockquote-border-left: 1px solid #655c54; 26 + } 27 + } 25 28 26 29 @font-face { 27 30 font-family: "Geist"; ··· 54 57 } 55 58 56 59 ::selection { 57 - background: var(--dark-text-selection); 60 + background: var(--text-selection); 58 61 } 59 62 60 63 body { 61 - background: var(--dark-background); 62 - color: var(--dark-text); 64 + background: var(--background); 65 + color: var(--text); 63 66 } 64 67 65 68 body, ··· 113 116 } 114 117 115 118 pre { 116 - background-color: var(--dark-preformatted-background); 119 + background-color: var(--preformatted-background); 117 120 padding: 1em; 118 121 border: 0; 119 122 font-family: var(--body-preformatted-font); ··· 122 125 a, 123 126 a:active, 124 127 a:visited { 125 - color: var(--dark-link-foreground); 126 - background-color: var(--dark-link-background); 128 + color: var(--link-foreground); 129 + background-color: var(--link-background); 127 130 } 128 131 129 132 h1, ··· 136 139 } 137 140 138 141 blockquote { 139 - border-left: var(--dark-blockquote-border-left); 142 + border-left: var(--blockquote-border-left); 140 143 margin: 0.5em 10px; 141 144 padding: 0.5em 10px; 142 145 } ··· 144 147 footer { 145 148 text-align: center; 146 149 } 147 - 148 - @media (prefers-color-scheme: light) { 149 - ::selection { 150 - background: var(--light-text-selection); 151 - } 152 - 153 - body { 154 - background: var(--light-background); 155 - color: var(--light-text); 156 - } 157 - 158 - pre { 159 - background-color: var(--light-preformatted-background); 160 - padding: 1em; 161 - border: 0; 162 - } 163 - 164 - a, 165 - a:active, 166 - a:visited { 167 - color: var(--light-link-foreground); 168 - background-color: var(--light-link-background); 169 - } 170 - 171 - h1, 172 - h2, 173 - h3, 174 - h4, 175 - h5 { 176 - margin-bottom: 0.1rem; 177 - } 178 - 179 - blockquote { 180 - border-left: var(--light-blockquote-border-left); 181 - margin: 0.5em 10px; 182 - padding: 0.5em 10px; 183 - } 184 - }