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);
361 border-radius: 4px 0 0 4px;
367 background-color: black;
372 background-color: #333;
373 background-color: rgba(0,0,0,.5);
378 background-color: $vibrant-green;
386 .leaflet-control .zoomin,
387 .control-layers .control-button {
389 border-radius: 4px 0 0 0;
392 .leaflet-control .zoomout,
393 .control-key .control-button {
398 .control-locate .control-button,
399 .control-share .control-button {
400 border-radius: 0 0 0 4px;
403 /* Rules for the sidebar and main map area */
423 width: $sidebarWidth;
442 .overlay-sidebar #sidebar {
479 width: $sidebarWidth;
495 .leaflet-marker-draggable {
510 border-bottom: 1px solid $grey;
520 border:1px solid $grey;
525 border: 1px solid $grey;
527 border-top-color: $grey;
533 @include media-breakpoint-down(md) {
581 border: 2px solid #fff;
584 transition: border-color 0.08s ease-in;
591 border-bottom-right-radius: 3px;
595 text-stroke: 2px #fff;
596 background: rgba(255,255,255,.9);
598 input[type="radio"] {
603 &.active { border-color: darken($green, 10%); }
606 &.active { border-color: darken($green, 20%); }
616 li.disabled { color: $darkgrey; }
629 font-family: monospace;
651 top: $lineheight/2 !important;
653 margin-right: 0px !important;
654 margin-top: 0px !important;
658 .leaflet-popup-scrolled {
659 padding-right: $lineheight;
660 border-bottom: 0px !important;
661 border-top: 0px !important;
664 .leaflet-popup-content-wrapper {
665 border-radius: 4px !important;
668 /* Rules for attribution text under the main map shown on printouts */
678 .attribution_license,
679 .attribution_project {
683 .attribution_notice {
687 .donate-attr { color: darken($green, 10%) !important; }
689 /* Rules for the sidebar */
693 padding: $lineheight/2 $lineheight;
694 // background: $offwhite;
695 // border-bottom: 1px solid $grey;
714 margin: $lineheight auto;
725 /* Temporary label size override until we remove site-wide font customisation */
733 /* Stop bootstrap 5 from floating legends when they don't need to be */
738 /* Override the text colour for primary and secondary buttons, to match our
739 bootstrap 4 colours. Note this has accessibility issues, which is why
740 bootstrap 5 calculates black as the appropriate colour, and we should
741 reconsider our colours at some point with that in mind. */
744 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
748 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
751 .btn-outline-secondary {
752 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
755 /* Rules for the search and direction forms */
757 header .search_forms,
762 /* Rules for the map key which appears in the popout sidebar */
765 .mapkey-table-key img {
772 /* Rules for search sidebar */
774 #sidebar .search_results_entry {
777 &.selected { background: $list-highlight; }
780 .search_more .loader {
786 .search_results_error {
791 /* Rules for routing */
794 background-image: image-url('routing-sprite.png');
797 background-repeat: no-repeat;
799 @for $i from 0 through 25 {
800 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
803 td.instruction, td.distance {
804 padding-top: $lineheight/5;
805 padding-bottom: $lineheight/5;
806 border-bottom: 1px solid $grey;
817 background: $list-highlight;
820 .routing_marker { width: 15px; cursor: move; }
822 /* Rules for entity history */
827 border-bottom: $keyline;
835 /* Rules for the history sidebar */
837 #sidebar .changesets {
839 &.selected { background: $list-highlight; }
840 /* color is derived from changeset bbox fillColor in history.js */
842 a.stretched-link > span, a:not(.stretched-link), [title] {
844 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
856 .changeset_more .loader {
862 /* Rules for the browse sidebar */
866 padding-bottom: $spacer;
867 margin-bottom: $spacer;
868 border-bottom: 1px solid $grey;
871 word-wrap: break-word;
875 .browse-section:last-of-type {
880 background-color: $offwhite;
882 border-collapse: separate;
885 margin-bottom: $spacer;
888 border-bottom: 1px solid $grey;
891 tr:last-child th, tr:last-child td {
899 word-wrap: break-word;
900 white-space: pre-wrap;
905 background-color: $offwhite;
909 border-left: 1px solid $grey;
910 background-color: #fff;
913 .colour-preview-box {
918 border: 1px solid rgba(0, 0, 0, .1);
919 // add color via inline css on element: background-color: <tag value>;
923 .note-comments li, .changeset-comments li {
924 margin: $lineheight/2 0;
927 margin: 10px 6px 0 6px;
932 .subscribe-buttons input {
938 span.action-button:hover {
940 text-decoration: underline;
945 margin: 0 0 10px 10px;
958 background: $list-highlight;
965 /* Bootstrap buttons don't have any vertical margin, so
966 they touch when adjacent buttons wrap onto a new line
967 e.g. wide form buttons on a narrow sidebar */
971 margin-bottom: $spacer * 0.25;
975 /* Rules for export sidebar */
983 .export_area_inputs {
984 margin-bottom: $spacer;
992 background: $lightgrey;
994 #maxlat { margin-top: -1px; }
997 /* no-r2 */ margin-left: -1px;
1001 /* no-r2 */ margin-right: -1px;
1003 #minlat { margin-bottom: -1px; }
1007 margin: $lineheight/4;
1011 padding-left: $lineheight/2;
1014 margin-bottom: 10px;
1019 /* Rules for edit pages */
1035 /* Rules for non-map content pages */
1038 background: $lightgrey;
1045 padding: $lineheight;
1048 /* Overrides for pages that use new layout conventions */
1050 .header-illustration {
1051 background-position: 0 0;
1052 background-repeat: no-repeat;
1060 background-image: image-url("sign-up-illustration.png");
1064 background-image: image-url("confirm-illustration.png");
1068 background-image: image-url("terms-illustration.png");
1076 background-image: image-url("sign-up-illustration-arm.png");
1079 pointer-events: none;
1083 [dir=rtl] .header-illustration {
1084 transform: scaleX(-1);
1087 #content.maximised {
1096 /* Rules for small maps in content areas */
1100 margin-bottom: $lineheight;
1103 @include media-breakpoint-up(md) {
1109 /* Rules for the user map */
1111 .content_map .leaflet-popup-content {
1112 margin: $lineheight/2;
1116 /* Rules for user popups on maps */
1122 margin-top: 0 0 0 60px;
1127 /* Rules for the user list */
1133 /* Rules for the diary list page */
1137 padding-top: $lineheight;
1138 padding-bottom: $lineheight/2;
1139 border-top: 1px solid $grey;
1142 background-color: #fee;
1146 /* Rules for the diary entry page */
1152 margin-bottom: $lineheight;
1158 border-top: 1px dashed $grey;
1159 padding-top: $lineheight/2;
1160 padding-bottom: $lineheight/2;
1162 margin-top: $lineheight/2;
1163 padding-top: $lineheight;
1164 border-top: 1px solid $grey;
1167 background-color: #fee;
1170 margin-bottom: $lineheight/2;
1179 /* Rules for the log in page */
1181 #login_auth_buttons {
1186 padding: $lineheight/4 $lineheight/2;
1190 /* Rules for the account confirmation page */
1194 padding: $lineheight;
1195 margin-bottom: $lineheight;
1200 list-style: inherit;
1204 list-style-type: lower-alpha;
1209 /* Rules for the account settings page */
1211 #accountForm .user_image {
1215 #accountForm #user_image {
1219 #accountForm ul.accountImage-options {
1232 display: inline !important;
1235 /* Rules for the oauth settings page */
1237 .oauth_clients .buttons .oauth-edit {
1238 border-radius: 2px 0 0 2px;
1241 .oauth_clients .buttons .oauth-delete {
1242 border-radius: 0 2px 2px 0;
1245 /* Rules for the oauth authorization page */
1247 .oauth-authorize ul {
1251 /* Rules for messages pages */
1254 button[type="submit"] {
1256 white-space: nowrap;
1260 background: $offwhite;
1264 background: #CBEEA7;
1272 .inbox-row .inbox-mark-read {
1277 margin-bottom: $lineheight;
1278 padding: $lineheight/4 0px 4px 0px;
1279 border-bottom: 1px solid $grey;
1286 .info-line .user_thumbnail_tiny {
1287 vertical-align: middle;
1291 white-space: nowrap;
1300 .inbox-row-unread .inbox-mark-unread {
1304 /* Rules for "flash" notice boxes shown at the top of the content area */
1308 background-color: #ff7070;
1312 background-color: #ffe0cc;
1316 background-color: #CBEEA7;
1320 /* Rules for highlighting fields with rails validation errors */
1323 display: inline-block;
1329 background-color: #ff7070;
1332 /* Rules for rails validation error boxes */
1336 border: 2px solid #ff7070;
1337 padding: 0 $lineheight/2;
1338 margin-bottom: $lineheight;
1339 background-color: #f0f0f0;
1342 margin: 0 -10px 10px -10px;
1343 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1346 background-color: #c00;
1354 padding: $lineheight/4;
1359 background-color: $lightgrey;
1361 .describe_location {
1370 background-color: $lightgrey;
1376 vertical-align: middle;
1381 /* Rules for user images */
1388 img.user_thumbnail {
1393 img.user_thumbnail_tiny {
1400 /* Rules for geo microformats */
1403 border-bottom: none;
1406 /* General styles for action lists / subnavs / pager navs */
1409 nav.secondary-actions {
1414 flex-direction: row;
1420 display: inline-block;
1426 border-left: 1px solid $grey;
1427 padding-left: $lineheight/2;
1428 margin-right: $lineheight/2;
1429 margin-bottom: $lineheight/8;
1434 div.secondary-actions {
1441 input[type="submit"],
1442 input[type="button"],
1443 input[type="reset"],
1446 box-sizing: border-box;
1452 border-right:1px solid white;
1453 text-overflow: ellipsis;
1454 white-space: nowrap;
1458 .button:first-child,
1459 .button_to:first-child {
1460 border-radius:2px 0 0 2px;
1464 .button_to:last-child {
1465 border-radius:0 2px 2px 0;
1466 border-right-width: 0;
1470 .button_to:only-child,
1471 *[value="Hide"] + input:last-child,
1472 *[value="Hide"] + .button:last-child,
1473 *[value="Hide"] + .button_to:last-child {
1475 border-right-width: 0;
1477 /* if a 3-button set has a hidden middle button */
1478 *[value="Hide"] + input:nth-child(3),
1479 *[value="Hide"] + .button:nth-child(3),
1480 *[value="Hide"] + .button_to:nth-child(3) {
1481 border-radius:0 2px 2px 0;
1482 border-right-width: 0;
1484 /* if a 3-button set starts with a hidden button */
1485 *[value="Hide"] + input:nth-child(2):not(:last-child),
1486 *[value="Hide"] + .button:nth-child(2):not(:last-child),
1487 *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
1488 border-radius:2px 0 0 2px;
1489 border-right-width: 1px;
1493 /* Create a single-line dl */
1497 display: inline-block;
1504 /* Rules for OpenID logo */
1507 vertical-align: text-bottom;
1511 /* Rules for rich text */
1516 background: $lightgrey;
1521 background: $lightgrey;
1523 white-space: pre-wrap;
1531 padding: $lineheight;
1532 background-color: $offwhite;
1539 border-left: $lineheight solid $offwhite;
1540 padding-left: $lineheight;
1546 /* Rules for the user notes list */
1550 background-color: $offwhite;
1554 /* Rules for the iD editor */
1561 /* Rules for the "Welcome" page */
1562 .site-welcome, .site-fixthemap {
1564 background-image: image-url("welcome-sprite.png");
1565 background-size: 500px 250px;
1570 padding-bottom: 20px;
1572 margin-bottom: 10px;
1584 /* no-r2 */ background-position: -50px 0;
1589 vertical-align: middle;
1593 /* no-r2 */ background-position: -100px 0;
1597 /* no-r2 */ background-position: -150px 0;
1601 /* no-r2 */ background-position: -200px 0;
1605 /* no-r2 */ background-position: -250px 0;
1609 /* no-r2 */ background-position: -300px 0;
1613 /* no-r2 */ background-position: -350px 0;
1617 background-color: #333;
1622 .site-about #content {
1623 background-color: $lightgrey;
1624 background-position: 50% 50%;
1625 background-repeat: no-repeat;
1626 background-size: cover;
1627 background-attachment: fixed;
1638 color: $vibrant-green;
1644 background-position: 0 50%;
1645 background-repeat: no-repeat;
1646 background-image: image-url('about/osm.png');
1647 background-size: cover;
1648 background-color: $vibrant-green;
1652 background: $vibrant-green;
1656 display: inline-block;
1666 vertical-align: middle;
1667 background: 40px 40px image-url('about/sprite.png') no-repeat;
1671 background-position: 0px 0px;
1675 background-position: 0px -40px;
1679 background-position: 0px -80px;
1683 background-position: 0px -120px;
1687 background-position: 0px -160px;
1691 background-position: -45px -160px;