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/4;
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/2;
113 text-decoration: none;
120 vertical-align: middle;
146 .btn-outline-primary {
147 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
151 .btn-outline-primary {
156 border-top-color: $grey;
160 background-color: lighten($green, 30%);
165 // Small tweaks to the toggle to stop the primary colour showing through
166 // when the menu is shown
167 .show > .btn-outline-primary.dropdown-toggle {
168 background-color: $green;
169 border-color: $green;
172 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
187 color: darken($darkgrey, 25%);
191 .btn-outline-secondary {
192 @include button-outline-variant($darkgrey, $color-hover: $white, $active-color: $white);
197 .btn-outline-secondary {
198 @include button-outline-variant($darkgrey, $color-hover: $darkgrey, $active-background: white, $active-border: $darkgrey);
207 background-color: lighten($grey, 10%);
211 nav.primary, nav.secondary {
214 background-color: $green;
220 #compact-secondary-nav {
225 #compact-secondary-nav {
226 display: inline-block;
240 float: none !important;
248 min-height: $headerHeight;
260 #sidebar .search_forms,
276 border-top: 1px solid #eee;
278 border-bottom: 1px solid #eee;
296 .user-menu, .login-menu {
301 #compact-secondary-nav {
306 display: inline-block;
309 .overlay-sidebar #sidebar .welcome {
313 .overlay-sidebar #sidebar #banner {
318 /* Utility for styling notification numbers */
321 background: lighten($green, 30%);
323 font-weight: $font-weight-normal;
326 /* Rules for the message shown in place of the map when javascript is disabled */
334 /* Rules for Leaflet maps */
336 .leaflet-top.leaflet-right,
337 .leaflet-top.leaflet-left {
341 flex-direction: column;
342 flex-wrap: wrap-reverse;
345 .leaflet-control .control-button {
349 background-color: #333;
350 background-color: rgba(0,0,0,.6);
355 background-color: black;
360 background-color: #333;
361 background-color: rgba(0,0,0,.5);
366 background-color: $vibrant-green;
370 border-start-start-radius: 4px;
374 border-end-start-radius: 4px;
383 /* Rules for the sidebar and main map area */
403 width: $sidebarWidth;
419 .overlay-sidebar #sidebar {
452 width: $sidebarWidth;
456 background-color: rgba(255, 255, 255, 0.5);
473 .leaflet-marker-draggable {
488 border-bottom: 1px solid $grey;
494 @include media-breakpoint-down(md) {
536 border: 2px solid #fff;
539 transition: border-color 0.08s ease-in;
546 border-bottom-right-radius: 3px;
550 text-stroke: 2px #fff;
551 background: rgba(255,255,255,.9);
553 input[type="radio"] {
558 &.active { border-color: darken($green, 10%); }
561 &.active { border-color: darken($green, 20%); }
571 li.disabled { color: $darkgrey; }
580 font-family: monospace;
598 top: $lineheight/2 !important;
600 margin-right: 0px !important;
601 margin-top: 0px !important;
605 .leaflet-popup-scrolled {
606 padding-right: $lineheight;
607 border-bottom: 0px !important;
608 border-top: 0px !important;
611 .leaflet-popup-content-wrapper {
612 border-radius: 4px !important;
615 /* Rules for attribution text under the main map shown on printouts */
621 .donate-attr { color: darken($green, 10%) !important; }
623 /* Rules for the sidebar */
627 padding: $lineheight/2 $lineheight;
628 // background: $offwhite;
629 // border-bottom: 1px solid $grey;
644 /* Temporary label size override until we remove site-wide font customisation */
652 /* Stop bootstrap 5 from floating legends when they don't need to be */
657 /* Override the text colour for primary and secondary buttons, to match our
658 bootstrap 4 colours. Note this has accessibility issues, which is why
659 bootstrap 5 calculates black as the appropriate colour, and we should
660 reconsider our colours at some point with that in mind. */
663 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
667 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
670 .btn-outline-secondary {
671 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
674 /* Rules for the search and direction forms */
676 header .search_forms,
681 /* Rules for the map key which appears in the popout sidebar */
684 .mapkey-table-key img {
691 /* Rules for search sidebar */
693 #sidebar .search_results_entry {
696 &.selected { background: $list-highlight; }
699 .search_more .loader {
704 .search_results_error {
709 /* Rules for routing */
712 background-image: image-url('routing-sprite.png');
715 background-repeat: no-repeat;
717 @for $i from 0 through 25 {
718 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
721 td.instruction, td.distance {
722 padding-top: $lineheight/5;
723 padding-bottom: $lineheight/5;
724 border-bottom: 1px solid $grey;
735 background: $list-highlight;
738 .routing_marker { width: 15px; cursor: move; }
744 /* Rules for the history sidebar */
746 #sidebar .changesets {
748 &.selected { background: $list-highlight; }
749 /* color is derived from changeset bbox fillColor in history.js */
751 a.stretched-link > span, a:not(.stretched-link), [title] {
753 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
765 .changeset_more .loader {
771 /* Rules for the browse sidebar */
775 padding-bottom: $spacer;
776 margin-bottom: $spacer;
777 border-bottom: 1px solid $grey;
780 word-wrap: break-word;
784 .browse-section:last-of-type {
789 background-color: $offwhite;
791 border-collapse: separate;
794 margin-bottom: $spacer;
797 border-bottom: 1px solid $grey;
800 tr:last-child th, tr:last-child td {
808 word-wrap: break-word;
809 white-space: pre-wrap;
814 background-color: $offwhite;
818 border-left: 1px solid $grey;
819 background-color: #fff;
822 .colour-preview-box {
827 border: 1px solid rgba(0, 0, 0, .1);
828 // add color via inline css on element: background-color: <tag value>;
832 .note-comments li, .changeset-comments li {
833 margin: $lineheight/2 0;
836 margin: 10px 6px 0 6px;
841 .subscribe-buttons input {
847 span.action-button:hover {
849 text-decoration: underline;
854 margin: 0 0 10px 10px;
867 background: $list-highlight;
874 /* Bootstrap buttons don't have any vertical margin, so
875 they touch when adjacent buttons wrap onto a new line
876 e.g. wide form buttons on a narrow sidebar */
880 margin-bottom: $spacer * 0.25;
884 /* Rules for export sidebar */
892 .export_area_inputs {
893 margin-bottom: $spacer;
901 background: $lightgrey;
903 #maxlat { margin-top: -1px; }
906 /* no-r2 */ margin-left: -1px;
910 /* no-r2 */ margin-right: -1px;
912 #minlat { margin-bottom: -1px; }
916 margin: $lineheight/4;
920 padding-left: $lineheight/2;
928 /* Rules for edit pages */
944 /* Rules for non-map content pages */
947 background: $lightgrey;
954 padding: $lineheight;
957 /* Overrides for pages that use new layout conventions */
959 .header-illustration {
960 background-position: 0 0;
961 background-repeat: no-repeat;
969 background-image: image-url("sign-up-illustration.png");
973 background-image: image-url("confirm-illustration.png");
977 background-image: image-url("terms-illustration.png");
985 background-image: image-url("sign-up-illustration-arm.png");
988 pointer-events: none;
992 [dir=rtl] .header-illustration {
993 transform: scaleX(-1);
996 transform: scaleX(-1);
1000 #content.maximised {
1009 /* Rules for small maps in content areas */
1013 margin-bottom: $lineheight;
1016 @include media-breakpoint-up(md) {
1022 /* Rules for the user map */
1024 .content_map .leaflet-popup-content {
1025 margin: $lineheight/2;
1029 /* Rules for user popups on maps */
1040 /* Rules for the user list */
1046 /* Rules for the diary entry page */
1057 border-top: 1px dashed $grey;
1059 border-top: 1px solid $grey;
1062 margin-bottom: $lineheight/2;
1067 /* Rules for the log in page */
1069 #login_auth_buttons {
1074 padding: $lineheight/4 $lineheight/2;
1078 /* Rules for the account confirmation page */
1082 padding: $lineheight;
1083 margin-bottom: $lineheight;
1088 list-style: inherit;
1092 list-style-type: lower-alpha;
1097 /* Rules for the oauth authorization page */
1099 .oauth-authorize ul {
1103 /* Rules for messages pages */
1107 background: $offwhite;
1111 background: #CBEEA7;
1116 background-color: $lightgrey;
1118 .describe_location {
1127 background-color: $lightgrey;
1130 /* Rules for user images */
1137 img.user_thumbnail {
1142 img.user_thumbnail_tiny {
1149 /* General styles for action lists / subnavs */
1151 nav.secondary-actions {
1156 flex-direction: row;
1164 border-left: 1px solid $grey;
1165 padding-left: $lineheight/2;
1166 margin-right: $lineheight/2;
1167 margin-bottom: $lineheight/8;
1172 div.secondary-actions {
1177 /* Rules for rich text */
1182 background: $lightgrey;
1184 direction: inherit; /* fix for Bootstrap < 5.2 */
1185 unicode-bidi: unset; /* fix for Bootstrap < 5.2 */
1189 background: $lightgrey;
1191 white-space: pre-wrap;
1199 padding: $lineheight;
1200 background-color: $offwhite;
1207 border-left: $lineheight solid $offwhite;
1208 padding-left: $lineheight;
1214 /* Rules for the iD editor */
1221 /* Rules for the "Welcome" page */
1222 .site-welcome, .site-fixthemap {
1224 background-image: image-url("welcome-sprite.png");
1225 background-size: 500px 250px;
1235 /* no-r2 */ background-position: -50px 0;
1240 vertical-align: middle;
1244 /* no-r2 */ background-position: -100px 0;
1248 /* no-r2 */ background-position: -150px 0;
1252 /* no-r2 */ background-position: -200px 0;
1256 /* no-r2 */ background-position: -250px 0;
1260 /* no-r2 */ background-position: -300px 0;
1264 /* no-r2 */ background-position: -350px 0;
1268 background-color: #333;
1273 .site-about #content {
1274 background-color: $lightgrey;
1285 color: $vibrant-green;
1291 background-position: 0 50%;
1292 background-repeat: no-repeat;
1293 background-image: image-url('about/osm.png');
1294 background-size: cover;
1295 background-color: $vibrant-green;
1299 background: $vibrant-green;
1303 display: inline-block;
1312 background: 40px 40px image-url('about/sprite.png') no-repeat;
1316 background-position: 0px 0px;
1320 background-position: 0px -40px;
1324 background-position: 0px -80px;
1328 background-position: 0px -120px;
1332 background-position: 0px -160px;
1336 background-position: -45px -160px;