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 nav.primary, nav.secondary {
168 background-color: $green;
174 #compact-secondary-nav {
179 #compact-secondary-nav {
180 display: inline-block;
193 flex-direction: column;
195 min-height: $headerHeight;
206 #sidebar .search_forms,
223 .user-menu, .login-menu {
228 #compact-secondary-nav {
233 display: inline-block;
236 .overlay-sidebar #sidebar .welcome {
240 .overlay-sidebar #sidebar #banner {
245 /* Utility for styling notification numbers */
248 background: transparentize(lighten($green, 25%), .25);
250 font-weight: $font-weight-normal;
253 /* Rules for Leaflet maps */
255 .leaflet-top.leaflet-right,
256 .leaflet-top.leaflet-left {
260 flex-direction: column;
261 flex-wrap: wrap-reverse;
264 .leaflet-control .control-button {
268 background-color: #333;
269 background-color: rgba(0,0,0,.6);
274 background-color: black;
279 background-color: #333;
280 background-color: rgba(0,0,0,.5);
285 background-color: $vibrant-green;
289 border-start-start-radius: 4px;
293 border-end-start-radius: 4px;
302 /* Rules for the sidebar and main map area */
322 width: $sidebarWidth;
329 .overlay-sidebar #sidebar {
356 width: $sidebarWidth;
372 .leaflet-marker-draggable {
387 @include media-breakpoint-down(md) {
422 --bs-btn-border-color: var(--bs-body-bg);
425 --bs-btn-border-color: var(--bs-primary-border-subtle);
434 li.disabled { color: $darkgrey; }
445 top: 10px !important;
447 margin-right: 0px !important;
448 margin-top: 0px !important;
452 .leaflet-popup-scrolled {
453 padding-right: $lineheight;
454 border-bottom: 0px !important;
455 border-top: 0px !important;
458 .leaflet-popup-content-wrapper,
460 .leaflet-contextmenu,
461 .leaflet-contextmenu-item {
462 @extend .bg-body, .text-body;
465 .leaflet-contextmenu-item.over {
466 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
469 .leaflet-popup-content-wrapper {
473 color: var(--bs-link-color) !important;
477 /* Rules for attribution text under the main map shown on printouts */
479 .donate-attr { color: darken($green, 10%) !important; }
481 /* Rules for the sidebar */
491 /* Temporary label size override until we remove site-wide font customisation */
502 /* Stop bootstrap 5 from floating legends when they don't need to be */
507 /* Override the text colour for primary and secondary buttons, to match our
508 bootstrap 4 colours. Note this has accessibility issues, which is why
509 bootstrap 5 calculates black as the appropriate colour, and we should
510 reconsider our colours at some point with that in mind. */
513 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
517 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
520 .btn-outline-secondary {
521 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
524 /* Rules for the search and direction forms */
526 header .search_forms,
537 /* Rules for search sidebar */
539 #sidebar .search_results_entry {
540 .search_more .loader {
545 /* Rules for routing */
548 background-image: image-url('routing-sprite.png');
551 background-repeat: no-repeat;
553 @for $i from 0 through 25 {
554 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
557 @include color-mode(dark) {
570 .routing_marker { width: 15px; cursor: move; }
576 /* Rules for the history sidebar */
578 #sidebar .changesets {
584 a.stretched-link > span, a:not(.stretched-link), [title] {
586 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
590 .changeset_more .loader {
596 /* Rules for the browse sidebar */
600 padding-bottom: $spacer;
601 margin-bottom: $spacer;
602 border-bottom: 1px solid $grey;
605 word-wrap: break-word;
609 .browse-section:last-of-type {
615 white-space: pre-wrap;
616 word-wrap: break-word;
617 word-break: break-word;
619 tr:last-child th, tr:last-child td {
626 margin: 0 0 10px 10px;
634 /* Bootstrap buttons don't have any vertical margin, so
635 they touch when adjacent buttons wrap onto a new line
636 e.g. wide form buttons on a narrow sidebar */
640 margin-bottom: $spacer * 0.25;
644 /* Force LTR/RTL alignment for placeholder text */
646 .form-control::placeholder {
650 /* Rules for export sidebar */
653 .export_area_inputs {
664 /*rtl:ignore*/ float: left;
667 /*rtl:ignore*/ float: right;
672 /* Rules for edit pages */
683 /* Rules for non-map content pages */
689 padding: $lineheight;
692 /* Overrides for pages that use new layout conventions */
694 .header-illustration {
695 background-position: 0 0;
696 background-repeat: no-repeat;
704 background-image: image-url("sign-up-illustration.png");
708 background-image: image-url("confirm-illustration.png");
712 background-image: image-url("terms-illustration.png");
720 background-image: image-url("sign-up-illustration-arm.png");
723 pointer-events: none;
727 [dir=rtl] .header-illustration {
728 transform: scaleX(-1);
731 transform: scaleX(-1);
735 /* Rules for small maps in content areas */
739 margin-bottom: $lineheight;
742 @include media-breakpoint-up(md) {
748 /* Rules for the user map */
750 .content_map .leaflet-popup-content {
755 /* Rules for user popups on maps */
765 /* Rules for the diary entry page */
772 .diary-comment .col-auto {
775 .diary-comment .col {
780 /* Rules for the account confirmation page */
784 padding: $lineheight;
785 margin-bottom: $lineheight;
794 list-style-type: lower-alpha;
799 /* Rules for user images */
811 img.user_thumbnail_tiny {
817 /* General styles for action lists / subnavs */
819 nav.secondary-actions {
832 border-left: 1px solid $grey;
833 padding-left: $lineheight * 0.5;
834 margin-right: $lineheight * 0.5;
835 margin-bottom: $lineheight * 0.125;
840 div.secondary-actions {
845 /* Rules for rich text */
849 background: var(--bs-secondary-bg);
854 background: var(--bs-secondary-bg);
856 white-space: pre-wrap;
864 padding: $lineheight;
865 background-color: var(--bs-tertiary-bg);
872 border-left: $lineheight solid var(--bs-tertiary-bg);
873 padding-left: $lineheight;
875 color: var(--bs-secondary-color);
879 /* Rules for the "Welcome" page */
880 .site-welcome, .site-fixthemap {
882 background-image: image-url("welcome-sprite.png");
883 background-size: 500px 250px;
893 /*rtl:ignore*/ background-position: -50px 0;
898 vertical-align: middle;
902 /*rtl:ignore*/ background-position: -100px 0;
906 /*rtl:ignore*/ background-position: -150px 0;
910 /*rtl:ignore*/ background-position: -200px 0;
914 /*rtl:ignore*/ background-position: -250px 0;
918 /*rtl:ignore*/ background-position: -300px 0;
922 /*rtl:ignore*/ background-position: -350px 0;
926 .site-about #content {
936 color: $vibrant-green;
942 background-position: 0 50%;
943 background-repeat: no-repeat;
944 background-image: image-url('about/osm.png');
945 background-size: cover;
946 background-color: $vibrant-green;
950 background: $vibrant-green;
954 display: inline-block;
963 background: 40px 40px image-url('about/sprite.png') no-repeat;
967 background-position: 0px 0px;
971 background-position: 0px -40px;
975 background-position: 0px -80px;
979 background-position: 0px -120px;
983 background-position: 0px -160px;
987 background-position: -45px -160px;
992 /* Rules for tabs inside secondary background sections */
994 .bg-body-secondary .nav-tabs {
995 --bs-border-color: var(--bs-secondary-border-subtle);
996 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1000 /* Rules for traces */
1003 mix-blend-mode: darken;
1006 @include color-mode(dark) {
1009 mix-blend-mode: lighten;