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: brightness(.8);
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;
144 #edit_tab .btn-outline-primary {
145 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
149 .btn-outline-primary {
154 border-top-color: $grey;
158 background-color: lighten($green, 30%);
163 // Small tweaks to the toggle to stop the primary colour showing through
164 // when the menu is shown
165 .show > .btn-outline-primary.dropdown-toggle {
166 background-color: $green;
167 border-color: $green;
170 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 {
195 #compact-secondary-nav {
196 display: inline-block;
209 flex-direction: column;
211 min-height: $headerHeight;
214 display: none !important;
226 #sidebar .search_forms {
241 flex-direction: column;
243 .user-menu, .login-menu {
248 #compact-secondary-nav {
253 display: inline-block;
256 .overlay-sidebar #sidebar .welcome {
260 .overlay-sidebar #sidebar #banner {
265 /* Utility for styling notification numbers */
268 background: transparentize(lighten($green, 25%), .25);
270 font-weight: $font-weight-normal;
273 /* Rules for Leaflet maps */
275 .leaflet-top.leaflet-right,
276 .leaflet-top.leaflet-left {
280 flex-direction: column;
281 flex-wrap: wrap-reverse;
284 .leaflet-control .control-button {
288 background-color: #333;
289 background-color: rgba(0,0,0,.6);
294 background-color: black;
299 background-color: #333;
300 background-color: rgba(0,0,0,.5);
305 background-color: $vibrant-green;
309 border-start-start-radius: 4px;
313 border-end-start-radius: 4px;
322 /* Rules for the sidebar and main map area */
342 width: $sidebarWidth;
349 .overlay-sidebar #sidebar {
376 width: $sidebarWidth;
392 .leaflet-marker-draggable {
397 animation: 1500ms forwards query-marker-fade;
399 @keyframes query-marker-fade {
415 @include media-breakpoint-down(md) {
430 .overlay-sidebar.overlay-right-sidebar {
450 box-sizing: content-box;
451 top: - map.get($border-widths, 4);
452 left: - map.get($border-widths, 4);
453 --bs-btn-border-color: var(--bs-body-bg);
456 --bs-btn-border-color: var(--bs-primary-border-subtle);
461 li.disabled { color: $darkgrey; }
472 top: 10px !important;
474 margin-right: 0px !important;
475 margin-top: 0px !important;
479 .leaflet-popup-scrolled {
480 padding-right: $lineheight;
481 border-bottom: 0px !important;
482 border-top: 0px !important;
485 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
486 .leaflet-contextmenu, .leaflet-contextmenu-item,
487 .leaflet-control-attribution, .leaflet-control-scale-line {
488 @extend .bg-body, .text-body;
491 .leaflet-control-attribution, .leaflet-control-scale-line {
492 @extend .bg-opacity-75;
493 text-shadow: none !important;
496 .leaflet-contextmenu-item.over {
497 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
500 .leaflet-popup-content-wrapper {
504 color: var(--bs-link-color) !important;
508 @include color-mode(dark) {
509 .leaflet-container .leaflet-control-attribution a {
510 color: var(--bs-link-color);
513 .leaflet-control-scale-line {
514 border-color: rgba(var(--bs-light-rgb), .75) !important;
518 @mixin dark-map-color-scheme {
519 .leaflet-tile-container,
520 .mapkey-table-entry td:first-child > * {
521 filter: var(--dark-mode-map-filter);
524 .leaflet-tile-container .leaflet-tile {
529 body[data-map-theme="dark"] {
530 @include dark-map-color-scheme;
533 @include color-mode(dark) {
534 body:not([data-map-theme]) {
535 @include dark-map-color-scheme;
539 /* Rules for attribution text under the main map shown on printouts */
541 .donate-attr { color: darken($green, 10%) !important; }
543 /* Temporary label size override until we remove site-wide font customisation */
554 /* Stop bootstrap 5 from floating legends when they don't need to be */
559 /* Override the text colour for primary and secondary buttons, to match our
560 bootstrap 4 colours. Note this has accessibility issues, which is why
561 bootstrap 5 calculates black as the appropriate colour, and we should
562 reconsider our colours at some point with that in mind. */
565 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
569 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
572 .btn-outline-secondary {
573 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
576 /* Rules for the search and direction forms */
578 header .search_forms,
589 /* Rules for search sidebar */
591 #sidebar .search_results_entry {
592 .search_more .loader {
597 /* Rules for routing */
600 background-image: image-url('routing-sprite.svg');
603 background-repeat: no-repeat;
605 @for $i from 0 through 25 {
606 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
609 @include color-mode(dark) {
622 .routing_marker_column {
630 /* Rules for the history sidebar */
632 #sidebar .changesets {
638 a.stretched-link > span, a:not(.stretched-link), [title] {
640 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
644 .changeset_more .loader {
650 /* Rules for the browse sidebar */
654 padding-bottom: $spacer;
655 margin-bottom: $spacer;
656 border-bottom: 1px solid $grey;
659 word-wrap: break-word;
663 .browse-section:last-of-type {
669 white-space: pre-wrap;
670 word-wrap: break-word;
671 word-break: break-word;
673 tr:last-child th, tr:last-child td {
683 /* Force LTR/RTL alignment for placeholder text */
685 .form-control::placeholder {
689 /* Rules for export sidebar */
692 .export_area_inputs {
703 /*rtl:ignore*/ float: left;
706 /*rtl:ignore*/ float: right;
711 /* Rules for edit pages */
722 /* Rules for non-map content pages */
728 padding: $lineheight;
731 /* Rules for login and signup pages */
733 .sessions-new, .users-new, .users-create {
734 #content .content-inner {
739 .header-illustration {
740 background-position: right;
741 background-repeat: no-repeat;
749 background-image: image-url("sign-up-illustration.svg");
750 background-position-x: 70px;
754 background-image: image-url("confirm-illustration.svg");
758 background-image: image-url("terms-illustration.svg");
762 [dir=rtl] .header-illustration {
763 transform: scaleX(-1);
766 transform: scaleX(-1);
770 transform: scaleX(-1);
774 /* Rules for small maps in content areas */
778 margin-bottom: $lineheight;
781 @include media-breakpoint-up(md) {
787 /* Rules for the user map */
789 .content_map .leaflet-popup-content {
794 /* Rules for user popups on maps */
804 /* Rules for the diary entry page */
811 .diary-comment .col-auto {
814 .diary-comment .col {
819 /* Rules for the account confirmation page */
823 padding: $lineheight;
824 margin-bottom: $lineheight;
833 list-style-type: lower-alpha;
838 /* Rules for user images */
850 img.user_thumbnail_tiny {
856 /* General styles for action lists / subnavs */
858 nav.secondary-actions {
871 border-left: 1px solid $grey;
872 padding-left: $lineheight * 0.5;
873 margin-right: $lineheight * 0.5;
874 margin-bottom: $lineheight * 0.125;
879 div.secondary-actions {
884 /* Rules for rich text */
888 background: var(--bs-secondary-bg);
893 background: var(--bs-secondary-bg);
895 white-space: pre-wrap;
903 padding: $lineheight;
904 background-color: var(--bs-tertiary-bg);
911 border-left: $lineheight solid var(--bs-tertiary-bg);
912 padding-left: $lineheight;
914 color: var(--bs-secondary-color);
918 /* Rules for the "About" page */
920 .site-about #content {
930 color: $vibrant-green;
936 background-position: 0 50%;
937 background-repeat: no-repeat;
938 background-image: image-url('about/osm.png');
939 background-size: cover;
940 background-color: $vibrant-green;
944 background: $vibrant-green;
948 display: inline-block;
955 /* Rules for tables with usernames */
957 .messages-table .username,
958 #block_list .username {
962 /* Rules for navigation tabs */
964 .nav-tabs .username {
968 .bg-body-secondary .nav-tabs {
969 --bs-border-color: var(--bs-secondary-border-subtle);
970 --bs-secondary-bg: var(--bs-secondary-border-subtle);
974 /* Rules for traces */
977 mix-blend-mode: darken;
980 @include color-mode(dark) {
983 mix-blend-mode: lighten;
987 /* Rules for map sidebar icons */
989 .browse-section .browse-element-list {
990 line-height: 1.25rem;
996 .d-flex > .browse-icon {
997 height: max(20px, 1.25rem);
1000 @include color-mode(dark) {
1001 .browse-icon-invertible {
1002 filter: invert(.8) hue-rotate(180deg);