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, $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, $white, null, null, $white);
198 .btn-outline-secondary {
199 @include button-outline-variant($darkgrey, $darkgrey, white, $darkgrey);
205 &.show .btn-outline-secondary {
206 background-color: white;
211 display: inline-block;
213 margin: 3px 0 3px 3px;
214 background-color: lighten($grey, 10%);
226 nav.primary, nav.secondary {
229 background-color: $green;
235 #compact-secondary-nav {
240 #compact-secondary-nav {
241 display: inline-block;
248 /* Utility for styling notification numbers */
251 padding: 2px $lineheight/4;
253 background: lighten($green, 30%);
259 /* Rules for the message shown in place of the map when javascript is disabled */
267 /* Rules for Leaflet maps */
269 .leaflet-control .control-button {
273 background-color: #333;
274 background-color: rgba(0,0,0,.6);
275 border-radius: 4px 0 0 4px;
281 background-color: black;
286 background-color: #333;
287 background-color: rgba(0,0,0,.5);
292 background-color: $vibrant-green;
300 .leaflet-control .zoomin,
301 .control-layers .control-button {
303 border-radius: 4px 0 0 0;
306 .leaflet-control .zoomout,
307 .control-key .control-button {
312 .control-locate .control-button,
313 .control-share .control-button {
314 border-radius: 0 0 0 4px;
317 /* Rules for the sidebar and main map area */
337 width: $sidebarWidth;
356 .overlay-sidebar #sidebar {
393 width: $sidebarWidth;
409 .leaflet-marker-draggable {
424 border-bottom: 1px solid $grey;
434 border:1px solid $grey;
439 border: 1px solid $grey;
441 border-top-color: $grey;
465 border: 2px solid #fff;
468 transition: border-color 0.08s ease-in;
475 border-bottom-right-radius: 3px;
479 text-stroke: 2px #fff;
480 background: rgba(255,255,255,.9);
482 input[type="radio"] {
487 &.active { border-color: darken($green, 10%); }
490 &.active { border-color: darken($green, 20%); }
500 li.disabled { color: $darkgrey; }
510 text-decoration: none;
511 background-color: $lightblue;
513 border-right: 1px solid #fff;
517 border-right: 1px solid #fff;
518 border-radius: 4px 0 0 4px;
522 border-radius: 0 4px 4px 0;
526 background-color: $blue;
538 font-family: monospace;
560 top: $lineheight/2 !important;
562 margin-right: 0px !important;
563 margin-top: 0px !important;
567 .leaflet-popup-scrolled {
568 padding-right: $lineheight;
569 border-bottom: 0px !important;
570 border-top: 0px !important;
573 .leaflet-popup-content-wrapper {
574 border-radius: 4px !important;
577 /* Rules for attribution text under the main map shown on printouts */
587 .attribution_license,
588 .attribution_project {
592 .attribution_notice {
596 .donate-attr { color: darken($green, 10%) !important; }
598 /* Rules for the sidebar */
602 padding: $lineheight/2 $lineheight;
603 // background: $offwhite;
604 // border-bottom: 1px solid $grey;
623 margin: $lineheight auto;
634 /* Temporary label size override until we remove site-wide font customisation */
642 /* Stop bootstrap 5 from floating legends when they don't need to be */
647 /* Override the text colour for primary and secondary buttons, to match our
648 bootstrap 4 colours. Note this has accessibility issues, which is why
649 bootstrap 5 calculates black as the appropriate colour, and we should
650 reconsider our colours at some point with that in mind. */
653 @include button-variant($primary, $primary, $white, null, null, $white, null, null, $white, null, null, $white);
657 @include button-variant($secondary, $secondary, $white, null, null, $white, null, null, $white, null, null, $white);
660 .btn-outline-secondary {
661 @include button-outline-variant($secondary, $white, null, null, $white);
664 /* Rules for the search and direction forms */
666 header .search_forms,
671 /* Rules for the map key which appears in the popout sidebar */
674 .mapkey-table-key img {
681 /* Rules for search sidebar */
683 #sidebar .search_results_entry {
686 &.selected { background: $list-highlight; }
689 .search_more .loader {
695 .search_results_error {
700 /* Rules for routing */
703 background-image: image-url('routing-sprite.png');
706 background-repeat: no-repeat;
708 @for $i from 0 through 25 {
709 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
712 td.instruction, td.distance {
713 padding-top: $lineheight/5;
714 padding-bottom: $lineheight/5;
715 border-bottom: 1px solid $grey;
726 background: $list-highlight;
729 .routing_marker { width: 15px; cursor: move; }
731 /* Rules for entity history */
736 border-bottom: $keyline;
744 /* Rules for the history sidebar */
746 #sidebar .changesets {
750 &.selected { background: $list-highlight; }
751 /* color is derived from changeset bbox fillColor in history.js */
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 {