3 @import "rails_bootstrap_forms";
5 /* Styles common to large and small screens */
7 /* Default rules for the body of every page */
10 font-size: $typeheight;
23 text-decoration: underline dotted;
26 #container { position: relative; }
29 vertical-align: middle;
30 margin-right: $lineheight * 0.25;
36 display: inline-block;
40 background: transparent image-url("sprite.svg") no-repeat 0 0;
45 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
46 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
47 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
48 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
49 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
50 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
51 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
52 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
53 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
54 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
55 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
56 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
57 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
58 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
59 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
60 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
61 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
63 /* Utility for de-emphasizing content */
69 /* Bootstrap contextual table classes overrides in dark mode */
71 @include color-mode(dark) {
73 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
76 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
79 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
81 .table-primary, .table-secondary, .table-success {
82 --bs-table-color: initial;
83 border-color: inherit;
87 /* Rules for the header */
94 background: image-url("menu-icon.png") no-repeat;
95 background-size: 30px 30px;
98 margin: 14px 10px 0 0;
102 @include color-mode(dark) {
109 height: $headerHeight;
113 h1, nav, nav > ul, nav > ul > li {
114 display: inline-block;
119 padding: $lineheight * 0.5;
142 & > .btn-group .btn-outline-primary {
143 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
147 .btn-outline-primary {
152 border-top-color: $grey;
156 background-color: lighten($green, 30%);
161 // Small tweaks to the toggle to stop the primary colour showing through
162 // when the menu is shown
163 .show > .btn-outline-primary.dropdown-toggle {
164 background-color: $green;
165 border-color: $green;
168 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
179 background-color: lighten($grey, 10%);
183 nav.primary, nav.secondary {
186 background-color: $green;
192 #compact-secondary-nav {
197 #compact-secondary-nav {
198 display: inline-block;
211 flex-direction: column;
213 min-height: $headerHeight;
224 #sidebar .search_forms,
241 .user-menu, .login-menu {
246 #compact-secondary-nav {
251 display: inline-block;
254 .overlay-sidebar #sidebar .welcome {
258 .overlay-sidebar #sidebar #banner {
263 /* Utility for styling notification numbers */
266 background: transparentize(lighten($green, 25%), .25);
268 font-weight: $font-weight-normal;
271 /* Rules for Leaflet maps */
273 .leaflet-top.leaflet-right,
274 .leaflet-top.leaflet-left {
278 flex-direction: column;
279 flex-wrap: wrap-reverse;
282 .leaflet-control .control-button {
286 background-color: #333;
287 background-color: rgba(0,0,0,.6);
292 background-color: black;
297 background-color: #333;
298 background-color: rgba(0,0,0,.5);
303 background-color: $vibrant-green;
307 border-start-start-radius: 4px;
311 border-end-start-radius: 4px;
320 /* Rules for the sidebar and main map area */
340 width: $sidebarWidth;
347 .overlay-sidebar #sidebar {
374 width: $sidebarWidth;
390 .leaflet-marker-draggable {
405 @include media-breakpoint-down(md) {
440 --bs-btn-border-color: var(--bs-body-bg);
443 --bs-btn-border-color: var(--bs-primary-border-subtle);
452 li.disabled { color: $darkgrey; }
463 top: 10px !important;
465 margin-right: 0px !important;
466 margin-top: 0px !important;
470 .leaflet-popup-scrolled {
471 padding-right: $lineheight;
472 border-bottom: 0px !important;
473 border-top: 0px !important;
476 .leaflet-popup-content-wrapper {
477 border-radius: 4px !important;
480 /* Rules for attribution text under the main map shown on printouts */
482 .donate-attr { color: darken($green, 10%) !important; }
484 /* Rules for the sidebar */
494 /* Temporary label size override until we remove site-wide font customisation */
505 /* Stop bootstrap 5 from floating legends when they don't need to be */
510 /* Override the text colour for primary and secondary buttons, to match our
511 bootstrap 4 colours. Note this has accessibility issues, which is why
512 bootstrap 5 calculates black as the appropriate colour, and we should
513 reconsider our colours at some point with that in mind. */
516 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
520 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
523 .btn-outline-secondary {
524 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
527 /* Rules for the search and direction forms */
529 header .search_forms,
540 /* Rules for search sidebar */
542 #sidebar .search_results_entry {
544 background: $list-highlight;
547 .search_more .loader {
552 /* Rules for routing */
555 background-image: image-url('routing-sprite.png');
558 background-repeat: no-repeat;
560 @for $i from 0 through 25 {
561 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
564 @include color-mode(dark) {
577 .routing_marker { width: 15px; cursor: move; }
583 /* Rules for the history sidebar */
585 #sidebar .changesets {
587 &.selected { background: $list-highlight; }
588 /* color is derived from changeset bbox fillColor in history.js */
590 a.stretched-link > span, a:not(.stretched-link), [title] {
592 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
596 .changeset_more .loader {
602 /* Rules for the browse sidebar */
606 padding-bottom: $spacer;
607 margin-bottom: $spacer;
608 border-bottom: 1px solid $grey;
611 word-wrap: break-word;
615 .browse-section:last-of-type {
621 white-space: pre-wrap;
622 word-wrap: break-word;
623 word-break: break-word;
625 tr:last-child th, tr:last-child td {
632 margin: 0 0 10px 10px;
645 background: $list-highlight;
652 /* Bootstrap buttons don't have any vertical margin, so
653 they touch when adjacent buttons wrap onto a new line
654 e.g. wide form buttons on a narrow sidebar */
658 margin-bottom: $spacer * 0.25;
662 /* Force LTR/RTL alignment for placeholder text */
664 .form-control::placeholder {
668 /* Rules for export sidebar */
671 .export_area_inputs {
682 /*rtl:ignore*/ float: left;
685 /*rtl:ignore*/ float: right;
690 /* Rules for edit pages */
701 /* Rules for non-map content pages */
707 padding: $lineheight;
710 /* Overrides for pages that use new layout conventions */
712 .header-illustration {
713 background-position: 0 0;
714 background-repeat: no-repeat;
722 background-image: image-url("sign-up-illustration.png");
726 background-image: image-url("confirm-illustration.png");
730 background-image: image-url("terms-illustration.png");
738 background-image: image-url("sign-up-illustration-arm.png");
741 pointer-events: none;
745 [dir=rtl] .header-illustration {
746 transform: scaleX(-1);
749 transform: scaleX(-1);
753 /* Rules for small maps in content areas */
757 margin-bottom: $lineheight;
760 @include media-breakpoint-up(md) {
766 /* Rules for the user map */
768 .content_map .leaflet-popup-content {
773 /* Rules for user popups on maps */
784 /* Rules for the diary entry page */
791 .diary-comment .col-auto {
794 .diary-comment .col {
799 /* Rules for the account confirmation page */
803 padding: $lineheight;
804 margin-bottom: $lineheight;
813 list-style-type: lower-alpha;
818 /* Rules for user images */
830 img.user_thumbnail_tiny {
836 /* General styles for action lists / subnavs */
838 nav.secondary-actions {
851 border-left: 1px solid $grey;
852 padding-left: $lineheight * 0.5;
853 margin-right: $lineheight * 0.5;
854 margin-bottom: $lineheight * 0.125;
859 div.secondary-actions {
864 /* Rules for rich text */
868 background: var(--bs-secondary-bg);
873 background: var(--bs-secondary-bg);
875 white-space: pre-wrap;
883 padding: $lineheight;
884 background-color: var(--bs-tertiary-bg);
891 border-left: $lineheight solid var(--bs-tertiary-bg);
892 padding-left: $lineheight;
894 color: var(--bs-secondary-color);
898 /* Rules for the "Welcome" page */
899 .site-welcome, .site-fixthemap {
901 background-image: image-url("welcome-sprite.png");
902 background-size: 500px 250px;
912 /*rtl:ignore*/ background-position: -50px 0;
917 vertical-align: middle;
921 /*rtl:ignore*/ background-position: -100px 0;
925 /*rtl:ignore*/ background-position: -150px 0;
929 /*rtl:ignore*/ background-position: -200px 0;
933 /*rtl:ignore*/ background-position: -250px 0;
937 /*rtl:ignore*/ background-position: -300px 0;
941 /*rtl:ignore*/ background-position: -350px 0;
945 background-color: #333;
950 .site-about #content {
960 color: $vibrant-green;
966 background-position: 0 50%;
967 background-repeat: no-repeat;
968 background-image: image-url('about/osm.png');
969 background-size: cover;
970 background-color: $vibrant-green;
974 background: $vibrant-green;
978 display: inline-block;
987 background: 40px 40px image-url('about/sprite.png') no-repeat;
991 background-position: 0px 0px;
995 background-position: 0px -40px;
999 background-position: 0px -80px;
1003 background-position: 0px -120px;
1007 background-position: 0px -160px;
1011 background-position: -45px -160px;
1016 /* Rules for tabs inside secondary background sections */
1018 .bg-body-secondary .nav-tabs {
1019 --bs-border-color: var(--bs-secondary-border-subtle);
1020 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1021 margin-bottom: -1px;
1024 /* Rules for traces */
1027 mix-blend-mode: darken;
1030 @include color-mode(dark) {
1033 mix-blend-mode: lighten;