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 /* Rules for the header */
92 background: image-url("menu-icon.svg") no-repeat;
93 background-size: 30px 30px;
96 margin: 14px 10px 0 0;
100 @include color-mode(dark) {
107 height: $headerHeight;
112 padding: $lineheight * 0.5;
116 height: $headerHeight;
134 & > .btn-group .btn-outline-primary {
135 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
139 .btn-outline-primary {
144 border-top-color: $grey;
148 background-color: lighten($green, 30%);
153 // Small tweaks to the toggle to stop the primary colour showing through
154 // when the menu is shown
155 .show > .btn-outline-primary.dropdown-toggle {
156 background-color: $green;
157 border-color: $green;
160 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
171 nav.primary, nav.secondary {
174 background-color: $green;
180 #compact-secondary-nav {
185 #compact-secondary-nav {
186 display: inline-block;
199 flex-direction: column;
201 min-height: $headerHeight;
204 display: none !important;
212 #sidebar .search_forms,
229 flex-direction: column;
231 .user-menu, .login-menu {
236 #compact-secondary-nav {
241 display: inline-block;
244 .overlay-sidebar #sidebar .welcome {
248 .overlay-sidebar #sidebar #banner {
253 /* Utility for styling notification numbers */
256 background: transparentize(lighten($green, 25%), .25);
258 font-weight: $font-weight-normal;
261 /* Rules for Leaflet maps */
263 .leaflet-top.leaflet-right,
264 .leaflet-top.leaflet-left {
268 flex-direction: column;
269 flex-wrap: wrap-reverse;
272 .leaflet-control .control-button {
276 background-color: #333;
277 background-color: rgba(0,0,0,.6);
282 background-color: black;
287 background-color: #333;
288 background-color: rgba(0,0,0,.5);
293 background-color: $vibrant-green;
297 border-start-start-radius: 4px;
301 border-end-start-radius: 4px;
310 /* Rules for the sidebar and main map area */
330 width: $sidebarWidth;
337 .overlay-sidebar #sidebar {
364 width: $sidebarWidth;
380 .leaflet-marker-draggable {
385 animation: 1500ms forwards query-marker-fade;
387 @keyframes query-marker-fade {
403 @include media-breakpoint-down(md) {
418 .overlay-sidebar.overlay-right-sidebar {
438 box-sizing: content-box;
439 top: - map.get($border-widths, 4);
440 left: - map.get($border-widths, 4);
441 --bs-btn-border-color: var(--bs-body-bg);
444 --bs-btn-border-color: var(--bs-primary-border-subtle);
449 li.disabled { color: $darkgrey; }
460 top: 10px !important;
462 margin-right: 0px !important;
463 margin-top: 0px !important;
467 .leaflet-popup-scrolled {
468 padding-right: $lineheight;
469 border-bottom: 0px !important;
470 border-top: 0px !important;
473 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
474 .leaflet-contextmenu, .leaflet-contextmenu-item,
475 .leaflet-control-attribution, .leaflet-control-scale-line {
476 @extend .bg-body, .text-body;
479 .leaflet-control-attribution, .leaflet-control-scale-line {
480 @extend .bg-opacity-75;
481 text-shadow: none !important;
484 .leaflet-contextmenu-item.over {
485 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
488 .leaflet-popup-content-wrapper {
492 color: var(--bs-link-color) !important;
496 @include color-mode(dark) {
497 .leaflet-tile-container,
498 .mapkey-table-entry td:first-child > * {
499 filter: brightness(.8);
502 .leaflet-control-attribution a {
503 color: var(--bs-link-color);
506 .leaflet-control-scale-line {
507 @extend .border-light, .border-opacity-75;
511 /* Rules for attribution text under the main map shown on printouts */
513 .donate-attr { color: darken($green, 10%) !important; }
515 /* Temporary label size override until we remove site-wide font customisation */
526 /* Stop bootstrap 5 from floating legends when they don't need to be */
531 /* Override the text colour for primary and secondary buttons, to match our
532 bootstrap 4 colours. Note this has accessibility issues, which is why
533 bootstrap 5 calculates black as the appropriate colour, and we should
534 reconsider our colours at some point with that in mind. */
537 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
541 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
544 .btn-outline-secondary {
545 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
548 /* Rules for the search and direction forms */
550 header .search_forms,
561 /* Rules for search sidebar */
563 #sidebar .search_results_entry {
564 .search_more .loader {
569 /* Rules for routing */
572 background-image: image-url('routing-sprite.svg');
575 background-repeat: no-repeat;
577 @for $i from 0 through 25 {
578 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
581 @include color-mode(dark) {
594 .routing_marker_column {
602 /* Rules for the history sidebar */
604 #sidebar .changesets {
610 a.stretched-link > span, a:not(.stretched-link), [title] {
612 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
616 .changeset_more .loader {
622 /* Rules for the browse sidebar */
626 padding-bottom: $spacer;
627 margin-bottom: $spacer;
628 border-bottom: 1px solid $grey;
631 word-wrap: break-word;
635 .browse-section:last-of-type {
641 white-space: pre-wrap;
642 word-wrap: break-word;
643 word-break: break-word;
645 tr:last-child th, tr:last-child td {
655 /* Force LTR/RTL alignment for placeholder text */
657 .form-control::placeholder {
661 /* Rules for export sidebar */
664 .export_area_inputs {
675 /*rtl:ignore*/ float: left;
678 /*rtl:ignore*/ float: right;
683 /* Rules for edit pages */
694 /* Rules for non-map content pages */
700 padding: $lineheight;
703 /* Rules for login and signup pages */
705 .sessions-new, .users-new, .users-create {
706 #content .content-inner {
711 .header-illustration {
712 background-position: right;
713 background-repeat: no-repeat;
721 background-image: image-url("sign-up-illustration.svg");
722 background-position-x: 70px;
726 background-image: image-url("confirm-illustration.svg");
730 background-image: image-url("terms-illustration.svg");
734 [dir=rtl] .header-illustration {
735 transform: scaleX(-1);
738 transform: scaleX(-1);
742 transform: scaleX(-1);
746 /* Rules for small maps in content areas */
750 margin-bottom: $lineheight;
753 @include media-breakpoint-up(md) {
759 /* Rules for the user map */
761 .content_map .leaflet-popup-content {
766 /* Rules for user popups on maps */
776 /* Rules for the diary entry page */
783 .diary-comment .col-auto {
786 .diary-comment .col {
791 /* Rules for the account confirmation page */
795 padding: $lineheight;
796 margin-bottom: $lineheight;
805 list-style-type: lower-alpha;
810 /* Rules for user images */
822 img.user_thumbnail_tiny {
828 /* General styles for action lists / subnavs */
830 nav.secondary-actions {
843 border-left: 1px solid $grey;
844 padding-left: $lineheight * 0.5;
845 margin-right: $lineheight * 0.5;
846 margin-bottom: $lineheight * 0.125;
851 div.secondary-actions {
856 /* Rules for rich text */
860 background: var(--bs-secondary-bg);
865 background: var(--bs-secondary-bg);
867 white-space: pre-wrap;
875 padding: $lineheight;
876 background-color: var(--bs-tertiary-bg);
883 border-left: $lineheight solid var(--bs-tertiary-bg);
884 padding-left: $lineheight;
886 color: var(--bs-secondary-color);
890 /* Rules for the "About" page */
892 .site-about #content {
902 color: $vibrant-green;
908 background-position: 0 50%;
909 background-repeat: no-repeat;
910 background-image: image-url('about/osm.png');
911 background-size: cover;
912 background-color: $vibrant-green;
916 background: $vibrant-green;
920 display: inline-block;
927 /* Rules for block pages */
929 #block_list .username {
933 /* Rules for tabs inside secondary background sections */
935 .bg-body-secondary .nav-tabs {
936 --bs-border-color: var(--bs-secondary-border-subtle);
937 --bs-secondary-bg: var(--bs-secondary-border-subtle);
941 /* Rules for traces */
944 mix-blend-mode: darken;
947 @include color-mode(dark) {
950 mix-blend-mode: lighten;
954 /* Rules for map sidebar icons */
960 display: inline-block;
965 .node, .way, .relation {
970 @each $class, $item in $map-sidebar-icons {
971 .browse-section #{$class}::before {
972 content: image-url('browse/#{map.get($item, "filename")}');
975 @if map.get($item, "invert") {
976 @include color-mode(dark) {
977 .browse-section #{$class}::before {
978 filter: invert(.8) hue-rotate(180deg);