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;
14 text-decoration: underline dotted;
17 #container { position: relative; }
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 */
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.png") no-repeat;
81 background-size: 30px 30px;
84 margin: 14px 10px 0 0;
88 @include color-mode(dark) {
95 height: $headerHeight;
99 h1, nav, nav > ul, nav > ul > li {
100 display: inline-block;
105 padding: $lineheight * 0.5;
128 & > .btn-group .btn-outline-primary {
129 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
133 .btn-outline-primary {
138 border-top-color: $grey;
142 background-color: lighten($green, 30%);
147 // Small tweaks to the toggle to stop the primary colour showing through
148 // when the menu is shown
149 .show > .btn-outline-primary.dropdown-toggle {
150 background-color: $green;
151 border-color: $green;
154 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
165 background-color: lighten($grey, 10%);
169 nav.primary, nav.secondary {
172 background-color: $green;
178 #compact-secondary-nav {
183 #compact-secondary-nav {
184 display: inline-block;
197 flex-direction: column;
199 min-height: $headerHeight;
210 #sidebar .search_forms,
227 .user-menu, .login-menu {
232 #compact-secondary-nav {
237 display: inline-block;
240 .overlay-sidebar #sidebar .welcome {
244 .overlay-sidebar #sidebar #banner {
249 /* Utility for styling notification numbers */
252 background: transparentize(lighten($green, 25%), .25);
254 font-weight: $font-weight-normal;
257 /* Rules for Leaflet maps */
259 .leaflet-top.leaflet-right,
260 .leaflet-top.leaflet-left {
264 flex-direction: column;
265 flex-wrap: wrap-reverse;
268 .leaflet-control .control-button {
272 background-color: #333;
273 background-color: rgba(0,0,0,.6);
278 background-color: black;
283 background-color: #333;
284 background-color: rgba(0,0,0,.5);
289 background-color: $vibrant-green;
293 border-start-start-radius: 4px;
297 border-end-start-radius: 4px;
306 /* Rules for the sidebar and main map area */
326 width: $sidebarWidth;
333 .overlay-sidebar #sidebar {
360 width: $sidebarWidth;
376 .leaflet-marker-draggable {
391 @include media-breakpoint-down(md) {
426 --bs-btn-border-color: var(--bs-body-bg);
429 --bs-btn-border-color: var(--bs-primary-border-subtle);
438 li.disabled { color: $darkgrey; }
449 top: 10px !important;
451 margin-right: 0px !important;
452 margin-top: 0px !important;
456 .leaflet-popup-scrolled {
457 padding-right: $lineheight;
458 border-bottom: 0px !important;
459 border-top: 0px !important;
462 .leaflet-popup-content-wrapper,
464 .leaflet-contextmenu,
465 .leaflet-contextmenu-item {
466 @extend .bg-body, .text-body;
469 .leaflet-contextmenu-item.over {
470 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
473 .leaflet-popup-content-wrapper {
477 color: var(--bs-link-color) !important;
481 /* Rules for attribution text under the main map shown on printouts */
483 .donate-attr { color: darken($green, 10%) !important; }
485 /* Rules for the sidebar */
495 /* Temporary label size override until we remove site-wide font customisation */
506 /* Stop bootstrap 5 from floating legends when they don't need to be */
511 /* Override the text colour for primary and secondary buttons, to match our
512 bootstrap 4 colours. Note this has accessibility issues, which is why
513 bootstrap 5 calculates black as the appropriate colour, and we should
514 reconsider our colours at some point with that in mind. */
517 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
521 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
524 .btn-outline-secondary {
525 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
528 /* Rules for the search and direction forms */
530 header .search_forms,
541 /* Rules for search sidebar */
543 #sidebar .search_results_entry {
544 .search_more .loader {
549 /* Rules for routing */
552 background-image: image-url('routing-sprite.png');
555 background-repeat: no-repeat;
557 @for $i from 0 through 25 {
558 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
561 @include color-mode(dark) {
574 .routing_marker { width: 15px; cursor: move; }
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 {
630 margin: 0 0 10px 10px;
638 /* Bootstrap buttons don't have any vertical margin, so
639 they touch when adjacent buttons wrap onto a new line
640 e.g. wide form buttons on a narrow sidebar */
644 margin-bottom: $spacer * 0.25;
648 /* Force LTR/RTL alignment for placeholder text */
650 .form-control::placeholder {
654 /* Rules for export sidebar */
657 .export_area_inputs {
668 /*rtl:ignore*/ float: left;
671 /*rtl:ignore*/ float: right;
676 /* Rules for edit pages */
687 /* Rules for non-map content pages */
693 padding: $lineheight;
696 /* Overrides for pages that use new layout conventions */
698 .header-illustration {
699 background-position: 0 0;
700 background-repeat: no-repeat;
708 background-image: image-url("sign-up-illustration.png");
712 background-image: image-url("confirm-illustration.png");
716 background-image: image-url("terms-illustration.png");
724 background-image: image-url("sign-up-illustration-arm.png");
727 pointer-events: none;
731 [dir=rtl] .header-illustration {
732 transform: scaleX(-1);
735 transform: scaleX(-1);
739 /* Rules for small maps in content areas */
743 margin-bottom: $lineheight;
746 @include media-breakpoint-up(md) {
752 /* Rules for the user map */
754 .content_map .leaflet-popup-content {
759 /* Rules for user popups on maps */
769 /* Rules for the diary entry page */
776 .diary-comment .col-auto {
779 .diary-comment .col {
784 /* Rules for the account confirmation page */
788 padding: $lineheight;
789 margin-bottom: $lineheight;
798 list-style-type: lower-alpha;
803 /* Rules for user images */
815 img.user_thumbnail_tiny {
821 /* General styles for action lists / subnavs */
823 nav.secondary-actions {
836 border-left: 1px solid $grey;
837 padding-left: $lineheight * 0.5;
838 margin-right: $lineheight * 0.5;
839 margin-bottom: $lineheight * 0.125;
844 div.secondary-actions {
849 /* Rules for rich text */
853 background: var(--bs-secondary-bg);
858 background: var(--bs-secondary-bg);
860 white-space: pre-wrap;
868 padding: $lineheight;
869 background-color: var(--bs-tertiary-bg);
876 border-left: $lineheight solid var(--bs-tertiary-bg);
877 padding-left: $lineheight;
879 color: var(--bs-secondary-color);
883 /* Rules for the "Welcome" page */
884 .site-welcome, .site-fixthemap {
886 background-image: image-url("welcome-sprite.png");
887 background-size: 500px 250px;
897 /*rtl:ignore*/ background-position: -50px 0;
902 vertical-align: middle;
906 /*rtl:ignore*/ background-position: -100px 0;
910 /*rtl:ignore*/ background-position: -150px 0;
914 /*rtl:ignore*/ background-position: -200px 0;
918 /*rtl:ignore*/ background-position: -250px 0;
922 /*rtl:ignore*/ background-position: -300px 0;
926 /*rtl:ignore*/ background-position: -350px 0;
930 .site-about #content {
940 color: $vibrant-green;
946 background-position: 0 50%;
947 background-repeat: no-repeat;
948 background-image: image-url('about/osm.png');
949 background-size: cover;
950 background-color: $vibrant-green;
954 background: $vibrant-green;
958 display: inline-block;
967 background: 40px 40px image-url('about/sprite.png') no-repeat;
971 background-position: 0px 0px;
975 background-position: 0px -40px;
979 background-position: 0px -80px;
983 background-position: 0px -120px;
987 background-position: 0px -160px;
991 background-position: -45px -160px;
996 /* Rules for tabs inside secondary background sections */
998 .bg-body-secondary .nav-tabs {
999 --bs-border-color: var(--bs-secondary-border-subtle);
1000 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1001 margin-bottom: -1px;
1004 /* Rules for traces */
1007 mix-blend-mode: darken;
1010 @include color-mode(dark) {
1013 mix-blend-mode: lighten;