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 display: inline-block;
209 margin: 3px 0 3px 3px;
210 background-color: lighten($grey, 10%);
222 nav.primary, nav.secondary {
225 background-color: $green;
231 #compact-secondary-nav {
236 #compact-secondary-nav {
237 display: inline-block;
251 float: none !important;
259 min-height: $headerHeight;
271 #sidebar .search_forms,
287 border-top: 1px solid #eee;
289 border-bottom: 1px solid #eee;
307 .user-menu, .login-menu {
312 #compact-secondary-nav {
317 display: inline-block;
320 .overlay-sidebar #sidebar .welcome {
324 .overlay-sidebar #sidebar #banner {
328 .leaflet-top.leaflet-right {
329 top: 10px !important;
333 /* Utility for styling notification numbers */
336 padding: 2px $lineheight/4;
338 background: lighten($green, 30%);
344 /* Rules for the message shown in place of the map when javascript is disabled */
352 /* Rules for Leaflet maps */
354 .leaflet-control .control-button {
358 background-color: #333;
359 background-color: rgba(0,0,0,.6);
364 background-color: black;
369 background-color: #333;
370 background-color: rgba(0,0,0,.5);
375 background-color: $vibrant-green;
379 border-start-start-radius: 4px;
383 border-end-start-radius: 4px;
392 /* Rules for the sidebar and main map area */
412 width: $sidebarWidth;
428 .overlay-sidebar #sidebar {
461 width: $sidebarWidth;
477 .leaflet-marker-draggable {
492 border-bottom: 1px solid $grey;
498 @include media-breakpoint-down(md) {
540 border: 2px solid #fff;
543 transition: border-color 0.08s ease-in;
550 border-bottom-right-radius: 3px;
554 text-stroke: 2px #fff;
555 background: rgba(255,255,255,.9);
557 input[type="radio"] {
562 &.active { border-color: darken($green, 10%); }
565 &.active { border-color: darken($green, 20%); }
575 li.disabled { color: $darkgrey; }
584 font-family: monospace;
602 top: $lineheight/2 !important;
604 margin-right: 0px !important;
605 margin-top: 0px !important;
609 .leaflet-popup-scrolled {
610 padding-right: $lineheight;
611 border-bottom: 0px !important;
612 border-top: 0px !important;
615 .leaflet-popup-content-wrapper {
616 border-radius: 4px !important;
619 /* Rules for attribution text under the main map shown on printouts */
625 .donate-attr { color: darken($green, 10%) !important; }
627 /* Rules for the sidebar */
631 padding: $lineheight/2 $lineheight;
632 // background: $offwhite;
633 // border-bottom: 1px solid $grey;
648 /* Temporary label size override until we remove site-wide font customisation */
656 /* Stop bootstrap 5 from floating legends when they don't need to be */
661 /* Override the text colour for primary and secondary buttons, to match our
662 bootstrap 4 colours. Note this has accessibility issues, which is why
663 bootstrap 5 calculates black as the appropriate colour, and we should
664 reconsider our colours at some point with that in mind. */
667 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
671 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
674 .btn-outline-secondary {
675 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
678 /* Rules for the search and direction forms */
680 header .search_forms,
685 /* Rules for the map key which appears in the popout sidebar */
688 .mapkey-table-key img {
695 /* Rules for search sidebar */
697 #sidebar .search_results_entry {
700 &.selected { background: $list-highlight; }
703 .search_more .loader {
708 .search_results_error {
713 /* Rules for routing */
716 background-image: image-url('routing-sprite.png');
719 background-repeat: no-repeat;
721 @for $i from 0 through 25 {
722 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
725 td.instruction, td.distance {
726 padding-top: $lineheight/5;
727 padding-bottom: $lineheight/5;
728 border-bottom: 1px solid $grey;
739 background: $list-highlight;
742 .routing_marker { width: 15px; cursor: move; }
748 /* Rules for the history sidebar */
750 #sidebar .changesets {
752 &.selected { background: $list-highlight; }
753 /* color is derived from changeset bbox fillColor in history.js */
755 a.stretched-link > span, a:not(.stretched-link), [title] {
757 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
769 .changeset_more .loader {
775 /* Rules for the browse sidebar */
779 padding-bottom: $spacer;
780 margin-bottom: $spacer;
781 border-bottom: 1px solid $grey;
784 word-wrap: break-word;
788 .browse-section:last-of-type {
793 background-color: $offwhite;
795 border-collapse: separate;
798 margin-bottom: $spacer;
801 border-bottom: 1px solid $grey;
804 tr:last-child th, tr:last-child td {
812 word-wrap: break-word;
813 white-space: pre-wrap;
818 background-color: $offwhite;
822 border-left: 1px solid $grey;
823 background-color: #fff;
826 .colour-preview-box {
831 border: 1px solid rgba(0, 0, 0, .1);
832 // add color via inline css on element: background-color: <tag value>;
836 .note-comments li, .changeset-comments li {
837 margin: $lineheight/2 0;
840 margin: 10px 6px 0 6px;
845 .subscribe-buttons input {
851 span.action-button:hover {
853 text-decoration: underline;
858 margin: 0 0 10px 10px;
871 background: $list-highlight;
878 /* Bootstrap buttons don't have any vertical margin, so
879 they touch when adjacent buttons wrap onto a new line
880 e.g. wide form buttons on a narrow sidebar */
884 margin-bottom: $spacer * 0.25;
888 /* Rules for export sidebar */
896 .export_area_inputs {
897 margin-bottom: $spacer;
905 background: $lightgrey;
907 #maxlat { margin-top: -1px; }
910 /* no-r2 */ margin-left: -1px;
914 /* no-r2 */ margin-right: -1px;
916 #minlat { margin-bottom: -1px; }
920 margin: $lineheight/4;
924 padding-left: $lineheight/2;
932 /* Rules for edit pages */
948 /* Rules for non-map content pages */
951 background: $lightgrey;
958 padding: $lineheight;
961 /* Overrides for pages that use new layout conventions */
963 .header-illustration {
964 background-position: 0 0;
965 background-repeat: no-repeat;
973 background-image: image-url("sign-up-illustration.png");
977 background-image: image-url("confirm-illustration.png");
981 background-image: image-url("terms-illustration.png");
989 background-image: image-url("sign-up-illustration-arm.png");
992 pointer-events: none;
996 [dir=rtl] .header-illustration {
997 transform: scaleX(-1);
1000 transform: scaleX(-1);
1004 #content.maximised {
1013 /* Rules for small maps in content areas */
1017 margin-bottom: $lineheight;
1020 @include media-breakpoint-up(md) {
1026 /* Rules for the user map */
1028 .content_map .leaflet-popup-content {
1029 margin: $lineheight/2;
1033 /* Rules for user popups on maps */
1044 /* Rules for the user list */
1050 /* Rules for the diary list page */
1054 padding-top: $lineheight;
1055 padding-bottom: $lineheight/2;
1056 border-top: 1px solid $grey;
1059 background-color: #fee;
1063 /* Rules for the diary entry page */
1069 margin-bottom: $lineheight;
1075 border-top: 1px dashed $grey;
1076 padding-top: $lineheight/2;
1077 padding-bottom: $lineheight/2;
1079 margin-top: $lineheight/2;
1080 padding-top: $lineheight;
1081 border-top: 1px solid $grey;
1084 background-color: #fee;
1087 margin-bottom: $lineheight/2;
1096 /* Rules for the log in page */
1098 #login_auth_buttons {
1103 padding: $lineheight/4 $lineheight/2;
1107 /* Rules for the account confirmation page */
1111 padding: $lineheight;
1112 margin-bottom: $lineheight;
1117 list-style: inherit;
1121 list-style-type: lower-alpha;
1126 /* Rules for the oauth authorization page */
1128 .oauth-authorize ul {
1132 /* Rules for messages pages */
1135 button[type="submit"] {
1137 white-space: nowrap;
1141 background: $offwhite;
1145 background: #CBEEA7;
1153 .inbox-row .inbox-mark-read {
1158 margin-bottom: $lineheight;
1159 padding: $lineheight/4 0px 4px 0px;
1160 border-bottom: 1px solid $grey;
1167 .info-line .user_thumbnail_tiny {
1168 vertical-align: middle;
1172 white-space: nowrap;
1181 .inbox-row-unread .inbox-mark-unread {
1186 background-color: $lightgrey;
1188 .describe_location {
1197 background-color: $lightgrey;
1200 /* Rules for user images */
1207 img.user_thumbnail {
1212 img.user_thumbnail_tiny {
1219 /* Rules for geo microformats */
1222 border-bottom: none;
1225 /* General styles for action lists / subnavs */
1228 nav.secondary-actions {
1233 flex-direction: row;
1241 border-left: 1px solid $grey;
1242 padding-left: $lineheight/2;
1243 margin-right: $lineheight/2;
1244 margin-bottom: $lineheight/8;
1249 div.secondary-actions {
1254 /* Rules for OpenID logo */
1257 vertical-align: text-bottom;
1261 /* Rules for rich text */
1266 background: $lightgrey;
1271 background: $lightgrey;
1273 white-space: pre-wrap;
1281 padding: $lineheight;
1282 background-color: $offwhite;
1289 border-left: $lineheight solid $offwhite;
1290 padding-left: $lineheight;
1296 /* Rules for the user notes list */
1300 background-color: $offwhite;
1304 /* Rules for the iD editor */
1311 /* Rules for the "Welcome" page */
1312 .site-welcome, .site-fixthemap {
1314 background-image: image-url("welcome-sprite.png");
1315 background-size: 500px 250px;
1325 /* no-r2 */ background-position: -50px 0;
1330 vertical-align: middle;
1334 /* no-r2 */ background-position: -100px 0;
1338 /* no-r2 */ background-position: -150px 0;
1342 /* no-r2 */ background-position: -200px 0;
1346 /* no-r2 */ background-position: -250px 0;
1350 /* no-r2 */ background-position: -300px 0;
1354 /* no-r2 */ background-position: -350px 0;
1358 background-color: #333;
1363 .site-about #content {
1364 background-color: $lightgrey;
1375 color: $vibrant-green;
1381 background-position: 0 50%;
1382 background-repeat: no-repeat;
1383 background-image: image-url('about/osm.png');
1384 background-size: cover;
1385 background-color: $vibrant-green;
1389 background: $vibrant-green;
1393 display: inline-block;
1402 background: 40px 40px image-url('about/sprite.png') no-repeat;
1406 background-position: 0px 0px;
1410 background-position: 0px -40px;
1414 background-position: 0px -80px;
1418 background-position: 0px -120px;
1422 background-position: 0px -160px;
1426 background-position: -45px -160px;