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 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
37 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
38 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
39 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
40 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
41 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
42 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
43 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
44 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
45 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
46 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
48 /* Utility for de-emphasizing content */
50 .text-body-secondary a {
54 /* Bootstrap contextual table classes overrides in dark mode */
56 @include color-mode(dark) {
58 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
61 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
64 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
66 .table-primary, .table-secondary, .table-success {
67 --bs-table-color: initial;
68 border-color: inherit;
72 /* Utility for delayed loading spinner */
75 animation: 300ms linear forwards delayed-fade-in;
78 @keyframes delayed-fade-in {
84 /* Bootstrap close button overrides for nested light/dark themes */
86 [data-bs-theme="dark"],
87 [data-bs-theme] [data-bs-theme="dark"] {
88 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
91 [data-bs-theme="light"],
92 [data-bs-theme] [data-bs-theme="light"] {
93 --bs-btn-close-filter: none;
96 /* Rules for the header */
103 background: image-url("menu-icon.svg") no-repeat;
104 background-size: 30px 30px;
107 margin: 14px 10px 0 0;
111 @include color-mode(dark) {
118 height: $headerHeight;
123 padding: $lineheight * 0.5;
127 height: $headerHeight;
141 #edit_tab .btn-outline-primary {
142 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
146 .btn-outline-primary {
151 border-top-color: $grey;
155 background-color: lighten($green, 30%);
160 // Small tweaks to the toggle to stop the primary colour showing through
161 // when the menu is shown
162 .show > .btn-outline-primary.dropdown-toggle {
163 background-color: $green;
164 border-color: $green;
167 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
182 nav.primary, nav.secondary {
185 background-color: $green;
191 #compact-secondary-nav {
201 flex-direction: column;
203 min-height: $headerHeight;
206 display: none !important;
218 #sidebar .search_forms {
233 flex-direction: column;
237 justify-content: center;
240 .user-menu, .login-menu {
245 #compact-secondary-nav {
250 display: inline-block;
253 .overlay-sidebar #sidebar .welcome {
257 .overlay-sidebar #sidebar #banner {
262 /* Utility for styling notification numbers */
265 background: transparentize(lighten($green, 25%), .25);
267 font-weight: $font-weight-normal;
270 /* Rules for Leaflet maps */
272 .leaflet-top.leaflet-right,
273 .leaflet-top.leaflet-left {
277 flex-direction: column;
278 flex-wrap: wrap-reverse;
281 .leaflet-control .control-button {
285 background-color: #333;
286 background-color: rgba(0,0,0,.6);
291 background-color: black;
296 background-color: #333;
297 background-color: rgba(0,0,0,.5);
302 border-start-start-radius: 4px;
306 border-end-start-radius: 4px;
315 .leaflet-control.active .control-button {
316 background-color: $vibrant-green;
319 /* Rules for the sidebar and main map area */
339 width: $sidebarWidth;
342 .overlay-sidebar #sidebar {
355 .sidebar-close-controls,
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 routing */
593 .routing_marker_column {
595 margin-right: .35rem;
603 /* Rules for the history sidebar */
605 .changeset-above-sidebar-viewport {
606 --changeset-border-color: #CC6655;
607 --changeset-fill-color: #DDBBBB;
608 --changeset-outline-color: #FFF4F4;
610 .changeset-in-sidebar-viewport {
611 --changeset-border-color: #FF9500;
612 &.changeset-highlighted {
613 --changeset-border-color: #FF6600;
615 --changeset-fill-color: #FFFFAF;
616 --changeset-outline-color: #FFFFFF;
618 .changeset-below-sidebar-viewport {
619 --changeset-border-color: #8888AA;
620 --changeset-fill-color: #CCCCDD;
621 --changeset-outline-color: #F4F4FF;
624 #sidebar .changesets {
625 .changeset-color-hint-bar {
627 background: var(--changeset-border-color);
635 a.stretched-link > span, a:not(.stretched-link), [title] {
637 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
642 /* Rules for the browse sidebar */
646 padding-bottom: $spacer;
647 margin-bottom: $spacer;
648 border-bottom: 1px solid $grey;
651 word-wrap: break-word;
655 .browse-section:last-of-type {
661 white-space: pre-wrap;
662 word-wrap: break-word;
663 word-break: break-word;
665 tr:last-child th, tr:last-child td {
675 /* Force LTR/RTL alignment for placeholder text */
677 .form-control::placeholder {
681 /* Rules for export sidebar */
684 .export_area_inputs {
697 /* Rules for edit pages */
708 /* Rules for non-map content pages */
712 padding: $lineheight;
715 /* Rules for login and signup pages */
717 .sessions-new, .users-new, .users-create {
718 #content .content-inner {
723 .header-illustration {
724 background-position: right;
725 background-repeat: no-repeat;
733 background-image: image-url("sign-up-illustration.svg");
734 background-position-x: 70px;
738 background-image: image-url("confirm-illustration.svg");
742 background-image: image-url("terms-illustration.svg");
746 [dir=rtl] .header-illustration {
747 transform: scaleX(-1);
750 transform: scaleX(-1);
754 transform: scaleX(-1);
758 /* Rules for small maps in content areas */
762 margin-bottom: $lineheight;
765 @include media-breakpoint-up(md) {
771 /* Rules for the user map */
773 .content_map .leaflet-popup-content {
778 /* Rules for user popups on maps */
788 /* Rules for the diary entry page */
795 .diary-comment .col-auto {
798 .diary-comment .col {
803 /* Rules for the issues page */
805 .issues.issues-index {
811 /* Rules for the account confirmation page */
813 .accounts-terms-show {
815 padding: $lineheight;
816 margin-bottom: $lineheight;
825 list-style-type: lower-alpha;
830 /* Rules for user images */
842 img.user_thumbnail_tiny {
848 /* General styles for action lists / subnavs */
850 nav.secondary-actions {
863 border-left: 1px solid $grey;
864 padding-left: $lineheight * 0.5;
865 margin-right: $lineheight * 0.5;
866 margin-bottom: $lineheight * 0.125;
871 div.secondary-actions {
876 /* Rules for rich text */
880 background: var(--bs-secondary-bg);
885 background: var(--bs-secondary-bg);
887 white-space: pre-wrap;
895 padding: $lineheight;
896 background-color: var(--bs-tertiary-bg);
903 border-left: $lineheight solid var(--bs-tertiary-bg);
904 padding-left: $lineheight;
906 color: var(--bs-secondary-color);
910 /* Rules for the "About" page */
912 .site-about #content {
922 color: $vibrant-green;
928 background-position: 0 50%;
929 background-repeat: no-repeat;
930 background-image: image-url('about/osm.png');
931 background-size: cover;
932 background-color: $vibrant-green;
936 background: $vibrant-green;
940 display: inline-block;
947 /* Rules for tables with usernames */
949 .messages-table .username,
950 #block_list .username {
954 /* Rules for navigation tabs */
956 .nav-tabs .username {
960 .bg-body-secondary .nav-tabs {
961 --bs-border-color: var(--bs-secondary-border-subtle);
962 --bs-secondary-bg: var(--bs-secondary-border-subtle);
966 /* Rules for traces */
969 mix-blend-mode: darken;
972 @include color-mode(dark) {
975 mix-blend-mode: lighten;
979 /* Rules for map sidebar icons */
981 .browse-section .browse-element-list {
982 line-height: 1.25rem;
988 .d-flex > .browse-icon {
989 height: max(20px, 1.25rem);
992 @include color-mode(dark) {
993 .browse-icon-invertible {
994 filter: invert(.8) hue-rotate(180deg);