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 /* Bootstrap close button overrides for nested light/dark themes */
77 [data-bs-theme="dark"] .btn-close {
78 filter: var(--bs-btn-close-white-filter);
81 [data-bs-theme="light"] .btn-close {
85 /* Rules for the header */
92 background: image-url("menu-icon.png") no-repeat;
93 background-size: 30px 30px;
96 margin: 14px 10px 0 0;
100 @include color-mode(dark) {
107 height: $headerHeight;
111 h1, nav, nav > ul, nav > ul > li {
112 display: inline-block;
117 padding: $lineheight * 0.5;
140 & > .btn-group .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);
177 nav.primary, nav.secondary {
180 background-color: $green;
186 #compact-secondary-nav {
191 #compact-secondary-nav {
192 display: inline-block;
205 flex-direction: column;
207 min-height: $headerHeight;
218 #sidebar .search_forms,
235 .user-menu, .login-menu {
240 #compact-secondary-nav {
245 display: inline-block;
248 .overlay-sidebar #sidebar .welcome {
252 .overlay-sidebar #sidebar #banner {
257 /* Utility for styling notification numbers */
260 background: transparentize(lighten($green, 25%), .25);
262 font-weight: $font-weight-normal;
265 /* Rules for Leaflet maps */
267 .leaflet-top.leaflet-right,
268 .leaflet-top.leaflet-left {
272 flex-direction: column;
273 flex-wrap: wrap-reverse;
276 .leaflet-control .control-button {
280 background-color: #333;
281 background-color: rgba(0,0,0,.6);
286 background-color: black;
291 background-color: #333;
292 background-color: rgba(0,0,0,.5);
297 background-color: $vibrant-green;
301 border-start-start-radius: 4px;
305 border-end-start-radius: 4px;
314 /* Rules for the sidebar and main map area */
334 width: $sidebarWidth;
341 .overlay-sidebar #sidebar {
368 width: $sidebarWidth;
384 .leaflet-marker-draggable {
399 @include media-breakpoint-down(md) {
434 --bs-btn-border-color: var(--bs-body-bg);
437 --bs-btn-border-color: var(--bs-primary-border-subtle);
446 li.disabled { color: $darkgrey; }
457 top: 10px !important;
459 margin-right: 0px !important;
460 margin-top: 0px !important;
464 .leaflet-popup-scrolled {
465 padding-right: $lineheight;
466 border-bottom: 0px !important;
467 border-top: 0px !important;
470 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
471 .leaflet-contextmenu, .leaflet-contextmenu-item,
472 .leaflet-control-attribution, .leaflet-control-scale-line {
473 @extend .bg-body, .text-body;
476 .leaflet-control-attribution, .leaflet-control-scale-line {
477 @extend .bg-opacity-75;
478 text-shadow: none !important;
481 .leaflet-contextmenu-item.over {
482 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
485 .leaflet-popup-content-wrapper {
489 color: var(--bs-link-color) !important;
493 @include color-mode(dark) {
494 .leaflet-tile-container,
495 .mapkey-table-entry td:first-child > * {
496 filter: brightness(.8);
499 .leaflet-control-attribution a {
500 color: var(--bs-link-color);
503 .leaflet-control-scale-line {
504 @extend .border-light, .border-opacity-75;
508 /* Rules for attribution text under the main map shown on printouts */
510 .donate-attr { color: darken($green, 10%) !important; }
512 /* Rules for the sidebar */
522 /* Temporary label size override until we remove site-wide font customisation */
533 /* Stop bootstrap 5 from floating legends when they don't need to be */
538 /* Override the text colour for primary and secondary buttons, to match our
539 bootstrap 4 colours. Note this has accessibility issues, which is why
540 bootstrap 5 calculates black as the appropriate colour, and we should
541 reconsider our colours at some point with that in mind. */
544 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
548 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
551 .btn-outline-secondary {
552 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
555 /* Rules for the search and direction forms */
557 header .search_forms,
568 /* Rules for search sidebar */
570 #sidebar .search_results_entry {
571 .search_more .loader {
576 /* Rules for routing */
579 background-image: image-url('routing-sprite.png');
582 background-repeat: no-repeat;
584 @for $i from 0 through 25 {
585 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
588 @include color-mode(dark) {
601 .routing_marker { width: 15px; cursor: move; }
607 /* Rules for the history sidebar */
609 #sidebar .changesets {
615 a.stretched-link > span, a:not(.stretched-link), [title] {
617 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
621 .changeset_more .loader {
627 /* Rules for the browse sidebar */
631 padding-bottom: $spacer;
632 margin-bottom: $spacer;
633 border-bottom: 1px solid $grey;
636 word-wrap: break-word;
640 .browse-section:last-of-type {
646 white-space: pre-wrap;
647 word-wrap: break-word;
648 word-break: break-word;
650 tr:last-child th, tr:last-child td {
657 margin: 0 0 10px 10px;
665 /* Bootstrap buttons don't have any vertical margin, so
666 they touch when adjacent buttons wrap onto a new line
667 e.g. wide form buttons on a narrow sidebar */
671 margin-bottom: $spacer * 0.25;
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 /* Overrides for pages that use new layout conventions */
725 .header-illustration {
726 background-position: 0 0;
727 background-repeat: no-repeat;
735 background-image: image-url("sign-up-illustration.png");
736 background-position-x: 50px;
740 background-image: image-url("confirm-illustration.png");
744 background-image: image-url("terms-illustration.png");
748 [dir=rtl] .header-illustration {
749 transform: scaleX(-1);
752 transform: scaleX(-1);
756 /* Rules for small maps in content areas */
760 margin-bottom: $lineheight;
763 @include media-breakpoint-up(md) {
769 /* Rules for the user map */
771 .content_map .leaflet-popup-content {
776 /* Rules for user popups on maps */
786 /* Rules for the diary entry page */
793 .diary-comment .col-auto {
796 .diary-comment .col {
801 /* Rules for the account confirmation page */
805 padding: $lineheight;
806 margin-bottom: $lineheight;
815 list-style-type: lower-alpha;
820 /* Rules for user images */
832 img.user_thumbnail_tiny {
838 /* General styles for action lists / subnavs */
840 nav.secondary-actions {
853 border-left: 1px solid $grey;
854 padding-left: $lineheight * 0.5;
855 margin-right: $lineheight * 0.5;
856 margin-bottom: $lineheight * 0.125;
861 div.secondary-actions {
866 /* Rules for rich text */
870 background: var(--bs-secondary-bg);
875 background: var(--bs-secondary-bg);
877 white-space: pre-wrap;
885 padding: $lineheight;
886 background-color: var(--bs-tertiary-bg);
893 border-left: $lineheight solid var(--bs-tertiary-bg);
894 padding-left: $lineheight;
896 color: var(--bs-secondary-color);
900 /* Rules for the "Welcome" page */
901 .site-welcome, .site-fixthemap {
903 background-image: image-url("welcome-sprite.png");
904 background-size: 500px 250px;
914 /*rtl:ignore*/ background-position: -50px 0;
919 vertical-align: middle;
923 /*rtl:ignore*/ background-position: -100px 0;
927 /*rtl:ignore*/ background-position: -150px 0;
931 /*rtl:ignore*/ background-position: -200px 0;
935 /*rtl:ignore*/ background-position: -250px 0;
939 /*rtl:ignore*/ background-position: -300px 0;
943 /*rtl:ignore*/ background-position: -350px 0;
947 .site-about #content {
957 color: $vibrant-green;
963 background-position: 0 50%;
964 background-repeat: no-repeat;
965 background-image: image-url('about/osm.png');
966 background-size: cover;
967 background-color: $vibrant-green;
971 background: $vibrant-green;
975 display: inline-block;
984 background: 40px 40px image-url('about/sprite.png') no-repeat;
988 background-position: 0px 0px;
992 background-position: 0px -40px;
996 background-position: 0px -80px;
1000 background-position: 0px -120px;
1004 background-position: 0px -160px;
1008 background-position: -45px -160px;
1017 /* Rules for tabs inside secondary background sections */
1019 .bg-body-secondary .nav-tabs {
1020 --bs-border-color: var(--bs-secondary-border-subtle);
1021 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1022 margin-bottom: -1px;
1025 /* Rules for traces */
1028 mix-blend-mode: darken;
1031 @include color-mode(dark) {
1034 mix-blend-mode: lighten;
1038 /* Rules for map sidebar icons */
1044 display: inline-block;
1049 .node, .way, .relation {
1054 @each $class, $item in $map-sidebar-icons {
1055 .browse-section #{$class}::before {
1056 content: image-url('browse/#{map.get($item, "filename")}');
1059 @if map.get($item, "invert") {
1060 @include color-mode(dark) {
1061 .browse-section #{$class}::before {
1062 filter: invert(.8) hue-rotate(180deg);