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 /* Rules for the header */
80 background: image-url("menu-icon.svg") no-repeat;
81 background-size: 30px 30px;
84 margin: 14px 10px 0 0;
88 @include color-mode(dark) {
95 height: $headerHeight;
100 padding: $lineheight * 0.5;
104 height: $headerHeight;
122 & > .btn-group .btn-outline-primary {
123 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
127 .btn-outline-primary {
132 border-top-color: $grey;
136 background-color: lighten($green, 30%);
141 // Small tweaks to the toggle to stop the primary colour showing through
142 // when the menu is shown
143 .show > .btn-outline-primary.dropdown-toggle {
144 background-color: $green;
145 border-color: $green;
148 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
159 nav.primary, nav.secondary {
162 background-color: $green;
168 #compact-secondary-nav {
173 #compact-secondary-nav {
174 display: inline-block;
187 flex-direction: column;
189 min-height: $headerHeight;
192 display: none !important;
200 #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) {
396 .overlay-sidebar.overlay-right-sidebar {
416 box-sizing: content-box;
417 top: - map.get($border-widths, 4);
418 left: - map.get($border-widths, 4);
419 --bs-btn-border-color: var(--bs-body-bg);
422 --bs-btn-border-color: var(--bs-primary-border-subtle);
427 li.disabled { color: $darkgrey; }
438 top: 10px !important;
440 margin-right: 0px !important;
441 margin-top: 0px !important;
445 .leaflet-popup-scrolled {
446 padding-right: $lineheight;
447 border-bottom: 0px !important;
448 border-top: 0px !important;
451 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
452 .leaflet-contextmenu, .leaflet-contextmenu-item,
453 .leaflet-control-attribution, .leaflet-control-scale-line {
454 @extend .bg-body, .text-body;
457 .leaflet-control-attribution, .leaflet-control-scale-line {
458 @extend .bg-opacity-75;
459 text-shadow: none !important;
462 .leaflet-contextmenu-item.over {
463 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
466 .leaflet-popup-content-wrapper {
470 color: var(--bs-link-color) !important;
474 @include color-mode(dark) {
475 .leaflet-tile-container,
476 .mapkey-table-entry td:first-child > * {
477 filter: brightness(.8);
480 .leaflet-control-attribution a {
481 color: var(--bs-link-color);
484 .leaflet-control-scale-line {
485 @extend .border-light, .border-opacity-75;
489 /* Rules for attribution text under the main map shown on printouts */
491 .donate-attr { color: darken($green, 10%) !important; }
493 /* Temporary label size override until we remove site-wide font customisation */
504 /* Stop bootstrap 5 from floating legends when they don't need to be */
509 /* Override the text colour for primary and secondary buttons, to match our
510 bootstrap 4 colours. Note this has accessibility issues, which is why
511 bootstrap 5 calculates black as the appropriate colour, and we should
512 reconsider our colours at some point with that in mind. */
515 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
519 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
522 .btn-outline-secondary {
523 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
526 /* Rules for the search and direction forms */
528 header .search_forms,
539 /* Rules for search sidebar */
541 #sidebar .search_results_entry {
542 .search_more .loader {
547 /* Rules for routing */
550 background-image: image-url('routing-sprite.svg');
553 background-repeat: no-repeat;
555 @for $i from 0 through 25 {
556 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
559 @include color-mode(dark) {
572 .routing_marker_column {
580 /* Rules for the history sidebar */
582 #sidebar .changesets {
588 a.stretched-link > span, a:not(.stretched-link), [title] {
590 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
594 .changeset_more .loader {
600 /* Rules for the browse sidebar */
604 padding-bottom: $spacer;
605 margin-bottom: $spacer;
606 border-bottom: 1px solid $grey;
609 word-wrap: break-word;
613 .browse-section:last-of-type {
619 white-space: pre-wrap;
620 word-wrap: break-word;
621 word-break: break-word;
623 tr:last-child th, tr:last-child td {
633 /* Force LTR/RTL alignment for placeholder text */
635 .form-control::placeholder {
639 /* Rules for export sidebar */
642 .export_area_inputs {
653 /*rtl:ignore*/ float: left;
656 /*rtl:ignore*/ float: right;
661 /* Rules for edit pages */
672 /* Rules for non-map content pages */
678 padding: $lineheight;
681 /* Rules for login and signup pages */
683 .sessions-new, .users-new, .users-create {
684 #content .content-inner {
689 .header-illustration {
690 background-position: right;
691 background-repeat: no-repeat;
699 background-image: image-url("sign-up-illustration.svg");
700 background-position-x: 70px;
704 background-image: image-url("confirm-illustration.svg");
708 background-image: image-url("terms-illustration.svg");
712 [dir=rtl] .header-illustration {
713 transform: scaleX(-1);
716 transform: scaleX(-1);
720 transform: scaleX(-1);
724 /* Rules for small maps in content areas */
728 margin-bottom: $lineheight;
731 @include media-breakpoint-up(md) {
737 /* Rules for the user map */
739 .content_map .leaflet-popup-content {
744 /* Rules for user popups on maps */
754 /* Rules for the diary entry page */
761 .diary-comment .col-auto {
764 .diary-comment .col {
769 /* Rules for the account confirmation page */
773 padding: $lineheight;
774 margin-bottom: $lineheight;
783 list-style-type: lower-alpha;
788 /* Rules for user images */
800 img.user_thumbnail_tiny {
806 /* General styles for action lists / subnavs */
808 nav.secondary-actions {
821 border-left: 1px solid $grey;
822 padding-left: $lineheight * 0.5;
823 margin-right: $lineheight * 0.5;
824 margin-bottom: $lineheight * 0.125;
829 div.secondary-actions {
834 /* Rules for rich text */
838 background: var(--bs-secondary-bg);
843 background: var(--bs-secondary-bg);
845 white-space: pre-wrap;
853 padding: $lineheight;
854 background-color: var(--bs-tertiary-bg);
861 border-left: $lineheight solid var(--bs-tertiary-bg);
862 padding-left: $lineheight;
864 color: var(--bs-secondary-color);
868 /* Rules for the "About" page */
870 .site-about #content {
880 color: $vibrant-green;
886 background-position: 0 50%;
887 background-repeat: no-repeat;
888 background-image: image-url('about/osm.png');
889 background-size: cover;
890 background-color: $vibrant-green;
894 background: $vibrant-green;
898 display: inline-block;
905 /* Rules for block pages */
907 #block_list .username {
911 /* Rules for tabs inside secondary background sections */
913 .bg-body-secondary .nav-tabs {
914 --bs-border-color: var(--bs-secondary-border-subtle);
915 --bs-secondary-bg: var(--bs-secondary-border-subtle);
919 /* Rules for traces */
922 mix-blend-mode: darken;
925 @include color-mode(dark) {
928 mix-blend-mode: lighten;
932 /* Rules for map sidebar icons */
938 display: inline-block;
943 .node, .way, .relation {
948 @each $class, $item in $map-sidebar-icons {
949 .browse-section #{$class}::before {
950 content: image-url('browse/#{map.get($item, "filename")}');
953 @if map.get($item, "invert") {
954 @include color-mode(dark) {
955 .browse-section #{$class}::before {
956 filter: invert(.8) hue-rotate(180deg);