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;
19 #container { position: relative; }
24 display: inline-block;
28 background: transparent image-url("sprite.svg") no-repeat 0 0;
33 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
34 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
35 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
36 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
37 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
38 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
39 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
40 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
41 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
42 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
43 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
44 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
45 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
46 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
47 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
48 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
49 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
51 /* Utility for de-emphasizing content */
57 /* Bootstrap contextual table classes overrides in dark mode */
59 @include color-mode(dark) {
61 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
64 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
67 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
69 .table-primary, .table-secondary, .table-success {
70 --bs-table-color: initial;
71 border-color: inherit;
75 /* Rules for the header */
82 background: image-url("menu-icon.png") no-repeat;
83 background-size: 30px 30px;
86 margin: 14px 10px 0 0;
90 @include color-mode(dark) {
97 height: $headerHeight;
101 h1, nav, nav > ul, nav > ul > li {
102 display: inline-block;
107 padding: $lineheight * 0.5;
130 & > .btn-group .btn-outline-primary {
131 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
135 .btn-outline-primary {
140 border-top-color: $grey;
144 background-color: lighten($green, 30%);
149 // Small tweaks to the toggle to stop the primary colour showing through
150 // when the menu is shown
151 .show > .btn-outline-primary.dropdown-toggle {
152 background-color: $green;
153 border-color: $green;
156 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
167 nav.primary, nav.secondary {
170 background-color: $green;
176 #compact-secondary-nav {
181 #compact-secondary-nav {
182 display: inline-block;
195 flex-direction: column;
197 min-height: $headerHeight;
208 #sidebar .search_forms,
225 .user-menu, .login-menu {
230 #compact-secondary-nav {
235 display: inline-block;
238 .overlay-sidebar #sidebar .welcome {
242 .overlay-sidebar #sidebar #banner {
247 /* Utility for styling notification numbers */
250 background: transparentize(lighten($green, 25%), .25);
252 font-weight: $font-weight-normal;
255 /* Rules for Leaflet maps */
257 .leaflet-top.leaflet-right,
258 .leaflet-top.leaflet-left {
262 flex-direction: column;
263 flex-wrap: wrap-reverse;
266 .leaflet-control .control-button {
270 background-color: #333;
271 background-color: rgba(0,0,0,.6);
276 background-color: black;
281 background-color: #333;
282 background-color: rgba(0,0,0,.5);
287 background-color: $vibrant-green;
291 border-start-start-radius: 4px;
295 border-end-start-radius: 4px;
304 /* Rules for the sidebar and main map area */
324 width: $sidebarWidth;
331 .overlay-sidebar #sidebar {
358 width: $sidebarWidth;
374 .leaflet-marker-draggable {
389 @include media-breakpoint-down(md) {
424 --bs-btn-border-color: var(--bs-body-bg);
427 --bs-btn-border-color: var(--bs-primary-border-subtle);
436 li.disabled { color: $darkgrey; }
447 top: 10px !important;
449 margin-right: 0px !important;
450 margin-top: 0px !important;
454 .leaflet-popup-scrolled {
455 padding-right: $lineheight;
456 border-bottom: 0px !important;
457 border-top: 0px !important;
460 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
461 .leaflet-contextmenu, .leaflet-contextmenu-item,
462 .leaflet-control-attribution, .leaflet-control-scale-line {
463 @extend .bg-body, .text-body;
466 .leaflet-control-attribution, .leaflet-control-scale-line {
467 @extend .bg-opacity-75;
468 text-shadow: none !important;
471 .leaflet-contextmenu-item.over {
472 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
475 .leaflet-popup-content-wrapper {
479 color: var(--bs-link-color) !important;
483 @include color-mode(dark) {
484 .leaflet-tile-container,
485 .mapkey-table-entry td:first-child > * {
486 filter: brightness(.8);
489 .leaflet-control-attribution a {
490 color: var(--bs-link-color);
493 .leaflet-control-scale-line {
494 @extend .border-light, .border-opacity-75;
498 /* Rules for attribution text under the main map shown on printouts */
500 .donate-attr { color: darken($green, 10%) !important; }
502 /* Rules for the sidebar */
512 /* Temporary label size override until we remove site-wide font customisation */
523 /* Stop bootstrap 5 from floating legends when they don't need to be */
528 /* Override the text colour for primary and secondary buttons, to match our
529 bootstrap 4 colours. Note this has accessibility issues, which is why
530 bootstrap 5 calculates black as the appropriate colour, and we should
531 reconsider our colours at some point with that in mind. */
534 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
538 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
541 .btn-outline-secondary {
542 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
545 /* Rules for the search and direction forms */
547 header .search_forms,
558 /* Rules for search sidebar */
560 #sidebar .search_results_entry {
561 .search_more .loader {
566 /* Rules for routing */
569 background-image: image-url('routing-sprite.svg');
572 background-repeat: no-repeat;
574 @for $i from 0 through 25 {
575 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
578 @include color-mode(dark) {
591 .routing_marker { width: 15px; cursor: move; }
597 /* Rules for the history sidebar */
599 #sidebar .changesets {
605 a.stretched-link > span, a:not(.stretched-link), [title] {
607 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
611 .changeset_more .loader {
617 /* Rules for the browse sidebar */
621 padding-bottom: $spacer;
622 margin-bottom: $spacer;
623 border-bottom: 1px solid $grey;
626 word-wrap: break-word;
630 .browse-section:last-of-type {
636 white-space: pre-wrap;
637 word-wrap: break-word;
638 word-break: break-word;
640 tr:last-child th, tr:last-child td {
647 margin: 0 0 10px 10px;
655 /* Bootstrap buttons don't have any vertical margin, so
656 they touch when adjacent buttons wrap onto a new line
657 e.g. wide form buttons on a narrow sidebar */
661 margin-bottom: $spacer * 0.25;
665 /* Force LTR/RTL alignment for placeholder text */
667 .form-control::placeholder {
671 /* Rules for export sidebar */
674 .export_area_inputs {
685 /*rtl:ignore*/ float: left;
688 /*rtl:ignore*/ float: right;
693 /* Rules for edit pages */
704 /* Rules for non-map content pages */
710 padding: $lineheight;
713 /* Overrides for pages that use new layout conventions */
715 .header-illustration {
716 background-position: 0 0;
717 background-repeat: no-repeat;
725 background-image: image-url("sign-up-illustration.png");
726 background-position-x: 50px;
730 background-image: image-url("confirm-illustration.png");
734 background-image: image-url("terms-illustration.png");
738 [dir=rtl] .header-illustration {
739 transform: scaleX(-1);
742 transform: scaleX(-1);
746 transform: scaleX(-1);
750 /* Rules for small maps in content areas */
754 margin-bottom: $lineheight;
757 @include media-breakpoint-up(md) {
763 /* Rules for the user map */
765 .content_map .leaflet-popup-content {
770 /* Rules for user popups on maps */
780 /* Rules for the diary entry page */
787 .diary-comment .col-auto {
790 .diary-comment .col {
795 /* Rules for the account confirmation page */
799 padding: $lineheight;
800 margin-bottom: $lineheight;
809 list-style-type: lower-alpha;
814 /* Rules for user images */
826 img.user_thumbnail_tiny {
832 /* General styles for action lists / subnavs */
834 nav.secondary-actions {
847 border-left: 1px solid $grey;
848 padding-left: $lineheight * 0.5;
849 margin-right: $lineheight * 0.5;
850 margin-bottom: $lineheight * 0.125;
855 div.secondary-actions {
860 /* Rules for rich text */
864 background: var(--bs-secondary-bg);
869 background: var(--bs-secondary-bg);
871 white-space: pre-wrap;
879 padding: $lineheight;
880 background-color: var(--bs-tertiary-bg);
887 border-left: $lineheight solid var(--bs-tertiary-bg);
888 padding-left: $lineheight;
890 color: var(--bs-secondary-color);
894 /* Rules for the "Welcome" page */
895 .site-welcome, .site-fixthemap {
897 background-image: image-url("welcome-sprite.png");
898 background-size: 500px 250px;
908 /*rtl:ignore*/ background-position: -50px 0;
913 vertical-align: middle;
917 /*rtl:ignore*/ background-position: -100px 0;
921 /*rtl:ignore*/ background-position: -150px 0;
925 /*rtl:ignore*/ background-position: -200px 0;
929 /*rtl:ignore*/ background-position: -250px 0;
933 /*rtl:ignore*/ background-position: -300px 0;
937 /*rtl:ignore*/ background-position: -350px 0;
941 .site-about #content {
951 color: $vibrant-green;
957 background-position: 0 50%;
958 background-repeat: no-repeat;
959 background-image: image-url('about/osm.png');
960 background-size: cover;
961 background-color: $vibrant-green;
965 background: $vibrant-green;
969 display: inline-block;
978 background: 40px 40px image-url('about/sprite.png') no-repeat;
982 background-position: 0px 0px;
986 background-position: 0px -40px;
990 background-position: 0px -80px;
994 background-position: 0px -120px;
998 background-position: 0px -160px;
1002 background-position: -45px -160px;
1011 /* Rules for tabs inside secondary background sections */
1013 .bg-body-secondary .nav-tabs {
1014 --bs-border-color: var(--bs-secondary-border-subtle);
1015 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1016 margin-bottom: -1px;
1019 /* Rules for traces */
1022 mix-blend-mode: darken;
1025 @include color-mode(dark) {
1028 mix-blend-mode: lighten;
1032 /* Rules for map sidebar icons */
1038 display: inline-block;
1043 .node, .way, .relation {
1048 @each $class, $item in $map-sidebar-icons {
1049 .browse-section #{$class}::before {
1050 content: image-url('browse/#{map.get($item, "filename")}');
1053 @if map.get($item, "invert") {
1054 @include color-mode(dark) {
1055 .browse-section #{$class}::before {
1056 filter: invert(.8) hue-rotate(180deg);