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;
22 #container { position: relative; }
25 vertical-align: middle;
26 margin-right: $lineheight * 0.25;
29 [dir=rtl] { /* no-r2 */ text-align: right; }
31 [dir=ltr] { /* no-r2 */ text-align: left; }
36 display: inline-block;
40 background: transparent image-url("sprite.png") no-repeat 0 0;
41 background-image: image-url("sprite.svg");
46 .icon.search { /* no-r2 */ background-position: 0 0; }
47 .icon.donate { /* no-r2 */ background-position: -20px 0; }
48 .icon.zoomin { /* no-r2 */ background-position: -40px 0; }
49 .icon.zoomout { /* no-r2 */ background-position: -60px 0; }
50 .icon.geolocate { /* no-r2 */ background-position: -80px 0; }
51 .active .icon.geolocate { /* no-r2 */ background-position: -80px -20px; }
52 .icon.layers { /* no-r2 */ background-position: -100px 0; }
53 .icon.key { /* no-r2 */ background-position: -120px 0; }
54 .icon.share { /* no-r2 */ background-position: -140px 0; }
55 .icon.clipboard { /* no-r2 */ background-position: -160px 0; }
56 .icon.link { /* no-r2 */ background-position: -180px 0; }
57 .icon.close { /* no-r2 */ background-position: -200px 0; }
58 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
59 .icon.check { /* no-r2 */ background-position: -220px 0; }
60 .icon.note { /* no-r2 */ background-position: -240px 0; }
61 .icon.note.grey { /* no-r2 */ background-position: -240px -20px; }
62 .icon.query { /* no-r2 */ background-position: -260px 0; }
64 /* Utility for de-emphasizing content */
70 /* Rules for borders */
71 /* These add additional colours to those provided by bootstrap */
73 border-color: $grey !important;
77 border-color: $lightgrey !important;
80 /* Rules for the header */
85 background: image-url("menu-icon.png") no-repeat;
86 background-size: 30px 30px;
89 margin: 14px 10px 0 0;
94 height: $headerHeight;
99 h1, nav, nav > ul, nav > ul > li {
100 display: inline-block;
105 padding: $lineheight * 0.5;
129 & > .btn-group .btn-outline-primary {
130 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
134 .btn-outline-primary {
139 border-top-color: $grey;
143 background-color: lighten($green, 30%);
148 // Small tweaks to the toggle to stop the primary colour showing through
149 // when the menu is shown
150 .show > .btn-outline-primary.dropdown-toggle {
151 background-color: $green;
152 border-color: $green;
155 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
170 color: darken($darkgrey, 25%);
174 background-color: lighten($grey, 10%);
178 nav.primary, nav.secondary {
181 background-color: $green;
187 #compact-secondary-nav {
192 #compact-secondary-nav {
193 display: inline-block;
207 float: none !important;
215 min-height: $headerHeight;
227 #sidebar .search_forms,
243 border-top: 1px solid #eee;
245 border-bottom: 1px solid #eee;
263 .user-menu, .login-menu {
268 #compact-secondary-nav {
273 display: inline-block;
276 .overlay-sidebar #sidebar .welcome {
280 .overlay-sidebar #sidebar #banner {
285 /* Utility for styling notification numbers */
288 background: lighten($green, 30%);
290 font-weight: $font-weight-normal;
293 /* Rules for the message shown in place of the map when javascript is disabled */
301 /* Rules for Leaflet maps */
303 .leaflet-top.leaflet-right,
304 .leaflet-top.leaflet-left {
308 flex-direction: column;
309 flex-wrap: wrap-reverse;
312 .leaflet-control .control-button {
316 background-color: #333;
317 background-color: rgba(0,0,0,.6);
322 background-color: black;
327 background-color: #333;
328 background-color: rgba(0,0,0,.5);
333 background-color: $vibrant-green;
337 border-start-start-radius: 4px;
341 border-end-start-radius: 4px;
350 /* Rules for the sidebar and main map area */
370 width: $sidebarWidth;
386 .overlay-sidebar #sidebar {
419 width: $sidebarWidth;
423 background-color: rgba(255, 255, 255, 0.5);
440 .leaflet-marker-draggable {
455 border-bottom: 1px solid $grey;
461 @include media-breakpoint-down(md) {
503 border: 2px solid #fff;
506 transition: border-color 0.08s ease-in;
513 border-bottom-right-radius: 3px;
517 text-stroke: 2px #fff;
518 background: rgba(255,255,255,.9);
520 input[type="radio"] {
525 &.active { border-color: darken($green, 10%); }
528 &.active { border-color: darken($green, 20%); }
538 li.disabled { color: $darkgrey; }
549 top: 10px !important;
551 margin-right: 0px !important;
552 margin-top: 0px !important;
556 .leaflet-popup-scrolled {
557 padding-right: $lineheight;
558 border-bottom: 0px !important;
559 border-top: 0px !important;
562 .leaflet-popup-content-wrapper {
563 border-radius: 4px !important;
566 /* Rules for attribution text under the main map shown on printouts */
572 .donate-attr { color: darken($green, 10%) !important; }
574 /* Rules for the sidebar */
588 /* Temporary label size override until we remove site-wide font customisation */
599 /* Stop bootstrap 5 from floating legends when they don't need to be */
604 /* Override the text colour for primary and secondary buttons, to match our
605 bootstrap 4 colours. Note this has accessibility issues, which is why
606 bootstrap 5 calculates black as the appropriate colour, and we should
607 reconsider our colours at some point with that in mind. */
610 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
614 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
617 .btn-outline-secondary {
618 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
621 /* Rules for the search and direction forms */
623 header .search_forms,
628 /* Rules for the map key which appears in the popout sidebar */
631 .mapkey-table-key img {
638 /* Rules for search sidebar */
640 #sidebar .search_results_entry {
643 &.selected { background: $list-highlight; }
646 .search_more .loader {
651 .search_results_error {
656 /* Rules for routing */
659 background-image: image-url('routing-sprite.png');
662 background-repeat: no-repeat;
664 @for $i from 0 through 25 {
665 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
677 background: $list-highlight;
680 .routing_marker { width: 15px; cursor: move; }
686 /* Rules for the history sidebar */
688 #sidebar .changesets {
690 &.selected { background: $list-highlight; }
691 /* color is derived from changeset bbox fillColor in history.js */
693 a.stretched-link > span, a:not(.stretched-link), [title] {
695 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
699 .changeset_more .loader {
705 /* Rules for the browse sidebar */
709 padding-bottom: $spacer;
710 margin-bottom: $spacer;
711 border-bottom: 1px solid $grey;
714 word-wrap: break-word;
718 .browse-section:last-of-type {
723 background-color: $offwhite;
725 border-collapse: separate;
728 margin-bottom: $spacer;
731 border-bottom: 1px solid $grey;
734 tr:last-child th, tr:last-child td {
742 word-wrap: break-word;
743 white-space: pre-wrap;
748 background-color: $offwhite;
752 border-left: 1px solid $grey;
753 background-color: #fff;
756 .colour-preview-box {
761 border: 1px solid rgba(0, 0, 0, .1);
762 // add color via inline css on element: background-color: <tag value>;
766 span.action-button:hover {
768 text-decoration: underline;
773 margin: 0 0 10px 10px;
786 background: $list-highlight;
793 /* Bootstrap buttons don't have any vertical margin, so
794 they touch when adjacent buttons wrap onto a new line
795 e.g. wide form buttons on a narrow sidebar */
799 margin-bottom: $spacer * 0.25;
803 /* Rules for export sidebar */
811 .export_area_inputs {
812 margin-bottom: $spacer;
820 background: $lightgrey;
822 #maxlat { margin-top: -1px; }
825 /* no-r2 */ margin-left: -1px;
829 /* no-r2 */ margin-right: -1px;
831 #minlat { margin-bottom: -1px; }
835 /* Rules for edit pages */
851 /* Rules for non-map content pages */
854 background: $lightgrey;
861 padding: $lineheight;
864 /* Overrides for pages that use new layout conventions */
866 .header-illustration {
867 background-position: 0 0;
868 background-repeat: no-repeat;
876 background-image: image-url("sign-up-illustration.png");
880 background-image: image-url("confirm-illustration.png");
884 background-image: image-url("terms-illustration.png");
892 background-image: image-url("sign-up-illustration-arm.png");
895 pointer-events: none;
899 [dir=rtl] .header-illustration {
900 transform: scaleX(-1);
903 transform: scaleX(-1);
916 /* Rules for small maps in content areas */
920 margin-bottom: $lineheight;
923 @include media-breakpoint-up(md) {
929 /* Rules for the user map */
931 .content_map .leaflet-popup-content {
936 /* Rules for user popups on maps */
947 /* Rules for the user list */
953 /* Rules for the diary entry page */
964 border-top: 1px dashed $grey;
966 border-top: 1px solid $grey;
971 /* Rules for the account confirmation page */
975 padding: $lineheight;
976 margin-bottom: $lineheight;
985 list-style-type: lower-alpha;
990 /* Rules for messages pages */
994 background: $offwhite;
1003 background-color: $lightgrey;
1009 .describe_location {
1015 background-color: $lightgrey;
1018 /* Rules for user images */
1025 img.user_thumbnail {
1030 img.user_thumbnail_tiny {
1037 /* General styles for action lists / subnavs */
1039 nav.secondary-actions {
1044 flex-direction: row;
1052 border-left: 1px solid $grey;
1053 padding-left: $lineheight * 0.5;
1054 margin-right: $lineheight * 0.5;
1055 margin-bottom: $lineheight * 0.125;
1060 div.secondary-actions {
1065 /* Rules for rich text */
1070 background: $lightgrey;
1075 background: $lightgrey;
1077 white-space: pre-wrap;
1085 padding: $lineheight;
1086 background-color: $offwhite;
1093 border-left: $lineheight solid $offwhite;
1094 padding-left: $lineheight;
1100 /* Rules for the iD editor */
1107 /* Rules for the "Welcome" page */
1108 .site-welcome, .site-fixthemap {
1110 background-image: image-url("welcome-sprite.png");
1111 background-size: 500px 250px;
1121 /* no-r2 */ background-position: -50px 0;
1126 vertical-align: middle;
1130 /* no-r2 */ background-position: -100px 0;
1134 /* no-r2 */ background-position: -150px 0;
1138 /* no-r2 */ background-position: -200px 0;
1142 /* no-r2 */ background-position: -250px 0;
1146 /* no-r2 */ background-position: -300px 0;
1150 /* no-r2 */ background-position: -350px 0;
1154 background-color: #333;
1159 .site-about #content {
1160 background-color: $lightgrey;
1171 color: $vibrant-green;
1177 background-position: 0 50%;
1178 background-repeat: no-repeat;
1179 background-image: image-url('about/osm.png');
1180 background-size: cover;
1181 background-color: $vibrant-green;
1185 background: $vibrant-green;
1189 display: inline-block;
1198 background: 40px 40px image-url('about/sprite.png') no-repeat;
1202 background-position: 0px 0px;
1206 background-position: 0px -40px;
1210 background-position: 0px -80px;
1214 background-position: 0px -120px;
1218 background-position: 0px -160px;
1222 background-position: -45px -160px;