3 @import "rails_bootstrap_forms";
5 /* Bootstrap + r2 fixes */
8 .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow {
10 right: unset !important;
11 left: calc(-1 * var(--bs-tooltip-arrow-height)) !important;
15 left: unset !important;
16 right: -1px !important;
20 .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow {
22 left: unset !important;
23 right: calc(-1 * var(--bs-tooltip-arrow-height)) !important;
27 right: unset !important;
28 left: -1px !important;
33 /* Styles common to large and small screens */
35 /* Default rules for the body of every page */
38 font-size: $typeheight;
51 text-decoration: underline dotted;
54 #container { position: relative; }
57 vertical-align: middle;
58 margin-right: $lineheight * 0.25;
64 display: inline-block;
68 background: transparent image-url("sprite.png") no-repeat 0 0;
69 background-image: image-url("sprite.svg");
74 .icon.search { /* no-r2 */ background-position: 0 0; }
75 .icon.donate { /* no-r2 */ background-position: -20px 0; }
76 .icon.zoomin { /* no-r2 */ background-position: -40px 0; }
77 .icon.zoomout { /* no-r2 */ background-position: -60px 0; }
78 .icon.geolocate { /* no-r2 */ background-position: -80px 0; }
79 .active .icon.geolocate { /* no-r2 */ background-position: -80px -20px; }
80 .icon.layers { /* no-r2 */ background-position: -100px 0; }
81 .icon.key { /* no-r2 */ background-position: -120px 0; }
82 .icon.share { /* no-r2 */ background-position: -140px 0; }
83 .icon.clipboard { /* no-r2 */ background-position: -160px 0; }
84 .icon.link { /* no-r2 */ background-position: -180px 0; }
85 .icon.close { /* no-r2 */ background-position: -200px 0; }
86 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
87 .icon.check { /* no-r2 */ background-position: -220px 0; }
88 .icon.note { /* no-r2 */ background-position: -240px 0; }
89 .icon.note.grey { /* no-r2 */ background-position: -240px -20px; }
90 .icon.query { /* no-r2 */ background-position: -260px 0; }
92 /* Utility for de-emphasizing content */
98 /* Rules for borders */
99 /* These add additional colours to those provided by bootstrap */
101 border-color: $grey !important;
105 border-color: $lightgrey !important;
108 /* Rules for the header */
115 background: image-url("menu-icon.png") no-repeat;
116 background-size: 30px 30px;
119 margin: 14px 10px 0 0;
124 height: $headerHeight;
129 h1, nav, nav > ul, nav > ul > li {
130 display: inline-block;
135 padding: $lineheight * 0.5;
158 & > .btn-group .btn-outline-primary {
159 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
163 .btn-outline-primary {
168 border-top-color: $grey;
172 background-color: lighten($green, 30%);
177 // Small tweaks to the toggle to stop the primary colour showing through
178 // when the menu is shown
179 .show > .btn-outline-primary.dropdown-toggle {
180 background-color: $green;
181 border-color: $green;
184 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
196 color: darken($darkgrey, 25%);
200 background-color: lighten($grey, 10%);
204 nav.primary, nav.secondary {
207 background-color: $green;
213 #compact-secondary-nav {
218 #compact-secondary-nav {
219 display: inline-block;
232 flex-direction: column;
234 min-height: $headerHeight;
246 #sidebar .search_forms,
263 border-top: 1px solid #eee;
265 border-bottom: 1px solid #eee;
283 .user-menu, .login-menu {
288 #compact-secondary-nav {
293 display: inline-block;
296 .overlay-sidebar #sidebar .welcome {
300 .overlay-sidebar #sidebar #banner {
305 /* Utility for styling notification numbers */
308 background: lighten($green, 30%);
310 font-weight: $font-weight-normal;
313 /* Rules for Leaflet maps */
315 .leaflet-top.leaflet-right,
316 .leaflet-top.leaflet-left {
320 flex-direction: column;
321 flex-wrap: wrap-reverse;
324 .leaflet-control .control-button {
328 background-color: #333;
329 background-color: rgba(0,0,0,.6);
334 background-color: black;
339 background-color: #333;
340 background-color: rgba(0,0,0,.5);
345 background-color: $vibrant-green;
349 border-start-start-radius: 4px;
353 border-end-start-radius: 4px;
362 /* Rules for the sidebar and main map area */
382 width: $sidebarWidth;
390 .overlay-sidebar #sidebar {
418 width: $sidebarWidth;
434 .leaflet-marker-draggable {
449 border-bottom: 1px solid $grey;
455 @include media-breakpoint-down(md) {
497 border: 2px solid #fff;
500 transition: border-color 0.08s ease-in;
507 border-bottom-right-radius: 3px;
511 text-stroke: 2px #fff;
512 background: rgba(255,255,255,.9);
514 input[type="radio"] {
519 &.active { border-color: darken($green, 10%); }
522 &.active { border-color: darken($green, 20%); }
532 li.disabled { color: $darkgrey; }
543 top: 10px !important;
545 margin-right: 0px !important;
546 margin-top: 0px !important;
550 .leaflet-popup-scrolled {
551 padding-right: $lineheight;
552 border-bottom: 0px !important;
553 border-top: 0px !important;
556 .leaflet-popup-content-wrapper {
557 border-radius: 4px !important;
560 /* Rules for attribution text under the main map shown on printouts */
562 .donate-attr { color: darken($green, 10%) !important; }
564 /* Rules for the sidebar */
574 /* Temporary label size override until we remove site-wide font customisation */
585 /* Stop bootstrap 5 from floating legends when they don't need to be */
590 /* Override the text colour for primary and secondary buttons, to match our
591 bootstrap 4 colours. Note this has accessibility issues, which is why
592 bootstrap 5 calculates black as the appropriate colour, and we should
593 reconsider our colours at some point with that in mind. */
596 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
600 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
603 .btn-outline-secondary {
604 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
607 /* Rules for the search and direction forms */
609 header .search_forms,
614 /* Rules for the map key which appears in the popout sidebar */
617 .mapkey-table-key img {
624 /* Rules for search sidebar */
626 #sidebar .search_results_entry {
628 background: $list-highlight;
631 .search_more .loader {
636 /* Rules for routing */
639 background-image: image-url('routing-sprite.png');
642 background-repeat: no-repeat;
644 @for $i from 0 through 25 {
645 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
655 background: $list-highlight;
658 .routing_marker { width: 15px; cursor: move; }
664 /* Rules for the history sidebar */
666 #sidebar .changesets {
668 &.selected { background: $list-highlight; }
669 /* color is derived from changeset bbox fillColor in history.js */
671 a.stretched-link > span, a:not(.stretched-link), [title] {
673 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
677 .changeset_more .loader {
683 /* Rules for the browse sidebar */
687 padding-bottom: $spacer;
688 margin-bottom: $spacer;
689 border-bottom: 1px solid $grey;
692 word-wrap: break-word;
696 .browse-section:last-of-type {
702 white-space: pre-wrap;
704 tr:last-child th, tr:last-child td {
708 .colour-preview-box {
711 // add color via inline css on element: background-color: <tag value>;
715 span.action-button:hover {
717 text-decoration: underline;
722 margin: 0 0 10px 10px;
735 background: $list-highlight;
742 /* Bootstrap buttons don't have any vertical margin, so
743 they touch when adjacent buttons wrap onto a new line
744 e.g. wide form buttons on a narrow sidebar */
748 margin-bottom: $spacer * 0.25;
752 /* Rules for export sidebar */
760 .export_area_inputs {
761 margin-bottom: $spacer;
769 background: $lightgrey;
771 #maxlat { margin-top: -1px; }
774 /* no-r2 */ margin-left: -1px;
778 /* no-r2 */ margin-right: -1px;
780 #minlat { margin-bottom: -1px; }
784 /* Rules for edit pages */
795 /* Rules for non-map content pages */
798 background: $lightgrey;
805 padding: $lineheight;
808 /* Overrides for pages that use new layout conventions */
810 .header-illustration {
811 background-position: 0 0;
812 background-repeat: no-repeat;
820 background-image: image-url("sign-up-illustration.png");
824 background-image: image-url("confirm-illustration.png");
828 background-image: image-url("terms-illustration.png");
836 background-image: image-url("sign-up-illustration-arm.png");
839 pointer-events: none;
843 [dir=rtl] .header-illustration {
844 transform: scaleX(-1);
847 transform: scaleX(-1);
851 /* Rules for small maps in content areas */
855 margin-bottom: $lineheight;
858 @include media-breakpoint-up(md) {
864 /* Rules for the user map */
866 .content_map .leaflet-popup-content {
871 /* Rules for user popups on maps */
882 /* Rules for the diary entry page */
893 border-top: 1px dashed $grey;
895 border-top: 1px solid $grey;
900 /* Rules for the account confirmation page */
904 padding: $lineheight;
905 margin-bottom: $lineheight;
914 list-style-type: lower-alpha;
919 /* Rules for messages pages */
923 background: $offwhite;
926 .inbox-row-unread td {
932 background-color: $lightgrey;
944 background-color: $lightgrey;
947 /* Rules for user images */
959 img.user_thumbnail_tiny {
966 /* General styles for action lists / subnavs */
968 nav.secondary-actions {
981 border-left: 1px solid $grey;
982 padding-left: $lineheight * 0.5;
983 margin-right: $lineheight * 0.5;
984 margin-bottom: $lineheight * 0.125;
989 div.secondary-actions {
994 /* Rules for rich text */
999 background: $lightgrey;
1004 background: $lightgrey;
1006 white-space: pre-wrap;
1014 padding: $lineheight;
1015 background-color: $offwhite;
1022 border-left: $lineheight solid $offwhite;
1023 padding-left: $lineheight;
1029 /* Rules for the "Welcome" page */
1030 .site-welcome, .site-fixthemap {
1032 background-image: image-url("welcome-sprite.png");
1033 background-size: 500px 250px;
1043 /* no-r2 */ background-position: -50px 0;
1048 vertical-align: middle;
1052 /* no-r2 */ background-position: -100px 0;
1056 /* no-r2 */ background-position: -150px 0;
1060 /* no-r2 */ background-position: -200px 0;
1064 /* no-r2 */ background-position: -250px 0;
1068 /* no-r2 */ background-position: -300px 0;
1072 /* no-r2 */ background-position: -350px 0;
1076 background-color: #333;
1081 .site-about #content {
1082 background-color: $lightgrey;
1093 color: $vibrant-green;
1099 background-position: 0 50%;
1100 background-repeat: no-repeat;
1101 background-image: image-url('about/osm.png');
1102 background-size: cover;
1103 background-color: $vibrant-green;
1107 background: $vibrant-green;
1111 display: inline-block;
1120 background: 40px 40px image-url('about/sprite.png') no-repeat;
1124 background-position: 0px 0px;
1128 background-position: 0px -40px;
1132 background-position: 0px -80px;
1136 background-position: 0px -120px;
1140 background-position: 0px -160px;
1144 background-position: -45px -160px;