<p dir="auto">A quick implementation of auto/light scheme switch for those who want to stay on the light scheme even when their browser says they want the dark one.</p>
<p dir="auto"><a href="https://github.com/user-attachments/assets/66ae2ce8-d30e-4361-af39-31c9d2a20aa8">image.png (view on web)</a><br>
<a href="https://github.com/user-attachments/assets/0256b9c5-f07e-4014-858e-c5a21d5c05d9">image.png (view on web)</a><br>
<a href="https://github.com/user-attachments/assets/45f4743a-d339-4183-aea7-3e840a8b67bc">image.png (view on web)</a></p>
<p dir="auto">Its on the <code class="notranslate">/preferences</code> page but it's not actually a preference stored in the <code class="notranslate">User</code> model. It's stored in a cookie. The question is do we want to store it in a cookie? Maybe we do because what browser reports as a preferred scheme is per browser, not per user, then perhaps its override should also be per browser. And it will be easier to extend the availability of this option to anonymous users. It is kind of available already, if they know how to edit cookies.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5337'>https://github.com/openstreetmap/openstreetmap-website/pull/5337</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/commits/e2a1498eb6cca4c9b87dee4f097d9395939dc48a" class="commit-link">e2a1498</a> Add auto/light color scheme stylesheets depending on cookies</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/commits/baac92a67e137e9a62cc346d4e4b466833bbbe1c" class="commit-link">baac92a</a> Show color scheme from cookies in preferences</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/commits/55f6a25859f66336668418db2389ad18a9eda041" class="commit-link">55f6a25</a> Add color scheme select to preferences form</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/commits/9c6d95c4204fe81545dd3f4cadcc721f0efed036" class="commit-link">9c6d95c</a> Store selected color scheme in cookies</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files">12 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-d2e82deee467e04b34fde66bc330f96ed2020aefc541445c1d576a56612ee71b">app/assets/stylesheets/parameters.scss</a>
(1)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-ac0e006d6c735d5a2ab366ae1afee94597cd3452383280ea6301fb4182cab28a">app/assets/stylesheets/screen-auto-ltr.scss</a>
(3)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-a8bd39c05ada0f84efd28e56b671f927234c5ecd6ba8c5415bf8535f3005cd2e">app/assets/stylesheets/screen-auto-rtl.rtlcss.scss</a>
(3)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-357548e47145bfbe125f5350bec08ee7d29de717be042455524f75812617eecd">app/assets/stylesheets/screen-light-ltr.scss</a>
(3)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-f24bff3219c717c0d3d41115bf0ce49c0edbaea18179804e0f5caff3faa130de">app/assets/stylesheets/screen-light-rtl.rtlcss.scss</a>
(3)
</li>
<li>
<strong>D</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-696de97d252c66e034ff8c9cf59ffb3675680e7c0d076468f43797273b7be118">app/assets/stylesheets/screen-ltr.scss</a>
(1)
</li>
<li>
<strong>D</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-8fc6c67a892f90f5336824019ace8ffb32c9d560a4bf8b76faf921858fc65230">app/assets/stylesheets/screen-rtl.rtlcss.scss</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-2ff63b142551396d9bd9b4246101b9473bc7cbc50f35ff36efdf01fe7dc7696c">app/controllers/preferences_controller.rb</a>
(3)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-be8f1d8caac1cf1a1c9cb4b0d463d6a89b19a833e289db8a9768457a3f63fa5f">app/views/layouts/_head.html.erb</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-15b1d78abba5c7bc2d2b6c6d79f05073fc20a9814670c28ea97e8ec51f8fd9d5">app/views/preferences/edit.html.erb</a>
(7)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-a495929ae8cf23fcea871e8aaa1bc52607a4e0f911f47d6bee5915e18d4a813e">app/views/preferences/show.html.erb</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(4)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5337.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5337.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5337.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5337.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5337">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNAMNLSGUTOM5T5Y432A5P5HAVCNFSM6AAAAABR45QB4GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DINJQHE2DKMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLXHYWGUUYWCTIUT7T2A5P5HA5CNFSM6AAAAABR45QB4GWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJ5UJQBI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5337</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5337",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5337",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>