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;
384 .leaflet-control-group-end + .leaflet-control {
388 .leaflet-control:first-child,
389 .leaflet-control-group-end + .leaflet-control {
390 &.control-button, .control-button:first-child {
391 border-start-start-radius: 4px;
395 .leaflet-control-group-end {
396 &.control-button, .control-button:last-child {
397 border-end-start-radius: 4px;
401 /* Rules for the sidebar and main map area */
421 width: $sidebarWidth;
440 .overlay-sidebar #sidebar {
477 width: $sidebarWidth;
493 .leaflet-marker-draggable {
508 border-bottom: 1px solid $grey;
514 border: 1px solid $grey;
516 border-top-color: $grey;
522 @include media-breakpoint-down(md) {
570 border: 2px solid #fff;
573 transition: border-color 0.08s ease-in;
580 border-bottom-right-radius: 3px;
584 text-stroke: 2px #fff;
585 background: rgba(255,255,255,.9);
587 input[type="radio"] {
592 &.active { border-color: darken($green, 10%); }
595 &.active { border-color: darken($green, 20%); }
605 li.disabled { color: $darkgrey; }
615 text-decoration: none;
616 background-color: $lightblue;
618 border-right: 1px solid #fff;
622 border-right: 1px solid #fff;
623 border-radius: 4px 0 0 4px;
627 border-radius: 0 4px 4px 0;
631 background-color: $blue;
643 font-family: monospace;
665 top: $lineheight/2 !important;
667 margin-right: 0px !important;
668 margin-top: 0px !important;
672 .leaflet-popup-scrolled {
673 padding-right: $lineheight;
674 border-bottom: 0px !important;
675 border-top: 0px !important;
678 .leaflet-popup-content-wrapper {
679 border-radius: 4px !important;
682 /* Rules for attribution text under the main map shown on printouts */
692 .attribution_license,
693 .attribution_project {
697 .attribution_notice {
701 .donate-attr { color: darken($green, 10%) !important; }
703 /* Rules for the sidebar */
707 padding: $lineheight/2 $lineheight;
708 // background: $offwhite;
709 // border-bottom: 1px solid $grey;
728 margin: $lineheight auto;
739 /* Temporary label size override until we remove site-wide font customisation */
747 /* Stop bootstrap 5 from floating legends when they don't need to be */
752 /* Override the text colour for primary and secondary buttons, to match our
753 bootstrap 4 colours. Note this has accessibility issues, which is why
754 bootstrap 5 calculates black as the appropriate colour, and we should
755 reconsider our colours at some point with that in mind. */
758 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
762 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
765 .btn-outline-secondary {
766 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
769 /* Rules for the search and direction forms */
771 header .search_forms,
776 /* Rules for the map key which appears in the popout sidebar */
779 .mapkey-table-key img {
786 /* Rules for search sidebar */
788 #sidebar .search_results_entry {
791 &.selected { background: $list-highlight; }
794 .search_more .loader {
800 .search_results_error {
805 /* Rules for routing */
808 background-image: image-url('routing-sprite.png');
811 background-repeat: no-repeat;
813 @for $i from 0 through 25 {
814 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
817 td.instruction, td.distance {
818 padding-top: $lineheight/5;
819 padding-bottom: $lineheight/5;
820 border-bottom: 1px solid $grey;
831 background: $list-highlight;
834 .routing_marker { width: 15px; cursor: move; }
836 /* Rules for entity history */
841 border-bottom: $keyline;
849 /* Rules for the history sidebar */
851 #sidebar .changesets {
853 &.selected { background: $list-highlight; }
854 /* color is derived from changeset bbox fillColor in history.js */
856 a.stretched-link > span, a:not(.stretched-link), [title] {
858 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
870 .changeset_more .loader {
876 /* Rules for the browse sidebar */
880 padding-bottom: $spacer;
881 margin-bottom: $spacer;
882 border-bottom: 1px solid $grey;
885 word-wrap: break-word;
889 .browse-section:last-of-type {
894 background-color: $offwhite;
896 border-collapse: separate;
899 margin-bottom: $spacer;
902 border-bottom: 1px solid $grey;
905 tr:last-child th, tr:last-child td {
913 word-wrap: break-word;
914 white-space: pre-wrap;
919 background-color: $offwhite;
923 border-left: 1px solid $grey;
924 background-color: #fff;
927 .colour-preview-box {
932 border: 1px solid rgba(0, 0, 0, .1);
933 // add color via inline css on element: background-color: <tag value>;
937 .note-comments li, .changeset-comments li {
938 margin: $lineheight/2 0;
941 margin: 10px 6px 0 6px;
946 .subscribe-buttons input {
952 span.action-button:hover {
954 text-decoration: underline;
959 margin: 0 0 10px 10px;
972 background: $list-highlight;
979 /* Bootstrap buttons don't have any vertical margin, so
980 they touch when adjacent buttons wrap onto a new line
981 e.g. wide form buttons on a narrow sidebar */
985 margin-bottom: $spacer * 0.25;
989 /* Rules for export sidebar */
997 .export_area_inputs {
998 margin-bottom: $spacer;
1006 background: $lightgrey;
1008 #maxlat { margin-top: -1px; }
1011 /* no-r2 */ margin-left: -1px;
1015 /* no-r2 */ margin-right: -1px;
1017 #minlat { margin-bottom: -1px; }
1021 margin: $lineheight/4;
1025 padding-left: $lineheight/2;
1028 margin-bottom: 10px;
1033 /* Rules for edit pages */
1049 /* Rules for non-map content pages */
1052 background: $lightgrey;
1059 padding: $lineheight;
1062 /* Overrides for pages that use new layout conventions */
1064 .header-illustration {
1065 background-position: 0 0;
1066 background-repeat: no-repeat;
1074 background-image: image-url("sign-up-illustration.png");
1078 background-image: image-url("confirm-illustration.png");
1082 background-image: image-url("terms-illustration.png");
1090 background-image: image-url("sign-up-illustration-arm.png");
1093 pointer-events: none;
1097 [dir=rtl] .header-illustration {
1098 transform: scaleX(-1);
1101 #content.maximised {
1110 /* Rules for small maps in content areas */
1114 margin-bottom: $lineheight;
1117 @include media-breakpoint-up(md) {
1123 /* Rules for the user map */
1125 .content_map .leaflet-popup-content {
1126 margin: $lineheight/2;
1130 /* Rules for user popups on maps */
1136 margin-top: 0 0 0 60px;
1141 /* Rules for the user list */
1147 /* Rules for the diary list page */
1151 padding-top: $lineheight;
1152 padding-bottom: $lineheight/2;
1153 border-top: 1px solid $grey;
1156 background-color: #fee;
1160 /* Rules for the diary entry page */
1166 margin-bottom: $lineheight;
1172 border-top: 1px dashed $grey;
1173 padding-top: $lineheight/2;
1174 padding-bottom: $lineheight/2;
1176 margin-top: $lineheight/2;
1177 padding-top: $lineheight;
1178 border-top: 1px solid $grey;
1181 background-color: #fee;
1184 margin-bottom: $lineheight/2;
1193 /* Rules for the log in page */
1195 #login_auth_buttons {
1200 padding: $lineheight/4 $lineheight/2;
1204 /* Rules for the account confirmation page */
1208 padding: $lineheight;
1209 margin-bottom: $lineheight;
1214 list-style: inherit;
1218 list-style-type: lower-alpha;
1223 /* Rules for the account settings page */
1225 #accountForm .user_image {
1229 #accountForm #user_image {
1233 #accountForm ul.accountImage-options {
1246 display: inline !important;
1249 /* Rules for the oauth authorization page */
1251 .oauth-authorize ul {
1255 /* Rules for messages pages */
1258 button[type="submit"] {
1260 white-space: nowrap;
1264 background: $offwhite;
1268 background: #CBEEA7;
1276 .inbox-row .inbox-mark-read {
1281 margin-bottom: $lineheight;
1282 padding: $lineheight/4 0px 4px 0px;
1283 border-bottom: 1px solid $grey;
1290 .info-line .user_thumbnail_tiny {
1291 vertical-align: middle;
1295 white-space: nowrap;
1304 .inbox-row-unread .inbox-mark-unread {
1308 /* Rules for "flash" notice boxes shown at the top of the content area */
1312 background-color: #ff7070;
1316 background-color: #ffe0cc;
1320 background-color: #CBEEA7;
1324 /* Rules for highlighting fields with rails validation errors */
1327 display: inline-block;
1333 background-color: #ff7070;
1336 /* Rules for rails validation error boxes */
1340 border: 2px solid #ff7070;
1341 padding: 0 $lineheight/2;
1342 margin-bottom: $lineheight;
1343 background-color: #f0f0f0;
1346 margin: 0 -10px 10px -10px;
1347 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1350 background-color: #c00;
1358 padding: $lineheight/4;
1363 background-color: $lightgrey;
1365 .describe_location {
1374 background-color: $lightgrey;
1380 vertical-align: middle;
1385 /* Rules for user images */
1392 img.user_thumbnail {
1397 img.user_thumbnail_tiny {
1404 /* Rules for geo microformats */
1407 border-bottom: none;
1410 /* General styles for action lists / subnavs */
1413 nav.secondary-actions {
1418 flex-direction: row;
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 {
1439 /* Create a single-line dl */
1443 display: inline-block;
1450 /* Rules for OpenID logo */
1453 vertical-align: text-bottom;
1457 /* Rules for rich text */
1462 background: $lightgrey;
1467 background: $lightgrey;
1469 white-space: pre-wrap;
1477 padding: $lineheight;
1478 background-color: $offwhite;
1485 border-left: $lineheight solid $offwhite;
1486 padding-left: $lineheight;
1492 /* Rules for the user notes list */
1496 background-color: $offwhite;
1500 /* Rules for the iD editor */
1507 /* Rules for the "Welcome" page */
1508 .site-welcome, .site-fixthemap {
1510 background-image: image-url("welcome-sprite.png");
1511 background-size: 500px 250px;
1516 padding-bottom: 20px;
1518 margin-bottom: 10px;
1530 /* no-r2 */ background-position: -50px 0;
1535 vertical-align: middle;
1539 /* no-r2 */ background-position: -100px 0;
1543 /* no-r2 */ background-position: -150px 0;
1547 /* no-r2 */ background-position: -200px 0;
1551 /* no-r2 */ background-position: -250px 0;
1555 /* no-r2 */ background-position: -300px 0;
1559 /* no-r2 */ background-position: -350px 0;
1563 background-color: #333;
1568 .site-about #content {
1569 background-color: $lightgrey;
1580 color: $vibrant-green;
1586 background-position: 0 50%;
1587 background-repeat: no-repeat;
1588 background-image: image-url('about/osm.png');
1589 background-size: cover;
1590 background-color: $vibrant-green;
1594 background: $vibrant-green;
1598 display: inline-block;
1608 vertical-align: middle;
1609 background: 40px 40px image-url('about/sprite.png') no-repeat;
1613 background-position: 0px 0px;
1617 background-position: 0px -40px;
1621 background-position: 0px -80px;
1625 background-position: 0px -120px;
1629 background-position: 0px -160px;
1633 background-position: -45px -160px;