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;
238 .user-menu, .login-menu {
243 #compact-secondary-nav {
248 display: inline-block;
251 .overlay-sidebar #sidebar .welcome {
255 .overlay-sidebar #sidebar #banner {
260 /* Utility for styling notification numbers */
263 background: transparentize(lighten($green, 25%), .25);
265 font-weight: $font-weight-normal;
268 /* Rules for Leaflet maps */
270 .leaflet-top.leaflet-right,
271 .leaflet-top.leaflet-left {
275 flex-direction: column;
276 flex-wrap: wrap-reverse;
279 .leaflet-control .control-button {
283 background-color: #333;
284 background-color: rgba(0,0,0,.6);
289 background-color: black;
294 background-color: #333;
295 background-color: rgba(0,0,0,.5);
300 background-color: $vibrant-green;
304 border-start-start-radius: 4px;
308 border-end-start-radius: 4px;
317 /* Rules for the sidebar and main map area */
337 width: $sidebarWidth;
344 .overlay-sidebar #sidebar {
371 width: $sidebarWidth;
387 .leaflet-marker-draggable {
392 animation: 1500ms forwards query-marker-fade;
394 @keyframes query-marker-fade {
410 @include media-breakpoint-down(md) {
425 .overlay-sidebar.overlay-right-sidebar {
445 box-sizing: content-box;
446 top: - map.get($border-widths, 4);
447 left: - map.get($border-widths, 4);
448 --bs-btn-border-color: var(--bs-body-bg);
451 --bs-btn-border-color: var(--bs-primary-border-subtle);
456 li.disabled { color: $darkgrey; }
467 top: 10px !important;
469 margin-right: 0px !important;
470 margin-top: 0px !important;
474 .leaflet-popup-scrolled {
475 padding-right: $lineheight;
476 border-bottom: 0px !important;
477 border-top: 0px !important;
480 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
481 .leaflet-contextmenu, .leaflet-contextmenu-item,
482 .leaflet-control-attribution, .leaflet-control-scale-line {
483 @extend .bg-body, .text-body;
486 .leaflet-control-attribution, .leaflet-control-scale-line {
487 @extend .bg-opacity-75;
488 text-shadow: none !important;
491 .leaflet-contextmenu-item.over {
492 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
495 .leaflet-popup-content-wrapper {
499 color: var(--bs-link-color) !important;
503 @include color-mode(dark) {
504 .leaflet-container .leaflet-control-attribution a {
505 color: var(--bs-link-color);
508 .leaflet-control-scale-line {
509 border-color: rgba(var(--bs-light-rgb), .75) !important;
513 @mixin dark-map-color-scheme {
514 .leaflet-tile-container,
515 .mapkey-table-entry td:first-child > * {
516 filter: var(--dark-mode-map-filter);
519 .leaflet-tile-container .leaflet-tile {
524 body[data-map-theme="dark"] {
525 @include dark-map-color-scheme;
528 @include color-mode(dark) {
529 body:not([data-map-theme]) {
530 @include dark-map-color-scheme;
534 /* Rules for attribution text under the main map shown on printouts */
536 .donate-attr { color: darken($green, 10%) !important; }
538 /* Temporary label size override until we remove site-wide font customisation */
549 /* Stop bootstrap 5 from floating legends when they don't need to be */
554 /* Override the text colour for primary and secondary buttons, to match our
555 bootstrap 4 colours. Note this has accessibility issues, which is why
556 bootstrap 5 calculates black as the appropriate colour, and we should
557 reconsider our colours at some point with that in mind. */
560 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
564 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
567 .btn-outline-secondary {
568 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
571 /* Rules for the search and direction forms */
573 header .search_forms,
584 /* Rules for search sidebar */
586 #sidebar .search_results_entry {
587 .search_more .loader {
592 /* Rules for routing */
595 background-image: image-url('routing-sprite.svg');
598 background-repeat: no-repeat;
600 @for $i from 0 through 25 {
601 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
604 @include color-mode(dark) {
617 .routing_marker_column {
625 /* Rules for the history sidebar */
627 #sidebar .changesets {
633 a.stretched-link > span, a:not(.stretched-link), [title] {
635 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
639 .changeset_more .loader {
645 /* Rules for the browse sidebar */
649 padding-bottom: $spacer;
650 margin-bottom: $spacer;
651 border-bottom: 1px solid $grey;
654 word-wrap: break-word;
658 .browse-section:last-of-type {
664 white-space: pre-wrap;
665 word-wrap: break-word;
666 word-break: break-word;
668 tr:last-child th, tr:last-child td {
678 /* Force LTR/RTL alignment for placeholder text */
680 .form-control::placeholder {
684 /* Rules for export sidebar */
687 .export_area_inputs {
698 /*rtl:ignore*/ float: left;
701 /*rtl:ignore*/ float: right;
706 /* Rules for edit pages */
717 /* Rules for non-map content pages */
723 padding: $lineheight;
726 /* Rules for login and signup pages */
728 .sessions-new, .users-new, .users-create {
729 #content .content-inner {
734 .header-illustration {
735 background-position: right;
736 background-repeat: no-repeat;
744 background-image: image-url("sign-up-illustration.svg");
745 background-position-x: 70px;
749 background-image: image-url("confirm-illustration.svg");
753 background-image: image-url("terms-illustration.svg");
757 [dir=rtl] .header-illustration {
758 transform: scaleX(-1);
761 transform: scaleX(-1);
765 transform: scaleX(-1);
769 /* Rules for small maps in content areas */
773 margin-bottom: $lineheight;
776 @include media-breakpoint-up(md) {
782 /* Rules for the user map */
784 .content_map .leaflet-popup-content {
789 /* Rules for user popups on maps */
799 /* Rules for the diary entry page */
806 .diary-comment .col-auto {
809 .diary-comment .col {
814 /* Rules for the issues page */
816 .issues.issues-index {
822 /* Rules for the account confirmation page */
824 .accounts-terms-show {
826 padding: $lineheight;
827 margin-bottom: $lineheight;
836 list-style-type: lower-alpha;
841 /* Rules for user images */
853 img.user_thumbnail_tiny {
859 /* General styles for action lists / subnavs */
861 nav.secondary-actions {
874 border-left: 1px solid $grey;
875 padding-left: $lineheight * 0.5;
876 margin-right: $lineheight * 0.5;
877 margin-bottom: $lineheight * 0.125;
882 div.secondary-actions {
887 /* Rules for rich text */
891 background: var(--bs-secondary-bg);
896 background: var(--bs-secondary-bg);
898 white-space: pre-wrap;
906 padding: $lineheight;
907 background-color: var(--bs-tertiary-bg);
914 border-left: $lineheight solid var(--bs-tertiary-bg);
915 padding-left: $lineheight;
917 color: var(--bs-secondary-color);
921 /* Rules for the "About" page */
923 .site-about #content {
933 color: $vibrant-green;
939 background-position: 0 50%;
940 background-repeat: no-repeat;
941 background-image: image-url('about/osm.png');
942 background-size: cover;
943 background-color: $vibrant-green;
947 background: $vibrant-green;
951 display: inline-block;
958 /* Rules for tables with usernames */
960 .messages-table .username,
961 #block_list .username {
965 /* Rules for navigation tabs */
967 .nav-tabs .username {
971 .bg-body-secondary .nav-tabs {
972 --bs-border-color: var(--bs-secondary-border-subtle);
973 --bs-secondary-bg: var(--bs-secondary-border-subtle);
977 /* Rules for traces */
980 mix-blend-mode: darken;
983 @include color-mode(dark) {
986 mix-blend-mode: lighten;
990 /* Rules for map sidebar icons */
992 .browse-section .browse-element-list {
993 line-height: 1.25rem;
999 .d-flex > .browse-icon {
1000 height: max(20px, 1.25rem);
1003 @include color-mode(dark) {
1004 .browse-icon-invertible {
1005 filter: invert(.8) hue-rotate(180deg);