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);
157 color: darken($darkgrey, 25%);
161 background-color: lighten($grey, 10%);
165 nav.primary, nav.secondary {
168 background-color: $green;
174 #compact-secondary-nav {
179 #compact-secondary-nav {
180 display: inline-block;
193 flex-direction: column;
195 min-height: $headerHeight;
207 #sidebar .search_forms,
224 .user-menu, .login-menu {
229 #compact-secondary-nav {
234 display: inline-block;
237 .overlay-sidebar #sidebar .welcome {
241 .overlay-sidebar #sidebar #banner {
246 /* Utility for styling notification numbers */
249 background: lighten($green, 30%);
251 font-weight: $font-weight-normal;
254 /* Rules for Leaflet maps */
256 .leaflet-top.leaflet-right,
257 .leaflet-top.leaflet-left {
261 flex-direction: column;
262 flex-wrap: wrap-reverse;
265 .leaflet-control .control-button {
269 background-color: #333;
270 background-color: rgba(0,0,0,.6);
275 background-color: black;
280 background-color: #333;
281 background-color: rgba(0,0,0,.5);
286 background-color: $vibrant-green;
290 border-start-start-radius: 4px;
294 border-end-start-radius: 4px;
303 /* Rules for the sidebar and main map area */
323 width: $sidebarWidth;
330 .overlay-sidebar #sidebar {
358 width: $sidebarWidth;
374 .leaflet-marker-draggable {
389 border-bottom: 1px solid $grey;
395 @include media-breakpoint-down(md) {
437 border: 2px solid #fff;
440 transition: border-color 0.08s ease-in;
447 border-bottom-right-radius: 3px;
451 text-stroke: 2px #fff;
452 background: rgba(255,255,255,.9);
454 input[type="radio"] {
459 &.active { border-color: darken($green, 10%); }
462 &.active { border-color: darken($green, 20%); }
472 li.disabled { color: $darkgrey; }
483 top: 10px !important;
485 margin-right: 0px !important;
486 margin-top: 0px !important;
490 .leaflet-popup-scrolled {
491 padding-right: $lineheight;
492 border-bottom: 0px !important;
493 border-top: 0px !important;
496 .leaflet-popup-content-wrapper {
497 border-radius: 4px !important;
500 /* Rules for attribution text under the main map shown on printouts */
502 .donate-attr { color: darken($green, 10%) !important; }
504 /* Rules for the sidebar */
514 /* Temporary label size override until we remove site-wide font customisation */
525 /* Stop bootstrap 5 from floating legends when they don't need to be */
530 /* Override the text colour for primary and secondary buttons, to match our
531 bootstrap 4 colours. Note this has accessibility issues, which is why
532 bootstrap 5 calculates black as the appropriate colour, and we should
533 reconsider our colours at some point with that in mind. */
536 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
540 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
543 .btn-outline-secondary {
544 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
547 /* Rules for the search and direction forms */
549 header .search_forms,
554 /* Rules for search sidebar */
556 #sidebar .search_results_entry {
558 background: $list-highlight;
561 .search_more .loader {
566 /* Rules for routing */
569 background-image: image-url('routing-sprite.png');
572 background-repeat: no-repeat;
574 @for $i from 0 through 25 {
575 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
585 background: $list-highlight;
588 .routing_marker { width: 15px; cursor: move; }
594 /* Rules for the history sidebar */
596 #sidebar .changesets {
598 &.selected { background: $list-highlight; }
599 /* color is derived from changeset bbox fillColor in history.js */
601 a.stretched-link > span, a:not(.stretched-link), [title] {
603 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
607 .changeset_more .loader {
613 /* Rules for the browse sidebar */
617 padding-bottom: $spacer;
618 margin-bottom: $spacer;
619 border-bottom: 1px solid $grey;
622 word-wrap: break-word;
626 .browse-section:last-of-type {
632 white-space: pre-wrap;
634 tr:last-child th, tr:last-child td {
641 margin: 0 0 10px 10px;
654 background: $list-highlight;
661 /* Bootstrap buttons don't have any vertical margin, so
662 they touch when adjacent buttons wrap onto a new line
663 e.g. wide form buttons on a narrow sidebar */
667 margin-bottom: $spacer * 0.25;
671 /* Force LTR/RTL alignment for placeholder text */
673 .form-control::placeholder {
677 /* Rules for export sidebar */
685 .export_area_inputs {
686 margin-bottom: $spacer;
694 background: $lightgrey;
696 #maxlat { margin-top: -1px; }
699 /*rtl:ignore*/ margin-left: -1px;
703 /*rtl:ignore*/ margin-right: -1px;
705 #minlat { margin-bottom: -1px; }
709 /* Rules for edit pages */
720 /* Rules for non-map content pages */
726 padding: $lineheight;
729 /* Overrides for pages that use new layout conventions */
731 .header-illustration {
732 background-position: 0 0;
733 background-repeat: no-repeat;
741 background-image: image-url("sign-up-illustration.png");
745 background-image: image-url("confirm-illustration.png");
749 background-image: image-url("terms-illustration.png");
757 background-image: image-url("sign-up-illustration-arm.png");
760 pointer-events: none;
764 [dir=rtl] .header-illustration {
765 transform: scaleX(-1);
768 transform: scaleX(-1);
772 /* Rules for small maps in content areas */
776 margin-bottom: $lineheight;
779 @include media-breakpoint-up(md) {
785 /* Rules for the user map */
787 .content_map .leaflet-popup-content {
792 /* Rules for user popups on maps */
803 /* Rules for the diary entry page */
810 .diary-comment .col-auto {
813 .diary-comment .col {
818 /* Rules for the account confirmation page */
822 padding: $lineheight;
823 margin-bottom: $lineheight;
832 list-style-type: lower-alpha;
837 /* Rules for messages pages */
841 background: $offwhite;
844 .inbox-row-unread td {
850 background-color: $lightgrey;
862 background-color: $lightgrey;
865 /* Rules for user images */
877 img.user_thumbnail_tiny {
883 /* General styles for action lists / subnavs */
885 nav.secondary-actions {
898 border-left: 1px solid $grey;
899 padding-left: $lineheight * 0.5;
900 margin-right: $lineheight * 0.5;
901 margin-bottom: $lineheight * 0.125;
906 div.secondary-actions {
911 /* Rules for rich text */
916 background: $lightgrey;
921 background: $lightgrey;
923 white-space: pre-wrap;
931 padding: $lineheight;
932 background-color: $offwhite;
939 border-left: $lineheight solid $offwhite;
940 padding-left: $lineheight;
946 /* Rules for the "Welcome" page */
947 .site-welcome, .site-fixthemap {
949 background-image: image-url("welcome-sprite.png");
950 background-size: 500px 250px;
960 /*rtl:ignore*/ background-position: -50px 0;
965 vertical-align: middle;
969 /*rtl:ignore*/ background-position: -100px 0;
973 /*rtl:ignore*/ background-position: -150px 0;
977 /*rtl:ignore*/ background-position: -200px 0;
981 /*rtl:ignore*/ background-position: -250px 0;
985 /*rtl:ignore*/ background-position: -300px 0;
989 /*rtl:ignore*/ background-position: -350px 0;
993 background-color: #333;
998 .site-about #content {
999 background-color: $lightgrey;
1010 color: $vibrant-green;
1016 background-position: 0 50%;
1017 background-repeat: no-repeat;
1018 background-image: image-url('about/osm.png');
1019 background-size: cover;
1020 background-color: $vibrant-green;
1024 background: $vibrant-green;
1028 display: inline-block;
1037 background: 40px 40px image-url('about/sprite.png') no-repeat;
1041 background-position: 0px 0px;
1045 background-position: 0px -40px;
1049 background-position: 0px -80px;
1053 background-position: 0px -120px;
1057 background-position: 0px -160px;
1061 background-position: -45px -160px;
1066 /* Rules for tabs inside secondary background sections */
1068 .bg-body-secondary .nav-tabs {
1069 --bs-border-color: var(--bs-secondary-border-subtle);
1070 --bs-secondary-bg: var(--bs-secondary-border-subtle);