From: Andy Allan Date: Wed, 13 Nov 2024 20:25:50 +0000 (+0000) Subject: Merge pull request #4761 from AntonKhorev:dark-mode-with-close-button X-Git-Tag: live~11 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ae00fa84c8f981e909c61ab31b6115bb96e859cc Merge pull request #4761 from AntonKhorev:dark-mode-with-close-button Enable dark theme if user prefers dark color scheme - no javascript version --- ae00fa84c8f981e909c61ab31b6115bb96e859cc diff --cc app/assets/stylesheets/common.scss index c4391be2d,307a990e4..c432bd848 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@@ -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 {