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 */
53 .text-body-secondary a {
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.svg") no-repeat;
83 background-size: 30px 30px;
86 margin: 14px 10px 0 0;
90 @include color-mode(dark) {
97 height: $headerHeight;
103 padding: $lineheight * 0.5;
120 & > .btn-group .btn-outline-primary {
121 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
125 .btn-outline-primary {
130 border-top-color: $grey;
134 background-color: lighten($green, 30%);
139 // Small tweaks to the toggle to stop the primary colour showing through
140 // when the menu is shown
141 .show > .btn-outline-primary.dropdown-toggle {
142 background-color: $green;
143 border-color: $green;
146 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
157 nav.primary, nav.secondary {
160 background-color: $green;
166 #compact-secondary-nav {
171 #compact-secondary-nav {
172 display: inline-block;
185 flex-direction: column;
187 min-height: $headerHeight;
190 display: none !important;
198 #sidebar .search_forms,
215 flex-direction: column;
217 .user-menu, .login-menu {
222 #compact-secondary-nav {
227 display: inline-block;
230 .overlay-sidebar #sidebar .welcome {
234 .overlay-sidebar #sidebar #banner {
239 /* Utility for styling notification numbers */
242 background: transparentize(lighten($green, 25%), .25);
244 font-weight: $font-weight-normal;
247 /* Rules for Leaflet maps */
249 .leaflet-top.leaflet-right,
250 .leaflet-top.leaflet-left {
254 flex-direction: column;
255 flex-wrap: wrap-reverse;
258 .leaflet-control .control-button {
262 background-color: #333;
263 background-color: rgba(0,0,0,.6);
268 background-color: black;
273 background-color: #333;
274 background-color: rgba(0,0,0,.5);
279 background-color: $vibrant-green;
283 border-start-start-radius: 4px;
287 border-end-start-radius: 4px;
296 /* Rules for the sidebar and main map area */
316 width: $sidebarWidth;
323 .overlay-sidebar #sidebar {
350 width: $sidebarWidth;
366 .leaflet-marker-draggable {
381 @include media-breakpoint-down(md) {
416 --bs-btn-border-color: var(--bs-body-bg);
419 --bs-btn-border-color: var(--bs-primary-border-subtle);
428 li.disabled { color: $darkgrey; }
439 top: 10px !important;
441 margin-right: 0px !important;
442 margin-top: 0px !important;
446 .leaflet-popup-scrolled {
447 padding-right: $lineheight;
448 border-bottom: 0px !important;
449 border-top: 0px !important;
452 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
453 .leaflet-contextmenu, .leaflet-contextmenu-item,
454 .leaflet-control-attribution, .leaflet-control-scale-line {
455 @extend .bg-body, .text-body;
458 .leaflet-control-attribution, .leaflet-control-scale-line {
459 @extend .bg-opacity-75;
460 text-shadow: none !important;
463 .leaflet-contextmenu-item.over {
464 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
467 .leaflet-popup-content-wrapper {
471 color: var(--bs-link-color) !important;
475 @include color-mode(dark) {
476 .leaflet-tile-container,
477 .mapkey-table-entry td:first-child > * {
478 filter: brightness(.8);
481 .leaflet-control-attribution a {
482 color: var(--bs-link-color);
485 .leaflet-control-scale-line {
486 @extend .border-light, .border-opacity-75;
490 /* Rules for attribution text under the main map shown on printouts */
492 .donate-attr { color: darken($green, 10%) !important; }
494 /* Rules for the sidebar */
504 /* Temporary label size override until we remove site-wide font customisation */
515 /* Stop bootstrap 5 from floating legends when they don't need to be */
520 /* Override the text colour for primary and secondary buttons, to match our
521 bootstrap 4 colours. Note this has accessibility issues, which is why
522 bootstrap 5 calculates black as the appropriate colour, and we should
523 reconsider our colours at some point with that in mind. */
526 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
530 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
533 .btn-outline-secondary {
534 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
537 /* Rules for the search and direction forms */
539 header .search_forms,
550 /* Rules for search sidebar */
552 #sidebar .search_results_entry {
553 .search_more .loader {
558 /* Rules for routing */
561 background-image: image-url('routing-sprite.svg');
564 background-repeat: no-repeat;
566 @for $i from 0 through 25 {
567 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
570 @include color-mode(dark) {
583 .routing_marker { width: 15px; cursor: move; }
589 /* Rules for the history sidebar */
591 #sidebar .changesets {
597 a.stretched-link > span, a:not(.stretched-link), [title] {
599 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
603 .changeset_more .loader {
609 /* Rules for the browse sidebar */
613 padding-bottom: $spacer;
614 margin-bottom: $spacer;
615 border-bottom: 1px solid $grey;
618 word-wrap: break-word;
622 .browse-section:last-of-type {
628 white-space: pre-wrap;
629 word-wrap: break-word;
630 word-break: break-word;
632 tr:last-child th, tr:last-child td {
639 margin: 0 0 10px 10px;
647 /* Bootstrap buttons don't have any vertical margin, so
648 they touch when adjacent buttons wrap onto a new line
649 e.g. wide form buttons on a narrow sidebar */
653 margin-bottom: $spacer * 0.25;
657 /* Force LTR/RTL alignment for placeholder text */
659 .form-control::placeholder {
663 /* Rules for export sidebar */
666 .export_area_inputs {
677 /*rtl:ignore*/ float: left;
680 /*rtl:ignore*/ float: right;
685 /* Rules for edit pages */
696 /* Rules for non-map content pages */
702 padding: $lineheight;
705 /* Overrides for pages that use new layout conventions */
707 .header-illustration {
708 background-position: 0 0;
709 background-repeat: no-repeat;
717 background-image: image-url("sign-up-illustration.png");
718 background-position-x: 50px;
722 background-image: image-url("confirm-illustration.png");
726 background-image: image-url("terms-illustration.png");
730 [dir=rtl] .header-illustration {
731 transform: scaleX(-1);
734 transform: scaleX(-1);
738 transform: scaleX(-1);
742 /* Rules for small maps in content areas */
746 margin-bottom: $lineheight;
749 @include media-breakpoint-up(md) {
755 /* Rules for the user map */
757 .content_map .leaflet-popup-content {
762 /* Rules for user popups on maps */
772 /* Rules for the diary entry page */
779 .diary-comment .col-auto {
782 .diary-comment .col {
787 /* Rules for the account confirmation page */
791 padding: $lineheight;
792 margin-bottom: $lineheight;
801 list-style-type: lower-alpha;
806 /* Rules for user images */
818 img.user_thumbnail_tiny {
824 /* General styles for action lists / subnavs */
826 nav.secondary-actions {
839 border-left: 1px solid $grey;
840 padding-left: $lineheight * 0.5;
841 margin-right: $lineheight * 0.5;
842 margin-bottom: $lineheight * 0.125;
847 div.secondary-actions {
852 /* Rules for rich text */
856 background: var(--bs-secondary-bg);
861 background: var(--bs-secondary-bg);
863 white-space: pre-wrap;
871 padding: $lineheight;
872 background-color: var(--bs-tertiary-bg);
879 border-left: $lineheight solid var(--bs-tertiary-bg);
880 padding-left: $lineheight;
882 color: var(--bs-secondary-color);
886 /* Rules for the "Welcome" and "Fix the map" pages */
888 .site-welcome, .site-fixthemap {
892 background-image: image-url("welcome-sprite.svg");
893 background-size: 500px 250px;
897 /*rtl:ignore*/ background-position: -50px 0;
901 /*rtl:ignore*/ background-position: -100px 0;
905 /*rtl:ignore*/ background-position: -150px 0;
909 /*rtl:ignore*/ background-position: -200px 0;
913 /*rtl:ignore*/ background-position: -250px 0;
917 /*rtl:ignore*/ background-position: -300px 0;
921 /*rtl:ignore*/ background-position: -350px 0;
925 /* Rules for the "About" page */
927 .site-about #content {
937 color: $vibrant-green;
943 background-position: 0 50%;
944 background-repeat: no-repeat;
945 background-image: image-url('about/osm.png');
946 background-size: cover;
947 background-color: $vibrant-green;
951 background: $vibrant-green;
955 display: inline-block;
964 background: 40px 40px image-url('about/sprite.png') no-repeat;
968 background-position: 0px 0px;
972 background-position: 0px -40px;
976 background-position: 0px -80px;
980 background-position: 0px -120px;
984 background-position: 0px -160px;
988 background-position: -45px -160px;
997 /* Rules for tabs inside secondary background sections */
999 .bg-body-secondary .nav-tabs {
1000 --bs-border-color: var(--bs-secondary-border-subtle);
1001 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1002 margin-bottom: -1px;
1005 /* Rules for traces */
1008 mix-blend-mode: darken;
1011 @include color-mode(dark) {
1014 mix-blend-mode: lighten;
1018 /* Rules for map sidebar icons */
1024 display: inline-block;
1029 .node, .way, .relation {
1034 @each $class, $item in $map-sidebar-icons {
1035 .browse-section #{$class}::before {
1036 content: image-url('browse/#{map.get($item, "filename")}');
1039 @if map.get($item, "invert") {
1040 @include color-mode(dark) {
1041 .browse-section #{$class}::before {
1042 filter: invert(.8) hue-rotate(180deg);