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 */
83 display: none !important;
85 background: image-url("menu-icon.png") no-repeat;
86 background-size: 30px 30px;
90 margin: 14px 10px 0 0;
95 height: $headerHeight;
100 h1, nav, nav > ul, nav > ul > li {
101 display: inline-block;
106 padding: $lineheight/2;
114 text-decoration: none;
121 vertical-align: middle;
147 .btn-outline-primary {
148 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
152 .btn-outline-primary {
157 border-top-color: $grey;
161 background-color: lighten($green, 30%);
166 // Small tweaks to the toggle to stop the primary colour showing through
167 // when the menu is shown
168 .show > .btn-outline-primary.dropdown-toggle {
169 background-color: $green;
170 border-color: $green;
173 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
188 color: darken($darkgrey, 25%);
192 .btn-outline-secondary {
193 @include button-outline-variant($darkgrey, $color-hover: $white, $active-color: $white);
198 .btn-outline-secondary {
199 @include button-outline-variant($darkgrey, $color-hover: $darkgrey, $active-background: white, $active-border: $darkgrey);
208 display: inline-block;
210 margin: 3px 0 3px 3px;
211 background-color: lighten($grey, 10%);
223 nav.primary, nav.secondary {
226 background-color: $green;
232 #compact-secondary-nav {
237 #compact-secondary-nav {
238 display: inline-block;
247 display: inline-block !important;
252 float: none !important;
260 min-height: $headerHeight;
272 #sidebar .search_forms,
288 border-top: 1px solid #eee;
290 border-bottom: 1px solid #eee;
313 #compact-secondary-nav {
318 display: inline-block;
321 .overlay-sidebar #sidebar .welcome.visible {
325 .overlay-sidebar #sidebar #banner {
329 .leaflet-top.leaflet-right {
330 top: 10px !important;
334 /* Utility for styling notification numbers */
337 padding: 2px $lineheight/4;
339 background: lighten($green, 30%);
345 /* Rules for the message shown in place of the map when javascript is disabled */
353 /* Rules for Leaflet maps */
355 .leaflet-control .control-button {
359 background-color: #333;
360 background-color: rgba(0,0,0,.6);
365 background-color: black;
370 background-color: #333;
371 background-color: rgba(0,0,0,.5);
376 background-color: $vibrant-green;
380 border-start-start-radius: 4px;
384 border-end-start-radius: 4px;
393 /* Rules for the sidebar and main map area */
413 width: $sidebarWidth;
432 .overlay-sidebar #sidebar {
469 width: $sidebarWidth;
485 .leaflet-marker-draggable {
500 border-bottom: 1px solid $grey;
506 @include media-breakpoint-down(md) {
555 border: 2px solid #fff;
558 transition: border-color 0.08s ease-in;
565 border-bottom-right-radius: 3px;
569 text-stroke: 2px #fff;
570 background: rgba(255,255,255,.9);
572 input[type="radio"] {
577 &.active { border-color: darken($green, 10%); }
580 &.active { border-color: darken($green, 20%); }
590 li.disabled { color: $darkgrey; }
600 text-decoration: none;
601 background-color: $lightblue;
603 border-right: 1px solid #fff;
607 border-right: 1px solid #fff;
608 border-radius: 4px 0 0 4px;
612 border-radius: 0 4px 4px 0;
616 background-color: $blue;
628 font-family: monospace;
650 top: $lineheight/2 !important;
652 margin-right: 0px !important;
653 margin-top: 0px !important;
657 .leaflet-popup-scrolled {
658 padding-right: $lineheight;
659 border-bottom: 0px !important;
660 border-top: 0px !important;
663 .leaflet-popup-content-wrapper {
664 border-radius: 4px !important;
667 /* Rules for attribution text under the main map shown on printouts */
677 .attribution_license,
678 .attribution_project {
682 .attribution_notice {
686 .donate-attr { color: darken($green, 10%) !important; }
688 /* Rules for the sidebar */
692 padding: $lineheight/2 $lineheight;
693 // background: $offwhite;
694 // border-bottom: 1px solid $grey;
713 margin: $lineheight auto;
724 /* Temporary label size override until we remove site-wide font customisation */
732 /* Stop bootstrap 5 from floating legends when they don't need to be */
737 /* Override the text colour for primary and secondary buttons, to match our
738 bootstrap 4 colours. Note this has accessibility issues, which is why
739 bootstrap 5 calculates black as the appropriate colour, and we should
740 reconsider our colours at some point with that in mind. */
743 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
747 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
750 .btn-outline-secondary {
751 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
754 /* Rules for the search and direction forms */
756 header .search_forms,
761 /* Rules for the map key which appears in the popout sidebar */
764 .mapkey-table-key img {
771 /* Rules for search sidebar */
773 #sidebar .search_results_entry {
776 &.selected { background: $list-highlight; }
779 .search_more .loader {
785 .search_results_error {
790 /* Rules for routing */
793 background-image: image-url('routing-sprite.png');
796 background-repeat: no-repeat;
798 @for $i from 0 through 25 {
799 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
802 td.instruction, td.distance {
803 padding-top: $lineheight/5;
804 padding-bottom: $lineheight/5;
805 border-bottom: 1px solid $grey;
816 background: $list-highlight;
819 .routing_marker { width: 15px; cursor: move; }
821 /* Rules for entity history */
826 border-bottom: $keyline;
834 /* Rules for the history sidebar */
836 #sidebar .changesets {
838 &.selected { background: $list-highlight; }
839 /* color is derived from changeset bbox fillColor in history.js */
841 a.stretched-link > span, a:not(.stretched-link), [title] {
843 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
855 .changeset_more .loader {
861 /* Rules for the browse sidebar */
865 padding-bottom: $spacer;
866 margin-bottom: $spacer;
867 border-bottom: 1px solid $grey;
870 word-wrap: break-word;
874 .browse-section:last-of-type {
879 background-color: $offwhite;
881 border-collapse: separate;
884 margin-bottom: $spacer;
887 border-bottom: 1px solid $grey;
890 tr:last-child th, tr:last-child td {
898 word-wrap: break-word;
899 white-space: pre-wrap;
904 background-color: $offwhite;
908 border-left: 1px solid $grey;
909 background-color: #fff;
912 .colour-preview-box {
917 border: 1px solid rgba(0, 0, 0, .1);
918 // add color via inline css on element: background-color: <tag value>;
922 .note-comments li, .changeset-comments li {
923 margin: $lineheight/2 0;
926 margin: 10px 6px 0 6px;
931 .subscribe-buttons input {
937 span.action-button:hover {
939 text-decoration: underline;
944 margin: 0 0 10px 10px;
957 background: $list-highlight;
964 /* Bootstrap buttons don't have any vertical margin, so
965 they touch when adjacent buttons wrap onto a new line
966 e.g. wide form buttons on a narrow sidebar */
970 margin-bottom: $spacer * 0.25;
974 /* Rules for export sidebar */
982 .export_area_inputs {
983 margin-bottom: $spacer;
991 background: $lightgrey;
993 #maxlat { margin-top: -1px; }
996 /* no-r2 */ margin-left: -1px;
1000 /* no-r2 */ margin-right: -1px;
1002 #minlat { margin-bottom: -1px; }
1006 margin: $lineheight/4;
1010 padding-left: $lineheight/2;
1013 margin-bottom: 10px;
1018 /* Rules for edit pages */
1034 /* Rules for non-map content pages */
1037 background: $lightgrey;
1044 padding: $lineheight;
1047 /* Overrides for pages that use new layout conventions */
1049 .header-illustration {
1050 background-position: 0 0;
1051 background-repeat: no-repeat;
1059 background-image: image-url("sign-up-illustration.png");
1063 background-image: image-url("confirm-illustration.png");
1067 background-image: image-url("terms-illustration.png");
1075 background-image: image-url("sign-up-illustration-arm.png");
1078 pointer-events: none;
1082 [dir=rtl] .header-illustration {
1083 transform: scaleX(-1);
1086 transform: scaleX(-1);
1090 #content.maximised {
1099 /* Rules for small maps in content areas */
1103 margin-bottom: $lineheight;
1106 @include media-breakpoint-up(md) {
1112 /* Rules for the user map */
1114 .content_map .leaflet-popup-content {
1115 margin: $lineheight/2;
1119 /* Rules for user popups on maps */
1130 /* Rules for the user list */
1136 /* Rules for the diary list page */
1140 padding-top: $lineheight;
1141 padding-bottom: $lineheight/2;
1142 border-top: 1px solid $grey;
1145 background-color: #fee;
1149 /* Rules for the diary entry page */
1155 margin-bottom: $lineheight;
1161 border-top: 1px dashed $grey;
1162 padding-top: $lineheight/2;
1163 padding-bottom: $lineheight/2;
1165 margin-top: $lineheight/2;
1166 padding-top: $lineheight;
1167 border-top: 1px solid $grey;
1170 background-color: #fee;
1173 margin-bottom: $lineheight/2;
1182 /* Rules for the log in page */
1184 #login_auth_buttons {
1189 padding: $lineheight/4 $lineheight/2;
1193 /* Rules for the account confirmation page */
1197 padding: $lineheight;
1198 margin-bottom: $lineheight;
1203 list-style: inherit;
1207 list-style-type: lower-alpha;
1212 /* Rules for the account settings page */
1214 #accountForm .user_image {
1218 #accountForm #user_image {
1222 #accountForm ul.accountImage-options {
1235 display: inline !important;
1238 /* Rules for the oauth authorization page */
1240 .oauth-authorize ul {
1244 /* Rules for messages pages */
1247 button[type="submit"] {
1249 white-space: nowrap;
1253 background: $offwhite;
1257 background: #CBEEA7;
1265 .inbox-row .inbox-mark-read {
1270 margin-bottom: $lineheight;
1271 padding: $lineheight/4 0px 4px 0px;
1272 border-bottom: 1px solid $grey;
1279 .info-line .user_thumbnail_tiny {
1280 vertical-align: middle;
1284 white-space: nowrap;
1293 .inbox-row-unread .inbox-mark-unread {
1297 /* Rules for "flash" notice boxes shown at the top of the content area */
1301 background-color: #ff7070;
1305 background-color: #ffe0cc;
1309 background-color: #CBEEA7;
1313 /* Rules for highlighting fields with rails validation errors */
1316 display: inline-block;
1322 background-color: #ff7070;
1325 /* Rules for rails validation error boxes */
1329 border: 2px solid #ff7070;
1330 padding: 0 $lineheight/2;
1331 margin-bottom: $lineheight;
1332 background-color: #f0f0f0;
1335 margin: 0 -10px 10px -10px;
1336 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1339 background-color: #c00;
1347 padding: $lineheight/4;
1352 background-color: $lightgrey;
1354 .describe_location {
1363 background-color: $lightgrey;
1369 vertical-align: middle;
1374 /* Rules for user images */
1381 img.user_thumbnail {
1386 img.user_thumbnail_tiny {
1393 /* Rules for geo microformats */
1396 border-bottom: none;
1399 /* General styles for action lists / subnavs */
1402 nav.secondary-actions {
1407 flex-direction: row;
1415 border-left: 1px solid $grey;
1416 padding-left: $lineheight/2;
1417 margin-right: $lineheight/2;
1418 margin-bottom: $lineheight/8;
1423 div.secondary-actions {
1428 /* Create a single-line dl */
1432 display: inline-block;
1439 /* Rules for OpenID logo */
1442 vertical-align: text-bottom;
1446 /* Rules for rich text */
1451 background: $lightgrey;
1456 background: $lightgrey;
1458 white-space: pre-wrap;
1466 padding: $lineheight;
1467 background-color: $offwhite;
1474 border-left: $lineheight solid $offwhite;
1475 padding-left: $lineheight;
1481 /* Rules for the user notes list */
1485 background-color: $offwhite;
1489 /* Rules for the iD editor */
1496 /* Rules for the "Welcome" page */
1497 .site-welcome, .site-fixthemap {
1499 background-image: image-url("welcome-sprite.png");
1500 background-size: 500px 250px;
1510 /* no-r2 */ background-position: -50px 0;
1515 vertical-align: middle;
1519 /* no-r2 */ background-position: -100px 0;
1523 /* no-r2 */ background-position: -150px 0;
1527 /* no-r2 */ background-position: -200px 0;
1531 /* no-r2 */ background-position: -250px 0;
1535 /* no-r2 */ background-position: -300px 0;
1539 /* no-r2 */ background-position: -350px 0;
1543 background-color: #333;
1548 .site-about #content {
1549 background-color: $lightgrey;
1560 color: $vibrant-green;
1566 background-position: 0 50%;
1567 background-repeat: no-repeat;
1568 background-image: image-url('about/osm.png');
1569 background-size: cover;
1570 background-color: $vibrant-green;
1574 background: $vibrant-green;
1578 display: inline-block;
1587 background: 40px 40px image-url('about/sprite.png') no-repeat;
1591 background-position: 0px 0px;
1595 background-position: 0px -40px;
1599 background-position: 0px -80px;
1603 background-position: 0px -120px;
1607 background-position: 0px -160px;
1611 background-position: -45px -160px;