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;
245 /* Utility for styling notification numbers */
248 padding: 2px $lineheight/4;
250 background: lighten($green, 30%);
256 /* Rules for the message shown in place of the map when javascript is disabled */
264 /* Rules for Leaflet maps */
266 .leaflet-control .control-button {
270 background-color: #333;
271 background-color: rgba(0,0,0,.6);
272 border-radius: 4px 0 0 4px;
278 background-color: black;
283 background-color: #333;
284 background-color: rgba(0,0,0,.5);
289 background-color: $vibrant-green;
297 .leaflet-control .zoomin,
298 .control-layers .control-button {
300 border-radius: 4px 0 0 0;
303 .leaflet-control .zoomout,
304 .control-key .control-button {
309 .control-locate .control-button,
310 .control-share .control-button {
311 border-radius: 0 0 0 4px;
314 /* Rules for the sidebar and main map area */
334 width: $sidebarWidth;
353 .overlay-sidebar #sidebar {
390 width: $sidebarWidth;
406 .leaflet-marker-draggable {
421 border-bottom: 1px solid $grey;
431 border:1px solid $grey;
436 border: 1px solid $grey;
438 border-top-color: $grey;
462 border: 2px solid #fff;
465 transition: border-color 0.08s ease-in;
472 border-bottom-right-radius: 3px;
476 text-stroke: 2px #fff;
477 background: rgba(255,255,255,.9);
479 input[type="radio"] {
484 &.active { border-color: darken($green, 10%); }
487 &.active { border-color: darken($green, 20%); }
497 li.disabled { color: $darkgrey; }
507 text-decoration: none;
508 background-color: $lightblue;
510 border-right: 1px solid #fff;
514 border-right: 1px solid #fff;
515 border-radius: 4px 0 0 4px;
519 border-radius: 0 4px 4px 0;
523 background-color: $blue;
535 font-family: monospace;
557 top: $lineheight/2 !important;
559 margin-right: 0px !important;
560 margin-top: 0px !important;
564 .leaflet-popup-scrolled {
565 padding-right: $lineheight;
566 border-bottom: 0px !important;
567 border-top: 0px !important;
570 .leaflet-popup-content-wrapper {
571 border-radius: 4px !important;
574 /* Rules for attribution text under the main map shown on printouts */
584 .attribution_license,
585 .attribution_project {
589 .attribution_notice {
593 .donate-attr { color: darken($green, 10%) !important; }
595 /* Rules for the sidebar */
599 padding: $lineheight/2 $lineheight;
600 // background: $offwhite;
601 // border-bottom: 1px solid $grey;
620 margin: $lineheight auto;
631 /* Temporary label size override until we remove site-wide font customisation */
639 /* Stop bootstrap 5 from floating legends when they don't need to be */
644 /* Override the text colour for primary and secondary buttons, to match our
645 bootstrap 4 colours. Note this has accessibility issues, which is why
646 bootstrap 5 calculates black as the appropriate colour, and we should
647 reconsider our colours at some point with that in mind. */
650 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
654 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
657 .btn-outline-secondary {
658 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
661 /* Rules for the search and direction forms */
663 header .search_forms,
668 /* Rules for the map key which appears in the popout sidebar */
671 .mapkey-table-key img {
678 /* Rules for search sidebar */
680 #sidebar .search_results_entry {
683 &.selected { background: $list-highlight; }
686 .search_more .loader {
692 .search_results_error {
697 /* Rules for routing */
700 background-image: image-url('routing-sprite.png');
703 background-repeat: no-repeat;
705 @for $i from 0 through 25 {
706 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
709 td.instruction, td.distance {
710 padding-top: $lineheight/5;
711 padding-bottom: $lineheight/5;
712 border-bottom: 1px solid $grey;
723 background: $list-highlight;
726 .routing_marker { width: 15px; cursor: move; }
728 /* Rules for entity history */
733 border-bottom: $keyline;
741 /* Rules for the history sidebar */
743 #sidebar .changesets {
745 &.selected { background: $list-highlight; }
746 /* color is derived from changeset bbox fillColor in history.js */
748 a:not(.stretched-link), [title] {
762 .changeset_more .loader {
768 /* Rules for the browse sidebar */
772 padding-bottom: $spacer;
773 margin-bottom: $spacer;
774 border-bottom: 1px solid $grey;
777 word-wrap: break-word;
781 .browse-section:last-of-type {
786 background-color: $offwhite;
788 border-collapse: separate;
791 margin-bottom: $spacer;
794 border-bottom: 1px solid $grey;
797 tr:last-child th, tr:last-child td {
805 word-wrap: break-word;
806 white-space: pre-wrap;
811 background-color: $offwhite;
815 border-left: 1px solid $grey;
816 background-color: #fff;
819 .colour-preview-box {
824 border: 1px solid rgba(0, 0, 0, .1);
825 // add color via inline css on element: background-color: <tag value>;
829 .note-comments li, .changeset-comments li {
830 margin: $lineheight/2 0;
833 margin: 10px 6px 0 6px;
838 .subscribe-buttons input {
844 span.action-button:hover {
846 text-decoration: underline;
851 margin: 0 0 10px 10px;
864 background: $list-highlight;
871 /* Bootstrap buttons don't have any vertical margin, so
872 they touch when adjacent buttons wrap onto a new line
873 e.g. wide form buttons on a narrow sidebar */
877 margin-bottom: $spacer * 0.25;
881 /* Rules for export sidebar */
889 .export_area_inputs {
890 margin-bottom: $spacer;
898 background: $lightgrey;
900 #maxlat { margin-top: -1px; }
903 /* no-r2 */ margin-left: -1px;
907 /* no-r2 */ margin-right: -1px;
909 #minlat { margin-bottom: -1px; }
913 margin: $lineheight/4;
917 padding-left: $lineheight/2;
925 /* Rules for edit pages */
941 /* Rules for non-map content pages */
944 background: $lightgrey;
951 padding: $lineheight;
954 /* Overrides for pages that use new layout conventions */
956 .header-illustration {
957 background-position: 0 0;
958 background-repeat: no-repeat;
966 background-image: image-url("sign-up-illustration.png");
970 background-image: image-url("confirm-illustration.png");
974 background-image: image-url("terms-illustration.png");
982 background-image: image-url("sign-up-illustration-arm.png");
985 pointer-events: none;
989 [dir=rtl] .header-illustration {
990 transform: scaleX(-1);
1002 /* Rules for small maps in content areas */
1006 margin-bottom: $lineheight;
1009 @include media-breakpoint-up(md) {
1015 /* Rules for the user map */
1017 .content_map .leaflet-popup-content {
1018 margin: $lineheight/2;
1022 /* Rules for user popups on maps */
1028 margin-top: 0 0 0 60px;
1033 /* Rules for the user list */
1039 /* Rules for the diary list page */
1043 padding-top: $lineheight;
1044 padding-bottom: $lineheight/2;
1045 border-top: 1px solid $grey;
1048 background-color: #fee;
1052 /* Rules for the diary entry page */
1058 margin-bottom: $lineheight;
1064 border-top: 1px dashed $grey;
1065 padding-top: $lineheight/2;
1066 padding-bottom: $lineheight/2;
1068 margin-top: $lineheight/2;
1069 padding-top: $lineheight;
1070 border-top: 1px solid $grey;
1073 background-color: #fee;
1076 margin-bottom: $lineheight/2;
1085 /* Rules for the log in page */
1087 #login_auth_buttons {
1092 padding: $lineheight/4 $lineheight/2;
1096 /* Rules for the account confirmation page */
1100 padding: $lineheight;
1101 margin-bottom: $lineheight;
1106 list-style: inherit;
1110 list-style-type: lower-alpha;
1115 /* Rules for the account settings page */
1117 #accountForm .user_image {
1121 #accountForm #user_image {
1125 #accountForm ul.accountImage-options {
1138 display: inline !important;
1141 /* Rules for the oauth settings page */
1143 .oauth_clients .buttons .oauth-edit {
1144 border-radius: 2px 0 0 2px;
1147 .oauth_clients .buttons .oauth-delete {
1148 border-radius: 0 2px 2px 0;
1151 /* Rules for the oauth authorization page */
1153 .oauth-authorize ul {
1157 /* Rules for messages pages */
1160 button[type="submit"] {
1162 white-space: nowrap;
1166 background: $offwhite;
1170 background: #CBEEA7;
1178 .inbox-row .inbox-mark-read {
1183 margin-bottom: $lineheight;
1184 padding: $lineheight/4 0px 4px 0px;
1185 border-bottom: 1px solid $grey;
1192 .info-line .user_thumbnail_tiny {
1193 vertical-align: middle;
1197 white-space: nowrap;
1206 .inbox-row-unread .inbox-mark-unread {
1210 /* Rules for "flash" notice boxes shown at the top of the content area */
1214 background-color: #ff7070;
1218 background-color: #ffe0cc;
1222 background-color: #CBEEA7;
1226 /* Rules for highlighting fields with rails validation errors */
1229 display: inline-block;
1235 background-color: #ff7070;
1238 /* Rules for rails validation error boxes */
1242 border: 2px solid #ff7070;
1243 padding: 0 $lineheight/2;
1244 margin-bottom: $lineheight;
1245 background-color: #f0f0f0;
1248 margin: 0 -10px 10px -10px;
1249 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1252 background-color: #c00;
1260 padding: $lineheight/4;
1265 background-color: $lightgrey;
1267 .describe_location {
1276 background-color: $lightgrey;
1282 vertical-align: middle;
1287 /* Rules for user images */
1294 img.user_thumbnail {
1299 img.user_thumbnail_tiny {
1306 /* Rules for geo microformats */
1309 border-bottom: none;
1312 /* General styles for action lists / subnavs / pager navs */
1315 nav.secondary-actions {
1320 flex-direction: row;
1326 display: inline-block;
1332 border-left: 1px solid $grey;
1333 padding-left: $lineheight/2;
1334 margin-right: $lineheight/2;
1335 margin-bottom: $lineheight/8;
1340 div.secondary-actions {
1347 input[type="submit"],
1348 input[type="button"],
1349 input[type="reset"],
1352 box-sizing: border-box;
1358 border-right:1px solid white;
1359 text-overflow: ellipsis;
1360 white-space: nowrap;
1364 .button:first-child,
1365 .button_to:first-child {
1366 border-radius:2px 0 0 2px;
1370 .button_to:last-child {
1371 border-radius:0 2px 2px 0;
1372 border-right-width: 0;
1376 .button_to:only-child,
1377 *[value="Hide"] + input:last-child,
1378 *[value="Hide"] + .button:last-child,
1379 *[value="Hide"] + .button_to:last-child {
1381 border-right-width: 0;
1383 /* if a 3-button set has a hidden middle button */
1384 *[value="Hide"] + input:nth-child(3),
1385 *[value="Hide"] + .button:nth-child(3),
1386 *[value="Hide"] + .button_to:nth-child(3) {
1387 border-radius:0 2px 2px 0;
1388 border-right-width: 0;
1390 /* if a 3-button set starts with a hidden button */
1391 *[value="Hide"] + input:nth-child(2):not(:last-child),
1392 *[value="Hide"] + .button:nth-child(2):not(:last-child),
1393 *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
1394 border-radius:2px 0 0 2px;
1395 border-right-width: 1px;
1399 /* Create a single-line dl */
1403 display: inline-block;
1410 /* Rules for OpenID logo */
1413 vertical-align: text-bottom;
1417 /* Rules for rich text */
1422 background: $lightgrey;
1427 background: $lightgrey;
1429 white-space: pre-wrap;
1437 padding: $lineheight;
1438 background-color: $offwhite;
1445 border-left: $lineheight solid $offwhite;
1446 padding-left: $lineheight;
1452 /* Rules for the user notes list */
1456 background-color: $offwhite;
1460 /* Rules for the iD editor */
1467 /* Rules for the "Welcome" page */
1468 .site-welcome, .site-fixthemap {
1470 background-image: image-url("welcome-sprite.png");
1471 background-size: 500px 250px;
1476 padding-bottom: 20px;
1478 margin-bottom: 10px;
1490 /* no-r2 */ background-position: -50px 0;
1495 vertical-align: middle;
1499 /* no-r2 */ background-position: -100px 0;
1503 /* no-r2 */ background-position: -150px 0;
1507 /* no-r2 */ background-position: -200px 0;
1511 /* no-r2 */ background-position: -250px 0;
1515 /* no-r2 */ background-position: -300px 0;
1519 /* no-r2 */ background-position: -350px 0;
1523 background-color: #333;
1528 .site-about #content {
1529 background-color: $lightgrey;
1530 background-position: 50% 50%;
1531 background-repeat: no-repeat;
1532 background-size: cover;
1533 background-attachment: fixed;
1544 color: $vibrant-green;
1550 background-position: 0 50%;
1551 background-repeat: no-repeat;
1552 background-image: image-url('about/osm.png');
1553 background-size: cover;
1554 background-color: $vibrant-green;
1558 background: $vibrant-green;
1562 display: inline-block;
1572 vertical-align: middle;
1573 background: 40px 40px image-url('about/sprite.png') no-repeat;
1577 background-position: 0px 0px;
1581 background-position: 0px -40px;
1585 background-position: 0px -80px;
1589 background-position: 0px -120px;
1593 background-position: 0px -160px;
1597 background-position: -45px -160px;
1604 @media only screen and (max-width:960px) {
1605 .header-illustration.new-user-arm {