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;
50 #container { position: relative; }
53 vertical-align: middle;
54 margin-right: $lineheight * 0.25;
60 display: inline-block;
64 background: transparent image-url("sprite.png") no-repeat 0 0;
65 background-image: image-url("sprite.svg");
70 .icon.search { /* no-r2 */ background-position: 0 0; }
71 .icon.donate { /* no-r2 */ background-position: -20px 0; }
72 .icon.zoomin { /* no-r2 */ background-position: -40px 0; }
73 .icon.zoomout { /* no-r2 */ background-position: -60px 0; }
74 .icon.geolocate { /* no-r2 */ background-position: -80px 0; }
75 .active .icon.geolocate { /* no-r2 */ background-position: -80px -20px; }
76 .icon.layers { /* no-r2 */ background-position: -100px 0; }
77 .icon.key { /* no-r2 */ background-position: -120px 0; }
78 .icon.share { /* no-r2 */ background-position: -140px 0; }
79 .icon.clipboard { /* no-r2 */ background-position: -160px 0; }
80 .icon.link { /* no-r2 */ background-position: -180px 0; }
81 .icon.close { /* no-r2 */ background-position: -200px 0; }
82 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
83 .icon.check { /* no-r2 */ background-position: -220px 0; }
84 .icon.note { /* no-r2 */ background-position: -240px 0; }
85 .icon.note.grey { /* no-r2 */ background-position: -240px -20px; }
86 .icon.query { /* no-r2 */ background-position: -260px 0; }
88 /* Utility for de-emphasizing content */
94 /* Rules for borders */
95 /* These add additional colours to those provided by bootstrap */
97 border-color: $grey !important;
101 border-color: $lightgrey !important;
104 /* Rules for the header */
109 background: image-url("menu-icon.png") no-repeat;
110 background-size: 30px 30px;
113 margin: 14px 10px 0 0;
118 height: $headerHeight;
123 h1, nav, nav > ul, nav > ul > li {
124 display: inline-block;
129 padding: $lineheight * 0.5;
153 & > .btn-group .btn-outline-primary {
154 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
158 .btn-outline-primary {
163 border-top-color: $grey;
167 background-color: lighten($green, 30%);
172 // Small tweaks to the toggle to stop the primary colour showing through
173 // when the menu is shown
174 .show > .btn-outline-primary.dropdown-toggle {
175 background-color: $green;
176 border-color: $green;
179 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
194 color: darken($darkgrey, 25%);
198 background-color: lighten($grey, 10%);
202 nav.primary, nav.secondary {
205 background-color: $green;
211 #compact-secondary-nav {
216 #compact-secondary-nav {
217 display: inline-block;
231 float: none !important;
239 min-height: $headerHeight;
251 #sidebar .search_forms,
267 border-top: 1px solid #eee;
269 border-bottom: 1px solid #eee;
287 .user-menu, .login-menu {
292 #compact-secondary-nav {
297 display: inline-block;
300 .overlay-sidebar #sidebar .welcome {
304 .overlay-sidebar #sidebar #banner {
309 /* Utility for styling notification numbers */
312 background: lighten($green, 30%);
314 font-weight: $font-weight-normal;
317 /* Rules for Leaflet maps */
319 .leaflet-top.leaflet-right,
320 .leaflet-top.leaflet-left {
324 flex-direction: column;
325 flex-wrap: wrap-reverse;
328 .leaflet-control .control-button {
332 background-color: #333;
333 background-color: rgba(0,0,0,.6);
338 background-color: black;
343 background-color: #333;
344 background-color: rgba(0,0,0,.5);
349 background-color: $vibrant-green;
353 border-start-start-radius: 4px;
357 border-end-start-radius: 4px;
366 /* Rules for the sidebar and main map area */
386 width: $sidebarWidth;
394 .overlay-sidebar #sidebar {
422 width: $sidebarWidth;
438 .leaflet-marker-draggable {
453 border-bottom: 1px solid $grey;
459 @include media-breakpoint-down(md) {
501 border: 2px solid #fff;
504 transition: border-color 0.08s ease-in;
511 border-bottom-right-radius: 3px;
515 text-stroke: 2px #fff;
516 background: rgba(255,255,255,.9);
518 input[type="radio"] {
523 &.active { border-color: darken($green, 10%); }
526 &.active { border-color: darken($green, 20%); }
536 li.disabled { color: $darkgrey; }
547 top: 10px !important;
549 margin-right: 0px !important;
550 margin-top: 0px !important;
554 .leaflet-popup-scrolled {
555 padding-right: $lineheight;
556 border-bottom: 0px !important;
557 border-top: 0px !important;
560 .leaflet-popup-content-wrapper {
561 border-radius: 4px !important;
564 /* Rules for attribution text under the main map shown on printouts */
566 .donate-attr { color: darken($green, 10%) !important; }
568 /* Rules for the sidebar */
578 /* Temporary label size override until we remove site-wide font customisation */
589 /* Stop bootstrap 5 from floating legends when they don't need to be */
594 /* Override the text colour for primary and secondary buttons, to match our
595 bootstrap 4 colours. Note this has accessibility issues, which is why
596 bootstrap 5 calculates black as the appropriate colour, and we should
597 reconsider our colours at some point with that in mind. */
600 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
604 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
607 .btn-outline-secondary {
608 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
611 /* Rules for the search and direction forms */
613 header .search_forms,
618 /* Rules for the map key which appears in the popout sidebar */
621 .mapkey-table-key img {
628 /* Rules for search sidebar */
630 #sidebar .search_results_entry {
632 background: $list-highlight;
635 .search_more .loader {
640 /* Rules for routing */
643 background-image: image-url('routing-sprite.png');
646 background-repeat: no-repeat;
648 @for $i from 0 through 25 {
649 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
659 background: $list-highlight;
662 .routing_marker { width: 15px; cursor: move; }
668 /* Rules for the history sidebar */
670 #sidebar .changesets {
672 &.selected { background: $list-highlight; }
673 /* color is derived from changeset bbox fillColor in history.js */
675 a.stretched-link > span, a:not(.stretched-link), [title] {
677 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
681 .changeset_more .loader {
687 /* Rules for the browse sidebar */
691 padding-bottom: $spacer;
692 margin-bottom: $spacer;
693 border-bottom: 1px solid $grey;
696 word-wrap: break-word;
700 .browse-section:last-of-type {
706 white-space: pre-wrap;
708 tr:last-child th, tr:last-child td {
712 .colour-preview-box {
715 // add color via inline css on element: background-color: <tag value>;
719 span.action-button:hover {
721 text-decoration: underline;
726 margin: 0 0 10px 10px;
739 background: $list-highlight;
746 /* Bootstrap buttons don't have any vertical margin, so
747 they touch when adjacent buttons wrap onto a new line
748 e.g. wide form buttons on a narrow sidebar */
752 margin-bottom: $spacer * 0.25;
756 /* Rules for export sidebar */
764 .export_area_inputs {
765 margin-bottom: $spacer;
773 background: $lightgrey;
775 #maxlat { margin-top: -1px; }
778 /* no-r2 */ margin-left: -1px;
782 /* no-r2 */ margin-right: -1px;
784 #minlat { margin-bottom: -1px; }
788 /* Rules for edit pages */
799 /* Rules for non-map content pages */
802 background: $lightgrey;
809 padding: $lineheight;
812 /* Overrides for pages that use new layout conventions */
814 .header-illustration {
815 background-position: 0 0;
816 background-repeat: no-repeat;
824 background-image: image-url("sign-up-illustration.png");
828 background-image: image-url("confirm-illustration.png");
832 background-image: image-url("terms-illustration.png");
840 background-image: image-url("sign-up-illustration-arm.png");
843 pointer-events: none;
847 [dir=rtl] .header-illustration {
848 transform: scaleX(-1);
851 transform: scaleX(-1);
855 /* Rules for small maps in content areas */
859 margin-bottom: $lineheight;
862 @include media-breakpoint-up(md) {
868 /* Rules for the user map */
870 .content_map .leaflet-popup-content {
875 /* Rules for user popups on maps */
886 /* Rules for the diary entry page */
897 border-top: 1px dashed $grey;
899 border-top: 1px solid $grey;
904 /* Rules for the account confirmation page */
908 padding: $lineheight;
909 margin-bottom: $lineheight;
918 list-style-type: lower-alpha;
923 /* Rules for messages pages */
927 background: $offwhite;
930 .inbox-row-unread td {
936 background-color: $lightgrey;
948 background-color: $lightgrey;
951 /* Rules for user images */
963 img.user_thumbnail_tiny {
970 /* General styles for action lists / subnavs */
972 nav.secondary-actions {
985 border-left: 1px solid $grey;
986 padding-left: $lineheight * 0.5;
987 margin-right: $lineheight * 0.5;
988 margin-bottom: $lineheight * 0.125;
993 div.secondary-actions {
998 /* Rules for rich text */
1003 background: $lightgrey;
1008 background: $lightgrey;
1010 white-space: pre-wrap;
1018 padding: $lineheight;
1019 background-color: $offwhite;
1026 border-left: $lineheight solid $offwhite;
1027 padding-left: $lineheight;
1033 /* Rules for the "Welcome" page */
1034 .site-welcome, .site-fixthemap {
1036 background-image: image-url("welcome-sprite.png");
1037 background-size: 500px 250px;
1047 /* no-r2 */ background-position: -50px 0;
1052 vertical-align: middle;
1056 /* no-r2 */ background-position: -100px 0;
1060 /* no-r2 */ background-position: -150px 0;
1064 /* no-r2 */ background-position: -200px 0;
1068 /* no-r2 */ background-position: -250px 0;
1072 /* no-r2 */ background-position: -300px 0;
1076 /* no-r2 */ background-position: -350px 0;
1080 background-color: #333;
1085 .site-about #content {
1086 background-color: $lightgrey;
1097 color: $vibrant-green;
1103 background-position: 0 50%;
1104 background-repeat: no-repeat;
1105 background-image: image-url('about/osm.png');
1106 background-size: cover;
1107 background-color: $vibrant-green;
1111 background: $vibrant-green;
1115 display: inline-block;
1124 background: 40px 40px image-url('about/sprite.png') no-repeat;
1128 background-position: 0px 0px;
1132 background-position: 0px -40px;
1136 background-position: 0px -80px;
1140 background-position: 0px -120px;
1144 background-position: 0px -160px;
1148 background-position: -45px -160px;