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;
118 & > .btn-group .btn-outline-primary {
119 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
123 .btn-outline-primary {
128 border-top-color: $grey;
132 background-color: lighten($green, 30%);
137 // Small tweaks to the toggle to stop the primary colour showing through
138 // when the menu is shown
139 .show > .btn-outline-primary.dropdown-toggle {
140 background-color: $green;
141 border-color: $green;
144 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
155 nav.primary, nav.secondary {
158 background-color: $green;
164 #compact-secondary-nav {
169 #compact-secondary-nav {
170 display: inline-block;
183 flex-direction: column;
185 min-height: $headerHeight;
188 display: none !important;
196 #sidebar .search_forms,
213 flex-direction: column;
215 .user-menu, .login-menu {
220 #compact-secondary-nav {
225 display: inline-block;
228 .overlay-sidebar #sidebar .welcome {
232 .overlay-sidebar #sidebar #banner {
237 /* Utility for styling notification numbers */
240 background: transparentize(lighten($green, 25%), .25);
242 font-weight: $font-weight-normal;
245 /* Rules for Leaflet maps */
247 .leaflet-top.leaflet-right,
248 .leaflet-top.leaflet-left {
252 flex-direction: column;
253 flex-wrap: wrap-reverse;
256 .leaflet-control .control-button {
260 background-color: #333;
261 background-color: rgba(0,0,0,.6);
266 background-color: black;
271 background-color: #333;
272 background-color: rgba(0,0,0,.5);
277 background-color: $vibrant-green;
281 border-start-start-radius: 4px;
285 border-end-start-radius: 4px;
294 /* Rules for the sidebar and main map area */
314 width: $sidebarWidth;
321 .overlay-sidebar #sidebar {
348 width: $sidebarWidth;
364 .leaflet-marker-draggable {
379 @include media-breakpoint-down(md) {
414 --bs-btn-border-color: var(--bs-body-bg);
417 --bs-btn-border-color: var(--bs-primary-border-subtle);
422 li.disabled { color: $darkgrey; }
433 top: 10px !important;
435 margin-right: 0px !important;
436 margin-top: 0px !important;
440 .leaflet-popup-scrolled {
441 padding-right: $lineheight;
442 border-bottom: 0px !important;
443 border-top: 0px !important;
446 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
447 .leaflet-contextmenu, .leaflet-contextmenu-item,
448 .leaflet-control-attribution, .leaflet-control-scale-line {
449 @extend .bg-body, .text-body;
452 .leaflet-control-attribution, .leaflet-control-scale-line {
453 @extend .bg-opacity-75;
454 text-shadow: none !important;
457 .leaflet-contextmenu-item.over {
458 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
461 .leaflet-popup-content-wrapper {
465 color: var(--bs-link-color) !important;
469 @include color-mode(dark) {
470 .leaflet-tile-container,
471 .mapkey-table-entry td:first-child > * {
472 filter: brightness(.8);
475 .leaflet-control-attribution a {
476 color: var(--bs-link-color);
479 .leaflet-control-scale-line {
480 @extend .border-light, .border-opacity-75;
484 /* Rules for attribution text under the main map shown on printouts */
486 .donate-attr { color: darken($green, 10%) !important; }
488 /* Temporary label size override until we remove site-wide font customisation */
499 /* Stop bootstrap 5 from floating legends when they don't need to be */
504 /* Override the text colour for primary and secondary buttons, to match our
505 bootstrap 4 colours. Note this has accessibility issues, which is why
506 bootstrap 5 calculates black as the appropriate colour, and we should
507 reconsider our colours at some point with that in mind. */
510 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
514 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
517 .btn-outline-secondary {
518 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
521 /* Rules for the search and direction forms */
523 header .search_forms,
534 /* Rules for search sidebar */
536 #sidebar .search_results_entry {
537 .search_more .loader {
542 /* Rules for routing */
545 background-image: image-url('routing-sprite.svg');
548 background-repeat: no-repeat;
550 @for $i from 0 through 25 {
551 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
554 @include color-mode(dark) {
567 .routing_marker { width: 15px; cursor: move; }
569 /* Rules for the history sidebar */
571 #sidebar .changesets {
577 a.stretched-link > span, a:not(.stretched-link), [title] {
579 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
583 .changeset_more .loader {
589 /* Rules for the browse sidebar */
593 padding-bottom: $spacer;
594 margin-bottom: $spacer;
595 border-bottom: 1px solid $grey;
598 word-wrap: break-word;
602 .browse-section:last-of-type {
608 white-space: pre-wrap;
609 word-wrap: break-word;
610 word-break: break-word;
612 tr:last-child th, tr:last-child td {
622 /* Force LTR/RTL alignment for placeholder text */
624 .form-control::placeholder {
628 /* Rules for export sidebar */
631 .export_area_inputs {
642 /*rtl:ignore*/ float: left;
645 /*rtl:ignore*/ float: right;
650 /* Rules for edit pages */
661 /* Rules for non-map content pages */
667 padding: $lineheight;
670 /* Overrides for pages that use new layout conventions */
672 .header-illustration {
673 background-position: 0 0;
674 background-repeat: no-repeat;
682 background-image: image-url("sign-up-illustration.png");
683 background-position-x: 50px;
687 background-image: image-url("confirm-illustration.png");
691 background-image: image-url("terms-illustration.png");
695 [dir=rtl] .header-illustration {
696 transform: scaleX(-1);
699 transform: scaleX(-1);
703 transform: scaleX(-1);
707 /* Rules for small maps in content areas */
711 margin-bottom: $lineheight;
714 @include media-breakpoint-up(md) {
720 /* Rules for the user map */
722 .content_map .leaflet-popup-content {
727 /* Rules for user popups on maps */
737 /* Rules for the diary entry page */
744 .diary-comment .col-auto {
747 .diary-comment .col {
752 /* Rules for the account confirmation page */
756 padding: $lineheight;
757 margin-bottom: $lineheight;
766 list-style-type: lower-alpha;
771 /* Rules for user images */
783 img.user_thumbnail_tiny {
789 /* General styles for action lists / subnavs */
791 nav.secondary-actions {
804 border-left: 1px solid $grey;
805 padding-left: $lineheight * 0.5;
806 margin-right: $lineheight * 0.5;
807 margin-bottom: $lineheight * 0.125;
812 div.secondary-actions {
817 /* Rules for rich text */
821 background: var(--bs-secondary-bg);
826 background: var(--bs-secondary-bg);
828 white-space: pre-wrap;
836 padding: $lineheight;
837 background-color: var(--bs-tertiary-bg);
844 border-left: $lineheight solid var(--bs-tertiary-bg);
845 padding-left: $lineheight;
847 color: var(--bs-secondary-color);
851 /* Rules for the "Welcome" and "Fix the map" pages */
853 .site-welcome, .site-fixthemap {
857 background-image: image-url("welcome-sprite.svg");
858 background-size: 500px 250px;
862 /*rtl:ignore*/ background-position: -50px 0;
866 /*rtl:ignore*/ background-position: -100px 0;
870 /*rtl:ignore*/ background-position: -150px 0;
874 /*rtl:ignore*/ background-position: -200px 0;
878 /*rtl:ignore*/ background-position: -250px 0;
882 /*rtl:ignore*/ background-position: -300px 0;
886 /*rtl:ignore*/ background-position: -350px 0;
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;
929 background: 40px 40px image-url('about/sprite.png') no-repeat;
933 background-position: 0px 0px;
937 background-position: 0px -40px;
941 background-position: 0px -80px;
945 background-position: 0px -120px;
949 background-position: 0px -160px;
953 background-position: -45px -160px;
962 /* Rules for tabs inside secondary background sections */
964 .bg-body-secondary .nav-tabs {
965 --bs-border-color: var(--bs-secondary-border-subtle);
966 --bs-secondary-bg: var(--bs-secondary-border-subtle);
970 /* Rules for traces */
973 mix-blend-mode: darken;
976 @include color-mode(dark) {
979 mix-blend-mode: lighten;
983 /* Rules for map sidebar icons */
989 display: inline-block;
994 .node, .way, .relation {
999 @each $class, $item in $map-sidebar-icons {
1000 .browse-section #{$class}::before {
1001 content: image-url('browse/#{map.get($item, "filename")}');
1004 @if map.get($item, "invert") {
1005 @include color-mode(dark) {
1006 .browse-section #{$class}::before {
1007 filter: invert(.8) hue-rotate(180deg);