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 {
384 border-bottom: 1px solid $grey;
390 @include media-breakpoint-down(md) {
432 border: 2px solid #fff;
435 transition: border-color 0.08s ease-in;
442 border-bottom-right-radius: 3px;
446 text-stroke: 2px #fff;
447 background: rgba(255,255,255,.9);
449 input[type="radio"] {
454 &.active { border-color: darken($green, 10%); }
457 &.active { border-color: darken($green, 20%); }
467 li.disabled { color: $darkgrey; }
478 top: 10px !important;
480 margin-right: 0px !important;
481 margin-top: 0px !important;
485 .leaflet-popup-scrolled {
486 padding-right: $lineheight;
487 border-bottom: 0px !important;
488 border-top: 0px !important;
491 .leaflet-popup-content-wrapper {
492 border-radius: 4px !important;
495 /* Rules for attribution text under the main map shown on printouts */
497 .donate-attr { color: darken($green, 10%) !important; }
499 /* Rules for the sidebar */
509 /* Temporary label size override until we remove site-wide font customisation */
520 /* Stop bootstrap 5 from floating legends when they don't need to be */
525 /* Override the text colour for primary and secondary buttons, to match our
526 bootstrap 4 colours. Note this has accessibility issues, which is why
527 bootstrap 5 calculates black as the appropriate colour, and we should
528 reconsider our colours at some point with that in mind. */
531 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
535 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
538 .btn-outline-secondary {
539 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
542 /* Rules for the search and direction forms */
544 header .search_forms,
549 /* Rules for search sidebar */
551 #sidebar .search_results_entry {
553 background: $list-highlight;
556 .search_more .loader {
561 /* Rules for routing */
564 background-image: image-url('routing-sprite.png');
567 background-repeat: no-repeat;
569 @for $i from 0 through 25 {
570 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
580 background: $list-highlight;
583 .routing_marker { width: 15px; cursor: move; }
589 /* Rules for the history sidebar */
591 #sidebar .changesets {
593 &.selected { background: $list-highlight; }
594 /* color is derived from changeset bbox fillColor in history.js */
596 a.stretched-link > span, a:not(.stretched-link), [title] {
598 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
602 .changeset_more .loader {
608 /* Rules for the browse sidebar */
612 padding-bottom: $spacer;
613 margin-bottom: $spacer;
614 border-bottom: 1px solid $grey;
617 word-wrap: break-word;
621 .browse-section:last-of-type {
627 white-space: pre-wrap;
629 tr:last-child th, tr:last-child td {
636 margin: 0 0 10px 10px;
649 background: $list-highlight;
656 /* Bootstrap buttons don't have any vertical margin, so
657 they touch when adjacent buttons wrap onto a new line
658 e.g. wide form buttons on a narrow sidebar */
662 margin-bottom: $spacer * 0.25;
666 /* Force LTR/RTL alignment for placeholder text */
668 .form-control::placeholder {
672 /* Rules for export sidebar */
680 .export_area_inputs {
681 margin-bottom: $spacer;
689 background: $lightgrey;
691 #maxlat { margin-top: -1px; }
694 /*rtl:ignore*/ margin-left: -1px;
698 /*rtl:ignore*/ margin-right: -1px;
700 #minlat { margin-bottom: -1px; }
704 /* Rules for edit pages */
715 /* Rules for non-map content pages */
721 padding: $lineheight;
724 /* Overrides for pages that use new layout conventions */
726 .header-illustration {
727 background-position: 0 0;
728 background-repeat: no-repeat;
736 background-image: image-url("sign-up-illustration.png");
740 background-image: image-url("confirm-illustration.png");
744 background-image: image-url("terms-illustration.png");
752 background-image: image-url("sign-up-illustration-arm.png");
755 pointer-events: none;
759 [dir=rtl] .header-illustration {
760 transform: scaleX(-1);
763 transform: scaleX(-1);
767 /* Rules for small maps in content areas */
771 margin-bottom: $lineheight;
774 @include media-breakpoint-up(md) {
780 /* Rules for the user map */
782 .content_map .leaflet-popup-content {
787 /* Rules for user popups on maps */
798 /* Rules for the diary entry page */
805 .diary-comment .col-auto {
808 .diary-comment .col {
813 /* Rules for the account confirmation page */
817 padding: $lineheight;
818 margin-bottom: $lineheight;
827 list-style-type: lower-alpha;
832 /* Rules for messages pages */
836 background: $offwhite;
839 .inbox-row-unread td {
845 background-color: $lightgrey;
857 background-color: $lightgrey;
860 /* Rules for user images */
872 img.user_thumbnail_tiny {
878 /* General styles for action lists / subnavs */
880 nav.secondary-actions {
893 border-left: 1px solid $grey;
894 padding-left: $lineheight * 0.5;
895 margin-right: $lineheight * 0.5;
896 margin-bottom: $lineheight * 0.125;
901 div.secondary-actions {
906 /* Rules for rich text */
911 background: $lightgrey;
916 background: $lightgrey;
918 white-space: pre-wrap;
926 padding: $lineheight;
927 background-color: $offwhite;
934 border-left: $lineheight solid $offwhite;
935 padding-left: $lineheight;
941 /* Rules for the "Welcome" page */
942 .site-welcome, .site-fixthemap {
944 background-image: image-url("welcome-sprite.png");
945 background-size: 500px 250px;
955 /*rtl:ignore*/ background-position: -50px 0;
960 vertical-align: middle;
964 /*rtl:ignore*/ background-position: -100px 0;
968 /*rtl:ignore*/ background-position: -150px 0;
972 /*rtl:ignore*/ background-position: -200px 0;
976 /*rtl:ignore*/ background-position: -250px 0;
980 /*rtl:ignore*/ background-position: -300px 0;
984 /*rtl:ignore*/ background-position: -350px 0;
988 background-color: #333;
993 .site-about #content {
994 background-color: $lightgrey;
1005 color: $vibrant-green;
1011 background-position: 0 50%;
1012 background-repeat: no-repeat;
1013 background-image: image-url('about/osm.png');
1014 background-size: cover;
1015 background-color: $vibrant-green;
1019 background: $vibrant-green;
1023 display: inline-block;
1032 background: 40px 40px image-url('about/sprite.png') no-repeat;
1036 background-position: 0px 0px;
1040 background-position: 0px -40px;
1044 background-position: 0px -80px;
1048 background-position: 0px -120px;
1052 background-position: 0px -160px;
1056 background-position: -45px -160px;
1061 /* Rules for tabs inside secondary background sections */
1063 .bg-body-secondary .nav-tabs {
1064 --bs-border-color: var(--bs-secondary-border-subtle);
1065 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1066 margin-bottom: -1px;