5 @import "rails_bootstrap_forms";
7 /* Styles common to large and small screens */
9 /* Default rules for the body of every page */
12 font-size: $typeheight;
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;
222 #sidebar .search_forms {
237 flex-direction: column;
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;
345 .overlay-sidebar #sidebar {
372 width: $sidebarWidth;
388 .leaflet-marker-draggable {
393 animation: 1500ms forwards query-marker-fade;
395 @keyframes query-marker-fade {
411 @include media-breakpoint-down(md) {
426 .overlay-sidebar.overlay-right-sidebar {
446 box-sizing: content-box;
447 top: - map.get($border-widths, 4);
448 left: - map.get($border-widths, 4);
449 --bs-btn-border-color: var(--bs-body-bg);
452 --bs-btn-border-color: var(--bs-primary-border-subtle);
457 li.disabled { color: $darkgrey; }
468 top: 10px !important;
470 margin-right: 0px !important;
471 margin-top: 0px !important;
475 .leaflet-popup-scrolled {
476 padding-right: $lineheight;
477 border-bottom: 0px !important;
478 border-top: 0px !important;
481 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
482 .leaflet-contextmenu, .leaflet-contextmenu-item,
483 .leaflet-control-attribution, .leaflet-control-scale-line {
484 @extend .bg-body, .text-body;
487 .leaflet-control-attribution, .leaflet-control-scale-line {
488 @extend .bg-opacity-75;
489 text-shadow: none !important;
492 .leaflet-contextmenu-item.over {
493 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
496 .leaflet-popup-content-wrapper {
500 color: var(--bs-link-color) !important;
504 @include color-mode(dark) {
505 .leaflet-container .leaflet-control-attribution a {
506 color: var(--bs-link-color);
509 .leaflet-control-scale-line {
510 border-color: rgba(var(--bs-light-rgb), .75) !important;
514 @mixin dark-map-color-scheme {
515 .leaflet-tile-container .leaflet-tile,
516 .mapkey-table-entry td:first-child > * {
517 filter: brightness(.8);
521 body[data-map-theme="dark"] {
522 @include dark-map-color-scheme;
525 @include color-mode(dark) {
526 body:not([data-map-theme]) {
527 @include dark-map-color-scheme;
531 /* Rules for attribution text under the main map shown on printouts */
533 .donate-attr { color: darken($green, 10%) !important; }
535 /* Temporary label size override until we remove site-wide font customisation */
546 /* Stop bootstrap 5 from floating legends when they don't need to be */
551 /* Override the text colour for primary and secondary buttons, to match our
552 bootstrap 4 colours. Note this has accessibility issues, which is why
553 bootstrap 5 calculates black as the appropriate colour, and we should
554 reconsider our colours at some point with that in mind. */
557 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
561 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
564 .btn-outline-secondary {
565 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
568 /* Rules for the search and direction forms */
570 header .search_forms,
581 /* Rules for search sidebar */
583 #sidebar .search_results_entry {
584 .search_more .loader {
589 /* Rules for routing */
592 background-image: image-url('routing-sprite.svg');
595 background-repeat: no-repeat;
597 @for $i from 0 through 25 {
598 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
601 @include color-mode(dark) {
614 .routing_marker_column {
622 /* Rules for the history sidebar */
624 #sidebar .changesets {
630 a.stretched-link > span, a:not(.stretched-link), [title] {
632 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
636 .changeset_more .loader {
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 {
695 /*rtl:ignore*/ float: left;
698 /*rtl:ignore*/ float: right;
703 /* Rules for edit pages */
714 /* Rules for non-map content pages */
720 padding: $lineheight;
723 /* Rules for login and signup pages */
725 .sessions-new, .users-new, .users-create {
726 #content .content-inner {
731 .header-illustration {
732 background-position: right;
733 background-repeat: no-repeat;
741 background-image: image-url("sign-up-illustration.svg");
742 background-position-x: 70px;
746 background-image: image-url("confirm-illustration.svg");
750 background-image: image-url("terms-illustration.svg");
754 [dir=rtl] .header-illustration {
755 transform: scaleX(-1);
758 transform: scaleX(-1);
762 transform: scaleX(-1);
766 /* Rules for small maps in content areas */
770 margin-bottom: $lineheight;
773 @include media-breakpoint-up(md) {
779 /* Rules for the user map */
781 .content_map .leaflet-popup-content {
786 /* Rules for user popups on maps */
796 /* Rules for the diary entry page */
803 .diary-comment .col-auto {
806 .diary-comment .col {
811 /* Rules for the account confirmation page */
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 block pages */
949 #block_list .username {
953 /* Rules for tabs inside secondary background sections */
955 .bg-body-secondary .nav-tabs {
956 --bs-border-color: var(--bs-secondary-border-subtle);
957 --bs-secondary-bg: var(--bs-secondary-border-subtle);
961 /* Rules for traces */
964 mix-blend-mode: darken;
967 @include color-mode(dark) {
970 mix-blend-mode: lighten;
974 /* Rules for map sidebar icons */
980 display: inline-block;
985 .node, .way, .relation {
989 .node::before { content: image-url('browse/node.svg'); }
990 .way::before { content: image-url('browse/way.svg'); }
991 .relation::before { content: image-url('browse/relation.svg'); }
994 @each $class, $item in $map-sidebar-icons {
995 .browse-section #{$class}::before {
996 content: image-url('browse/#{map.get($item, "filename")}');
999 @if map.get($item, "invert") {
1000 @include color-mode(dark) {
1001 .browse-section #{$class}::before {
1002 filter: invert(.8) hue-rotate(180deg);