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 */
568 .donate-attr { color: darken($green, 10%) !important; }
570 /* Rules for the sidebar */
584 /* Temporary label size override until we remove site-wide font customisation */
595 /* Stop bootstrap 5 from floating legends when they don't need to be */
600 /* Override the text colour for primary and secondary buttons, to match our
601 bootstrap 4 colours. Note this has accessibility issues, which is why
602 bootstrap 5 calculates black as the appropriate colour, and we should
603 reconsider our colours at some point with that in mind. */
606 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
610 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
613 .btn-outline-secondary {
614 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
617 /* Rules for the search and direction forms */
619 header .search_forms,
624 /* Rules for the map key which appears in the popout sidebar */
627 .mapkey-table-key img {
634 /* Rules for search sidebar */
636 #sidebar .search_results_entry {
638 background: $list-highlight;
641 .search_more .loader {
646 /* Rules for routing */
649 background-image: image-url('routing-sprite.png');
652 background-repeat: no-repeat;
654 @for $i from 0 through 25 {
655 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
665 background: $list-highlight;
668 .routing_marker { width: 15px; cursor: move; }
674 /* Rules for the history sidebar */
676 #sidebar .changesets {
678 &.selected { background: $list-highlight; }
679 /* color is derived from changeset bbox fillColor in history.js */
681 a.stretched-link > span, a:not(.stretched-link), [title] {
683 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
687 .changeset_more .loader {
693 /* Rules for the browse sidebar */
697 padding-bottom: $spacer;
698 margin-bottom: $spacer;
699 border-bottom: 1px solid $grey;
702 word-wrap: break-word;
706 .browse-section:last-of-type {
711 background-color: $offwhite;
713 border-collapse: separate;
716 margin-bottom: $spacer;
719 border-bottom: 1px solid $grey;
722 tr:last-child th, tr:last-child td {
730 word-wrap: break-word;
731 white-space: pre-wrap;
736 background-color: $offwhite;
740 border-left: 1px solid $grey;
741 background-color: #fff;
744 .colour-preview-box {
749 border: 1px solid rgba(0, 0, 0, .1);
750 // add color via inline css on element: background-color: <tag value>;
754 span.action-button:hover {
756 text-decoration: underline;
761 margin: 0 0 10px 10px;
774 background: $list-highlight;
781 /* Bootstrap buttons don't have any vertical margin, so
782 they touch when adjacent buttons wrap onto a new line
783 e.g. wide form buttons on a narrow sidebar */
787 margin-bottom: $spacer * 0.25;
791 /* Rules for export sidebar */
799 .export_area_inputs {
800 margin-bottom: $spacer;
808 background: $lightgrey;
810 #maxlat { margin-top: -1px; }
813 /* no-r2 */ margin-left: -1px;
817 /* no-r2 */ margin-right: -1px;
819 #minlat { margin-bottom: -1px; }
823 /* Rules for edit pages */
839 /* Rules for non-map content pages */
842 background: $lightgrey;
849 padding: $lineheight;
852 /* Overrides for pages that use new layout conventions */
854 .header-illustration {
855 background-position: 0 0;
856 background-repeat: no-repeat;
864 background-image: image-url("sign-up-illustration.png");
868 background-image: image-url("confirm-illustration.png");
872 background-image: image-url("terms-illustration.png");
880 background-image: image-url("sign-up-illustration-arm.png");
883 pointer-events: none;
887 [dir=rtl] .header-illustration {
888 transform: scaleX(-1);
891 transform: scaleX(-1);
904 /* Rules for small maps in content areas */
908 margin-bottom: $lineheight;
911 @include media-breakpoint-up(md) {
917 /* Rules for the user map */
919 .content_map .leaflet-popup-content {
924 /* Rules for user popups on maps */
935 /* Rules for the diary entry page */
946 border-top: 1px dashed $grey;
948 border-top: 1px solid $grey;
953 /* Rules for the account confirmation page */
957 padding: $lineheight;
958 margin-bottom: $lineheight;
967 list-style-type: lower-alpha;
972 /* Rules for messages pages */
976 background: $offwhite;
985 background-color: $lightgrey;
997 background-color: $lightgrey;
1000 /* Rules for user images */
1007 img.user_thumbnail {
1012 img.user_thumbnail_tiny {
1019 /* General styles for action lists / subnavs */
1021 nav.secondary-actions {
1026 flex-direction: row;
1034 border-left: 1px solid $grey;
1035 padding-left: $lineheight * 0.5;
1036 margin-right: $lineheight * 0.5;
1037 margin-bottom: $lineheight * 0.125;
1042 div.secondary-actions {
1047 /* Rules for rich text */
1052 background: $lightgrey;
1057 background: $lightgrey;
1059 white-space: pre-wrap;
1067 padding: $lineheight;
1068 background-color: $offwhite;
1075 border-left: $lineheight solid $offwhite;
1076 padding-left: $lineheight;
1082 /* Rules for the iD editor */
1089 /* Rules for the "Welcome" page */
1090 .site-welcome, .site-fixthemap {
1092 background-image: image-url("welcome-sprite.png");
1093 background-size: 500px 250px;
1103 /* no-r2 */ background-position: -50px 0;
1108 vertical-align: middle;
1112 /* no-r2 */ background-position: -100px 0;
1116 /* no-r2 */ background-position: -150px 0;
1120 /* no-r2 */ background-position: -200px 0;
1124 /* no-r2 */ background-position: -250px 0;
1128 /* no-r2 */ background-position: -300px 0;
1132 /* no-r2 */ background-position: -350px 0;
1136 background-color: #333;
1141 .site-about #content {
1142 background-color: $lightgrey;
1153 color: $vibrant-green;
1159 background-position: 0 50%;
1160 background-repeat: no-repeat;
1161 background-image: image-url('about/osm.png');
1162 background-size: cover;
1163 background-color: $vibrant-green;
1167 background: $vibrant-green;
1171 display: inline-block;
1180 background: 40px 40px image-url('about/sprite.png') no-repeat;
1184 background-position: 0px 0px;
1188 background-position: 0px -40px;
1192 background-position: 0px -80px;
1196 background-position: 0px -120px;
1200 background-position: 0px -160px;
1204 background-position: -45px -160px;