4 @import "rails_bootstrap_forms";
6 /* Styles common to large and small screens */
8 /* Default rules for the body of every page */
11 font-size: $typeheight;
12 --dark-mode-map-filter: none;
16 text-decoration: underline dotted;
22 display: inline-block;
26 background: transparent image-url("sprite.svg") no-repeat 0 0;
31 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
32 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
33 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
34 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
35 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
36 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
37 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
38 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
39 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
40 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
41 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
42 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
43 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
44 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
45 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
46 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
47 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
49 /* Utility for de-emphasizing content */
51 .text-body-secondary a {
55 /* Bootstrap contextual table classes overrides in dark mode */
57 @include color-mode(dark) {
59 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
62 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
65 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
67 .table-primary, .table-secondary, .table-success {
68 --bs-table-color: initial;
69 border-color: inherit;
73 /* Utility for delayed loading spinner */
76 animation: 300ms linear forwards delayed-fade-in;
79 @keyframes delayed-fade-in {
85 /* Bootstrap close button overrides for nested light/dark themes */
87 [data-bs-theme="dark"] .btn-close {
88 filter: var(--bs-btn-close-white-filter);
91 [data-bs-theme="light"] .btn-close {
95 /* Rules for the header */
102 background: image-url("menu-icon.svg") no-repeat;
103 background-size: 30px 30px;
106 margin: 14px 10px 0 0;
110 @include color-mode(dark) {
117 height: $headerHeight;
122 padding: $lineheight * 0.5;
126 height: $headerHeight;
140 #edit_tab .btn-outline-primary {
141 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
145 .btn-outline-primary {
150 border-top-color: $grey;
154 background-color: lighten($green, 30%);
159 // Small tweaks to the toggle to stop the primary colour showing through
160 // when the menu is shown
161 .show > .btn-outline-primary.dropdown-toggle {
162 background-color: $green;
163 border-color: $green;
166 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
181 nav.primary, nav.secondary {
184 background-color: $green;
190 #compact-secondary-nav {
200 flex-direction: column;
202 min-height: $headerHeight;
205 display: none !important;
217 #sidebar .search_forms {
232 flex-direction: column;
236 justify-content: center;
239 .user-menu, .login-menu {
244 #compact-secondary-nav {
249 display: inline-block;
252 .overlay-sidebar #sidebar .welcome {
256 .overlay-sidebar #sidebar #banner {
261 /* Utility for styling notification numbers */
264 background: transparentize(lighten($green, 25%), .25);
266 font-weight: $font-weight-normal;
269 /* Rules for Leaflet maps */
271 .leaflet-top.leaflet-right,
272 .leaflet-top.leaflet-left {
276 flex-direction: column;
277 flex-wrap: wrap-reverse;
280 .leaflet-control .control-button {
284 background-color: #333;
285 background-color: rgba(0,0,0,.6);
290 background-color: black;
295 background-color: #333;
296 background-color: rgba(0,0,0,.5);
301 background-color: $vibrant-green;
305 border-start-start-radius: 4px;
309 border-end-start-radius: 4px;
318 /* Rules for the sidebar and main map area */
338 width: $sidebarWidth;
341 .overlay-sidebar #sidebar {
369 width: $sidebarWidth;
385 .leaflet-marker-draggable {
390 animation: 1500ms forwards query-marker-fade;
392 @keyframes query-marker-fade {
408 @include media-breakpoint-down(md) {
423 .overlay-sidebar.overlay-right-sidebar {
443 box-sizing: content-box;
444 top: - map.get($border-widths, 4);
445 left: - map.get($border-widths, 4);
446 --bs-btn-border-color: var(--bs-body-bg);
449 --bs-btn-border-color: var(--bs-primary-border-subtle);
454 li.disabled { color: $darkgrey; }
465 top: 10px !important;
467 margin-right: 0px !important;
468 margin-top: 0px !important;
472 .leaflet-popup-scrolled {
473 padding-right: $lineheight;
474 border-bottom: 0px !important;
475 border-top: 0px !important;
478 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
479 .leaflet-contextmenu, .leaflet-contextmenu-item,
480 .leaflet-control-attribution, .leaflet-control-scale-line {
481 @extend .bg-body, .text-body;
484 .leaflet-control-attribution, .leaflet-control-scale-line {
485 @extend .bg-opacity-75;
486 text-shadow: none !important;
489 .leaflet-contextmenu-item.over {
490 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
493 .leaflet-popup-content-wrapper {
497 color: var(--bs-link-color) !important;
501 @include color-mode(dark) {
502 .leaflet-container .leaflet-control-attribution a {
503 color: var(--bs-link-color);
506 .leaflet-control-scale-line {
507 border-color: rgba(var(--bs-light-rgb), .75) !important;
511 @mixin dark-map-color-scheme {
512 .leaflet-tile-container,
513 .mapkey-table-entry td:first-child > * {
514 filter: var(--dark-mode-map-filter);
517 .leaflet-tile-container .leaflet-tile {
522 body[data-map-theme="dark"] {
523 @include dark-map-color-scheme;
526 @include color-mode(dark) {
527 body:not([data-map-theme]) {
528 @include dark-map-color-scheme;
532 /* Rules for attribution text under the main map shown on printouts */
534 .donate-attr { color: darken($green, 10%) !important; }
536 /* Temporary label size override until we remove site-wide font customisation */
547 /* Stop bootstrap 5 from floating legends when they don't need to be */
552 /* Override the text colour for primary and secondary buttons, to match our
553 bootstrap 4 colours. Note this has accessibility issues, which is why
554 bootstrap 5 calculates black as the appropriate colour, and we should
555 reconsider our colours at some point with that in mind. */
558 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
562 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
565 .btn-outline-secondary {
566 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
569 /* Rules for the search and direction forms */
571 header .search_forms,
582 /* Rules for search sidebar */
584 #sidebar .search_results_entry {
585 .search_more .loader {
590 /* Rules for routing */
593 background-image: image-url('routing-sprite.svg');
596 background-repeat: no-repeat;
598 @for $i from 0 through 25 {
599 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
602 @include color-mode(dark) {
615 .routing_marker_column {
623 /* Rules for the history sidebar */
625 #sidebar .changesets {
631 a.stretched-link > span, a:not(.stretched-link), [title] {
633 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
637 .changeset_more .loader {
643 /* Rules for the browse sidebar */
647 padding-bottom: $spacer;
648 margin-bottom: $spacer;
649 border-bottom: 1px solid $grey;
652 word-wrap: break-word;
656 .browse-section:last-of-type {
662 white-space: pre-wrap;
663 word-wrap: break-word;
664 word-break: break-word;
666 tr:last-child th, tr:last-child td {
676 /* Force LTR/RTL alignment for placeholder text */
678 .form-control::placeholder {
682 /* Rules for export sidebar */
685 .export_area_inputs {
696 /*rtl:ignore*/ float: left;
699 /*rtl:ignore*/ float: right;
704 /* Rules for edit pages */
715 /* Rules for non-map content pages */
721 padding: $lineheight;
724 /* Rules for login and signup pages */
726 .sessions-new, .users-new, .users-create {
727 #content .content-inner {
732 .header-illustration {
733 background-position: right;
734 background-repeat: no-repeat;
742 background-image: image-url("sign-up-illustration.svg");
743 background-position-x: 70px;
747 background-image: image-url("confirm-illustration.svg");
751 background-image: image-url("terms-illustration.svg");
755 [dir=rtl] .header-illustration {
756 transform: scaleX(-1);
759 transform: scaleX(-1);
763 transform: scaleX(-1);
767 /* Rules for small maps in content areas */
771 margin-bottom: $lineheight;
774 @include media-breakpoint-up(md) {
780 /* Rules for the user map */
782 .content_map .leaflet-popup-content {
787 /* Rules for user popups on maps */
797 /* Rules for the diary entry page */
804 .diary-comment .col-auto {
807 .diary-comment .col {
812 /* Rules for the issues page */
814 .issues.issues-index {
820 /* Rules for the account confirmation page */
822 .accounts-terms-show {
824 padding: $lineheight;
825 margin-bottom: $lineheight;
834 list-style-type: lower-alpha;
839 /* Rules for user images */
851 img.user_thumbnail_tiny {
857 /* General styles for action lists / subnavs */
859 nav.secondary-actions {
872 border-left: 1px solid $grey;
873 padding-left: $lineheight * 0.5;
874 margin-right: $lineheight * 0.5;
875 margin-bottom: $lineheight * 0.125;
880 div.secondary-actions {
885 /* Rules for rich text */
889 background: var(--bs-secondary-bg);
894 background: var(--bs-secondary-bg);
896 white-space: pre-wrap;
904 padding: $lineheight;
905 background-color: var(--bs-tertiary-bg);
912 border-left: $lineheight solid var(--bs-tertiary-bg);
913 padding-left: $lineheight;
915 color: var(--bs-secondary-color);
919 /* Rules for the "About" page */
921 .site-about #content {
931 color: $vibrant-green;
937 background-position: 0 50%;
938 background-repeat: no-repeat;
939 background-image: image-url('about/osm.png');
940 background-size: cover;
941 background-color: $vibrant-green;
945 background: $vibrant-green;
949 display: inline-block;
956 /* Rules for tables with usernames */
958 .messages-table .username,
959 #block_list .username {
963 /* Rules for navigation tabs */
965 .nav-tabs .username {
969 .bg-body-secondary .nav-tabs {
970 --bs-border-color: var(--bs-secondary-border-subtle);
971 --bs-secondary-bg: var(--bs-secondary-border-subtle);
975 /* Rules for traces */
978 mix-blend-mode: darken;
981 @include color-mode(dark) {
984 mix-blend-mode: lighten;
988 /* Rules for map sidebar icons */
990 .browse-section .browse-element-list {
991 line-height: 1.25rem;
997 .d-flex > .browse-icon {
998 height: max(20px, 1.25rem);
1001 @include color-mode(dark) {
1002 .browse-icon-invertible {
1003 filter: invert(.8) hue-rotate(180deg);