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;
61 [dir=rtl] { /* no-r2 */ text-align: right; }
63 [dir=ltr] { /* no-r2 */ text-align: left; }
68 display: inline-block;
72 background: transparent image-url("sprite.png") no-repeat 0 0;
73 background-image: image-url("sprite.svg");
78 .icon.search { /* no-r2 */ background-position: 0 0; }
79 .icon.donate { /* no-r2 */ background-position: -20px 0; }
80 .icon.zoomin { /* no-r2 */ background-position: -40px 0; }
81 .icon.zoomout { /* no-r2 */ background-position: -60px 0; }
82 .icon.geolocate { /* no-r2 */ background-position: -80px 0; }
83 .active .icon.geolocate { /* no-r2 */ background-position: -80px -20px; }
84 .icon.layers { /* no-r2 */ background-position: -100px 0; }
85 .icon.key { /* no-r2 */ background-position: -120px 0; }
86 .icon.share { /* no-r2 */ background-position: -140px 0; }
87 .icon.clipboard { /* no-r2 */ background-position: -160px 0; }
88 .icon.link { /* no-r2 */ background-position: -180px 0; }
89 .icon.close { /* no-r2 */ background-position: -200px 0; }
90 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
91 .icon.check { /* no-r2 */ background-position: -220px 0; }
92 .icon.note { /* no-r2 */ background-position: -240px 0; }
93 .icon.note.grey { /* no-r2 */ background-position: -240px -20px; }
94 .icon.query { /* no-r2 */ background-position: -260px 0; }
96 /* Utility for de-emphasizing content */
102 /* Rules for borders */
103 /* These add additional colours to those provided by bootstrap */
105 border-color: $grey !important;
109 border-color: $lightgrey !important;
112 /* Rules for the header */
117 background: image-url("menu-icon.png") no-repeat;
118 background-size: 30px 30px;
121 margin: 14px 10px 0 0;
126 height: $headerHeight;
131 h1, nav, nav > ul, nav > ul > li {
132 display: inline-block;
137 padding: $lineheight * 0.5;
161 & > .btn-group .btn-outline-primary {
162 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
166 .btn-outline-primary {
171 border-top-color: $grey;
175 background-color: lighten($green, 30%);
180 // Small tweaks to the toggle to stop the primary colour showing through
181 // when the menu is shown
182 .show > .btn-outline-primary.dropdown-toggle {
183 background-color: $green;
184 border-color: $green;
187 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
202 color: darken($darkgrey, 25%);
206 background-color: lighten($grey, 10%);
210 nav.primary, nav.secondary {
213 background-color: $green;
219 #compact-secondary-nav {
224 #compact-secondary-nav {
225 display: inline-block;
239 float: none !important;
247 min-height: $headerHeight;
259 #sidebar .search_forms,
275 border-top: 1px solid #eee;
277 border-bottom: 1px solid #eee;
295 .user-menu, .login-menu {
300 #compact-secondary-nav {
305 display: inline-block;
308 .overlay-sidebar #sidebar .welcome {
312 .overlay-sidebar #sidebar #banner {
317 /* Utility for styling notification numbers */
320 background: lighten($green, 30%);
322 font-weight: $font-weight-normal;
325 /* Rules for Leaflet maps */
327 .leaflet-top.leaflet-right,
328 .leaflet-top.leaflet-left {
332 flex-direction: column;
333 flex-wrap: wrap-reverse;
336 .leaflet-control .control-button {
340 background-color: #333;
341 background-color: rgba(0,0,0,.6);
346 background-color: black;
351 background-color: #333;
352 background-color: rgba(0,0,0,.5);
357 background-color: $vibrant-green;
361 border-start-start-radius: 4px;
365 border-end-start-radius: 4px;
374 /* Rules for the sidebar and main map area */
394 width: $sidebarWidth;
402 .overlay-sidebar #sidebar {
430 width: $sidebarWidth;
446 .leaflet-marker-draggable {
461 border-bottom: 1px solid $grey;
467 @include media-breakpoint-down(md) {
509 border: 2px solid #fff;
512 transition: border-color 0.08s ease-in;
519 border-bottom-right-radius: 3px;
523 text-stroke: 2px #fff;
524 background: rgba(255,255,255,.9);
526 input[type="radio"] {
531 &.active { border-color: darken($green, 10%); }
534 &.active { border-color: darken($green, 20%); }
544 li.disabled { color: $darkgrey; }
555 top: 10px !important;
557 margin-right: 0px !important;
558 margin-top: 0px !important;
562 .leaflet-popup-scrolled {
563 padding-right: $lineheight;
564 border-bottom: 0px !important;
565 border-top: 0px !important;
568 .leaflet-popup-content-wrapper {
569 border-radius: 4px !important;
572 /* Rules for attribution text under the main map shown on printouts */
574 .donate-attr { color: darken($green, 10%) !important; }
576 /* Rules for the sidebar */
586 /* Temporary label size override until we remove site-wide font customisation */
597 /* Stop bootstrap 5 from floating legends when they don't need to be */
602 /* Override the text colour for primary and secondary buttons, to match our
603 bootstrap 4 colours. Note this has accessibility issues, which is why
604 bootstrap 5 calculates black as the appropriate colour, and we should
605 reconsider our colours at some point with that in mind. */
608 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
612 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
615 .btn-outline-secondary {
616 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
619 /* Rules for the search and direction forms */
621 header .search_forms,
626 /* Rules for the map key which appears in the popout sidebar */
629 .mapkey-table-key img {
636 /* Rules for search sidebar */
638 #sidebar .search_results_entry {
640 background: $list-highlight;
643 .search_more .loader {
648 /* Rules for routing */
651 background-image: image-url('routing-sprite.png');
654 background-repeat: no-repeat;
656 @for $i from 0 through 25 {
657 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
667 background: $list-highlight;
670 .routing_marker { width: 15px; cursor: move; }
676 /* Rules for the history sidebar */
678 #sidebar .changesets {
680 &.selected { background: $list-highlight; }
681 /* color is derived from changeset bbox fillColor in history.js */
683 a.stretched-link > span, a:not(.stretched-link), [title] {
685 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
689 .changeset_more .loader {
695 /* Rules for the browse sidebar */
699 padding-bottom: $spacer;
700 margin-bottom: $spacer;
701 border-bottom: 1px solid $grey;
704 word-wrap: break-word;
708 .browse-section:last-of-type {
714 white-space: pre-wrap;
716 tr:last-child th, tr:last-child td {
720 .colour-preview-box {
723 // add color via inline css on element: background-color: <tag value>;
727 span.action-button:hover {
729 text-decoration: underline;
734 margin: 0 0 10px 10px;
747 background: $list-highlight;
754 /* Bootstrap buttons don't have any vertical margin, so
755 they touch when adjacent buttons wrap onto a new line
756 e.g. wide form buttons on a narrow sidebar */
760 margin-bottom: $spacer * 0.25;
764 /* Rules for export sidebar */
772 .export_area_inputs {
773 margin-bottom: $spacer;
781 background: $lightgrey;
783 #maxlat { margin-top: -1px; }
786 /* no-r2 */ margin-left: -1px;
790 /* no-r2 */ margin-right: -1px;
792 #minlat { margin-bottom: -1px; }
796 /* Rules for edit pages */
807 /* Rules for non-map content pages */
810 background: $lightgrey;
817 padding: $lineheight;
820 /* Overrides for pages that use new layout conventions */
822 .header-illustration {
823 background-position: 0 0;
824 background-repeat: no-repeat;
832 background-image: image-url("sign-up-illustration.png");
836 background-image: image-url("confirm-illustration.png");
840 background-image: image-url("terms-illustration.png");
848 background-image: image-url("sign-up-illustration-arm.png");
851 pointer-events: none;
855 [dir=rtl] .header-illustration {
856 transform: scaleX(-1);
859 transform: scaleX(-1);
863 /* Rules for small maps in content areas */
867 margin-bottom: $lineheight;
870 @include media-breakpoint-up(md) {
876 /* Rules for the user map */
878 .content_map .leaflet-popup-content {
883 /* Rules for user popups on maps */
894 /* Rules for the diary entry page */
905 border-top: 1px dashed $grey;
907 border-top: 1px solid $grey;
912 /* Rules for the account confirmation page */
916 padding: $lineheight;
917 margin-bottom: $lineheight;
926 list-style-type: lower-alpha;
931 /* Rules for messages pages */
935 background: $offwhite;
938 .inbox-row-unread td {
944 background-color: $lightgrey;
956 background-color: $lightgrey;
959 /* Rules for user images */
971 img.user_thumbnail_tiny {
978 /* General styles for action lists / subnavs */
980 nav.secondary-actions {
993 border-left: 1px solid $grey;
994 padding-left: $lineheight * 0.5;
995 margin-right: $lineheight * 0.5;
996 margin-bottom: $lineheight * 0.125;
1001 div.secondary-actions {
1006 /* Rules for rich text */
1011 background: $lightgrey;
1016 background: $lightgrey;
1018 white-space: pre-wrap;
1026 padding: $lineheight;
1027 background-color: $offwhite;
1034 border-left: $lineheight solid $offwhite;
1035 padding-left: $lineheight;
1041 /* Rules for the "Welcome" page */
1042 .site-welcome, .site-fixthemap {
1044 background-image: image-url("welcome-sprite.png");
1045 background-size: 500px 250px;
1055 /* no-r2 */ background-position: -50px 0;
1060 vertical-align: middle;
1064 /* no-r2 */ background-position: -100px 0;
1068 /* no-r2 */ background-position: -150px 0;
1072 /* no-r2 */ background-position: -200px 0;
1076 /* no-r2 */ background-position: -250px 0;
1080 /* no-r2 */ background-position: -300px 0;
1084 /* no-r2 */ background-position: -350px 0;
1088 background-color: #333;
1093 .site-about #content {
1094 background-color: $lightgrey;
1105 color: $vibrant-green;
1111 background-position: 0 50%;
1112 background-repeat: no-repeat;
1113 background-image: image-url('about/osm.png');
1114 background-size: cover;
1115 background-color: $vibrant-green;
1119 background: $vibrant-green;
1123 display: inline-block;
1132 background: 40px 40px image-url('about/sprite.png') no-repeat;
1136 background-position: 0px 0px;
1140 background-position: 0px -40px;
1144 background-position: 0px -80px;
1148 background-position: 0px -120px;
1152 background-position: 0px -160px;
1156 background-position: -45px -160px;