]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #4761 from AntonKhorev:dark-mode-with-close-button
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Nov 2024 20:25:50 +0000 (20:25 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Nov 2024 20:26:47 +0000 (20:26 +0000)
Enable dark theme if user prefers dark color scheme - no javascript version

1  2 
app/assets/stylesheets/common.scss

index c4391be2d1f8084b1ec63573fd8934db2becefd8,307a990e40d9f0f4ecbb0c58821df92a1b92279f..c432bd848d3e9cc907210e8443f28c05a8843b0e
@@@ -70,18 -72,16 +70,28 @@@ time[title] 
    }
  }
  
 +/* Utility for delayed loading spinner */
 +
 +.delayed-fade-in {
 +  animation: 300ms linear forwards delayed-fade-in;
 +}
 +
 +@keyframes delayed-fade-in {
 +  0%   { opacity: 0 }
 +  66%  { opacity: 0 }
 +  100% { opacity: 1 }
 +}
 +
+ /* Bootstrap close button overrides for nested light/dark themes */
+ [data-bs-theme="dark"] .btn-close {
+   filter: var(--bs-btn-close-white-filter);
+ }
+ [data-bs-theme="light"] .btn-close {
+   filter: none;
+ }
  /* Rules for the header */
  
  #menu-icon {