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 /* Rules for the header */
76 background: image-url("menu-icon.png") no-repeat;
77 background-size: 30px 30px;
80 margin: 14px 10px 0 0;
85 height: $headerHeight;
90 h1, nav, nav > ul, nav > ul > li {
91 display: inline-block;
96 padding: $lineheight * 0.5;
119 & > .btn-group .btn-outline-primary {
120 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
124 .btn-outline-primary {
129 border-top-color: $grey;
133 background-color: lighten($green, 30%);
138 // Small tweaks to the toggle to stop the primary colour showing through
139 // when the menu is shown
140 .show > .btn-outline-primary.dropdown-toggle {
141 background-color: $green;
142 border-color: $green;
145 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
156 background-color: lighten($grey, 10%);
160 nav.primary, nav.secondary {
163 background-color: $green;
169 #compact-secondary-nav {
174 #compact-secondary-nav {
175 display: inline-block;
188 flex-direction: column;
190 min-height: $headerHeight;
202 #sidebar .search_forms,
219 .user-menu, .login-menu {
224 #compact-secondary-nav {
229 display: inline-block;
232 .overlay-sidebar #sidebar .welcome {
236 .overlay-sidebar #sidebar #banner {
241 /* Utility for styling notification numbers */
244 background: lighten($green, 30%);
246 font-weight: $font-weight-normal;
249 /* Rules for Leaflet maps */
251 .leaflet-top.leaflet-right,
252 .leaflet-top.leaflet-left {
256 flex-direction: column;
257 flex-wrap: wrap-reverse;
260 .leaflet-control .control-button {
264 background-color: #333;
265 background-color: rgba(0,0,0,.6);
270 background-color: black;
275 background-color: #333;
276 background-color: rgba(0,0,0,.5);
281 background-color: $vibrant-green;
285 border-start-start-radius: 4px;
289 border-end-start-radius: 4px;
298 /* Rules for the sidebar and main map area */
318 width: $sidebarWidth;
325 .overlay-sidebar #sidebar {
353 width: $sidebarWidth;
369 .leaflet-marker-draggable {
383 border-bottom: 1px solid $grey;
389 @include media-breakpoint-down(md) {
431 border: 2px solid transparent;
434 transition: border-color 0.08s ease-in;
441 border-bottom-right-radius: 3px;
445 background-color: var(--bs-body-bg);
448 input[type="radio"] {
453 &.active { border-color: darken($green, 10%); }
456 &.active { border-color: darken($green, 20%); }
466 li.disabled { color: $darkgrey; }
477 top: 10px !important;
479 margin-right: 0px !important;
480 margin-top: 0px !important;
484 .leaflet-popup-scrolled {
485 padding-right: $lineheight;
486 border-bottom: 0px !important;
487 border-top: 0px !important;
490 .leaflet-popup-content-wrapper {
491 border-radius: 4px !important;
494 /* Rules for attribution text under the main map shown on printouts */
496 .donate-attr { color: darken($green, 10%) !important; }
498 /* Rules for the sidebar */
508 /* Temporary label size override until we remove site-wide font customisation */
519 /* Stop bootstrap 5 from floating legends when they don't need to be */
524 /* Override the text colour for primary and secondary buttons, to match our
525 bootstrap 4 colours. Note this has accessibility issues, which is why
526 bootstrap 5 calculates black as the appropriate colour, and we should
527 reconsider our colours at some point with that in mind. */
530 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
534 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
537 .btn-outline-secondary {
538 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
541 /* Rules for the search and direction forms */
543 header .search_forms,
548 /* Rules for search sidebar */
550 #sidebar .search_results_entry {
552 background: $list-highlight;
555 .search_more .loader {
560 /* Rules for routing */
563 background-image: image-url('routing-sprite.png');
566 background-repeat: no-repeat;
568 @for $i from 0 through 25 {
569 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
579 background: $list-highlight;
582 .routing_marker { width: 15px; cursor: move; }
588 /* Rules for the history sidebar */
590 #sidebar .changesets {
592 &.selected { background: $list-highlight; }
593 /* color is derived from changeset bbox fillColor in history.js */
595 a.stretched-link > span, a:not(.stretched-link), [title] {
597 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
601 .changeset_more .loader {
607 /* Rules for the browse sidebar */
611 padding-bottom: $spacer;
612 margin-bottom: $spacer;
613 border-bottom: 1px solid $grey;
616 word-wrap: break-word;
620 .browse-section:last-of-type {
626 white-space: pre-wrap;
628 tr:last-child th, tr:last-child td {
635 margin: 0 0 10px 10px;
648 background: $list-highlight;
655 /* Bootstrap buttons don't have any vertical margin, so
656 they touch when adjacent buttons wrap onto a new line
657 e.g. wide form buttons on a narrow sidebar */
661 margin-bottom: $spacer * 0.25;
665 /* Force LTR/RTL alignment for placeholder text */
667 .form-control::placeholder {
671 /* Rules for export sidebar */
679 .export_area_inputs {
680 margin-bottom: $spacer;
692 /*rtl:ignore*/ float: left;
695 /*rtl:ignore*/ float: right;
700 /* Rules for edit pages */
711 /* Rules for non-map content pages */
717 padding: $lineheight;
720 /* Overrides for pages that use new layout conventions */
722 .header-illustration {
723 background-position: 0 0;
724 background-repeat: no-repeat;
732 background-image: image-url("sign-up-illustration.png");
736 background-image: image-url("confirm-illustration.png");
740 background-image: image-url("terms-illustration.png");
748 background-image: image-url("sign-up-illustration-arm.png");
751 pointer-events: none;
755 [dir=rtl] .header-illustration {
756 transform: scaleX(-1);
759 transform: scaleX(-1);
763 /* Rules for small maps in content areas */
767 margin-bottom: $lineheight;
770 @include media-breakpoint-up(md) {
776 /* Rules for the user map */
778 .content_map .leaflet-popup-content {
783 /* Rules for user popups on maps */
794 /* Rules for the diary entry page */
801 .diary-comment .col-auto {
804 .diary-comment .col {
809 /* Rules for the account confirmation page */
813 padding: $lineheight;
814 margin-bottom: $lineheight;
823 list-style-type: lower-alpha;
828 /* Rules for messages pages */
832 background: $offwhite;
835 .inbox-row-unread td {
850 /* Rules for user images */
862 img.user_thumbnail_tiny {
868 /* General styles for action lists / subnavs */
870 nav.secondary-actions {
883 border-left: 1px solid $grey;
884 padding-left: $lineheight * 0.5;
885 margin-right: $lineheight * 0.5;
886 margin-bottom: $lineheight * 0.125;
891 div.secondary-actions {
896 /* Rules for rich text */
901 background: var(--bs-secondary-bg);
906 background: var(--bs-secondary-bg);
908 white-space: pre-wrap;
916 padding: $lineheight;
917 background-color: var(--bs-tertiary-bg);
924 border-left: $lineheight solid var(--bs-tertiary-bg);
925 padding-left: $lineheight;
927 color: var(--bs-secondary-color);
931 /* Rules for the "Welcome" page */
932 .site-welcome, .site-fixthemap {
934 background-image: image-url("welcome-sprite.png");
935 background-size: 500px 250px;
945 /*rtl:ignore*/ background-position: -50px 0;
950 vertical-align: middle;
954 /*rtl:ignore*/ background-position: -100px 0;
958 /*rtl:ignore*/ background-position: -150px 0;
962 /*rtl:ignore*/ background-position: -200px 0;
966 /*rtl:ignore*/ background-position: -250px 0;
970 /*rtl:ignore*/ background-position: -300px 0;
974 /*rtl:ignore*/ background-position: -350px 0;
978 background-color: #333;
983 .site-about #content {
984 background-color: $lightgrey;
995 color: $vibrant-green;
1001 background-position: 0 50%;
1002 background-repeat: no-repeat;
1003 background-image: image-url('about/osm.png');
1004 background-size: cover;
1005 background-color: $vibrant-green;
1009 background: $vibrant-green;
1013 display: inline-block;
1022 background: 40px 40px image-url('about/sprite.png') no-repeat;
1026 background-position: 0px 0px;
1030 background-position: 0px -40px;
1034 background-position: 0px -80px;
1038 background-position: 0px -120px;
1042 background-position: 0px -160px;
1046 background-position: -45px -160px;
1051 /* Rules for tabs inside secondary background sections */
1053 .bg-body-secondary .nav-tabs {
1054 --bs-border-color: var(--bs-secondary-border-subtle);
1055 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1056 margin-bottom: -1px;