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 */
85 background: image-url("menu-icon.png") no-repeat;
86 background-size: 30px 30px;
89 margin: 14px 10px 0 0;
94 height: $headerHeight;
99 h1, nav, nav > ul, nav > ul > li {
100 display: inline-block;
105 padding: $lineheight/2;
113 text-decoration: none;
120 vertical-align: middle;
146 .btn-outline-primary {
147 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
151 .btn-outline-primary {
156 border-top-color: $grey;
160 background-color: lighten($green, 30%);
165 // Small tweaks to the toggle to stop the primary colour showing through
166 // when the menu is shown
167 .show > .btn-outline-primary.dropdown-toggle {
168 background-color: $green;
169 border-color: $green;
172 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
187 color: darken($darkgrey, 25%);
191 .btn-outline-secondary {
192 @include button-outline-variant($darkgrey, $color-hover: $white, $active-color: $white);
197 .btn-outline-secondary {
198 @include button-outline-variant($darkgrey, $color-hover: $darkgrey, $active-background: white, $active-border: $darkgrey);
207 display: inline-block;
209 margin: 3px 0 3px 3px;
210 background-color: lighten($grey, 10%);
222 nav.primary, nav.secondary {
225 background-color: $green;
231 #compact-secondary-nav {
236 #compact-secondary-nav {
237 display: inline-block;
251 float: none !important;
259 min-height: $headerHeight;
271 #sidebar .search_forms,
287 border-top: 1px solid #eee;
289 border-bottom: 1px solid #eee;
312 #compact-secondary-nav {
317 display: inline-block;
320 .overlay-sidebar #sidebar .welcome {
324 .overlay-sidebar #sidebar #banner {
328 .leaflet-top.leaflet-right {
329 top: 10px !important;
333 /* Utility for styling notification numbers */
336 padding: 2px $lineheight/4;
338 background: lighten($green, 30%);
344 /* Rules for the message shown in place of the map when javascript is disabled */
352 /* Rules for Leaflet maps */
354 .leaflet-top.leaflet-right,
355 .leaflet-top.leaflet-left {
359 flex-direction: column;
360 flex-wrap: wrap-reverse;
363 .leaflet-control .control-button {
367 background-color: #333;
368 background-color: rgba(0,0,0,.6);
373 background-color: black;
378 background-color: #333;
379 background-color: rgba(0,0,0,.5);
384 background-color: $vibrant-green;
388 border-start-start-radius: 4px;
392 border-end-start-radius: 4px;
401 /* Rules for the sidebar and main map area */
421 width: $sidebarWidth;
437 .overlay-sidebar #sidebar {
470 width: $sidebarWidth;
486 .leaflet-marker-draggable {
501 border-bottom: 1px solid $grey;
507 @include media-breakpoint-down(md) {
549 border: 2px solid #fff;
552 transition: border-color 0.08s ease-in;
559 border-bottom-right-radius: 3px;
563 text-stroke: 2px #fff;
564 background: rgba(255,255,255,.9);
566 input[type="radio"] {
571 &.active { border-color: darken($green, 10%); }
574 &.active { border-color: darken($green, 20%); }
584 li.disabled { color: $darkgrey; }
593 font-family: monospace;
611 top: $lineheight/2 !important;
613 margin-right: 0px !important;
614 margin-top: 0px !important;
618 .leaflet-popup-scrolled {
619 padding-right: $lineheight;
620 border-bottom: 0px !important;
621 border-top: 0px !important;
624 .leaflet-popup-content-wrapper {
625 border-radius: 4px !important;
628 /* Rules for attribution text under the main map shown on printouts */
634 .donate-attr { color: darken($green, 10%) !important; }
636 /* Rules for the sidebar */
640 padding: $lineheight/2 $lineheight;
641 // background: $offwhite;
642 // border-bottom: 1px solid $grey;
657 /* Temporary label size override until we remove site-wide font customisation */
665 /* Stop bootstrap 5 from floating legends when they don't need to be */
670 /* Override the text colour for primary and secondary buttons, to match our
671 bootstrap 4 colours. Note this has accessibility issues, which is why
672 bootstrap 5 calculates black as the appropriate colour, and we should
673 reconsider our colours at some point with that in mind. */
676 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
680 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
683 .btn-outline-secondary {
684 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
687 /* Rules for the search and direction forms */
689 header .search_forms,
694 /* Rules for the map key which appears in the popout sidebar */
697 .mapkey-table-key img {
704 /* Rules for search sidebar */
706 #sidebar .search_results_entry {
709 &.selected { background: $list-highlight; }
712 .search_more .loader {
717 .search_results_error {
722 /* Rules for routing */
725 background-image: image-url('routing-sprite.png');
728 background-repeat: no-repeat;
730 @for $i from 0 through 25 {
731 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
734 td.instruction, td.distance {
735 padding-top: $lineheight/5;
736 padding-bottom: $lineheight/5;
737 border-bottom: 1px solid $grey;
748 background: $list-highlight;
751 .routing_marker { width: 15px; cursor: move; }
757 /* Rules for the history sidebar */
759 #sidebar .changesets {
761 &.selected { background: $list-highlight; }
762 /* color is derived from changeset bbox fillColor in history.js */
764 a.stretched-link > span, a:not(.stretched-link), [title] {
766 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
778 .changeset_more .loader {
784 /* Rules for the browse sidebar */
788 padding-bottom: $spacer;
789 margin-bottom: $spacer;
790 border-bottom: 1px solid $grey;
793 word-wrap: break-word;
797 .browse-section:last-of-type {
802 background-color: $offwhite;
804 border-collapse: separate;
807 margin-bottom: $spacer;
810 border-bottom: 1px solid $grey;
813 tr:last-child th, tr:last-child td {
821 word-wrap: break-word;
822 white-space: pre-wrap;
827 background-color: $offwhite;
831 border-left: 1px solid $grey;
832 background-color: #fff;
835 .colour-preview-box {
840 border: 1px solid rgba(0, 0, 0, .1);
841 // add color via inline css on element: background-color: <tag value>;
845 .note-comments li, .changeset-comments li {
846 margin: $lineheight/2 0;
849 margin: 10px 6px 0 6px;
854 .subscribe-buttons input {
860 span.action-button:hover {
862 text-decoration: underline;
867 margin: 0 0 10px 10px;
880 background: $list-highlight;
887 /* Bootstrap buttons don't have any vertical margin, so
888 they touch when adjacent buttons wrap onto a new line
889 e.g. wide form buttons on a narrow sidebar */
893 margin-bottom: $spacer * 0.25;
897 /* Rules for export sidebar */
905 .export_area_inputs {
906 margin-bottom: $spacer;
914 background: $lightgrey;
916 #maxlat { margin-top: -1px; }
919 /* no-r2 */ margin-left: -1px;
923 /* no-r2 */ margin-right: -1px;
925 #minlat { margin-bottom: -1px; }
929 margin: $lineheight/4;
933 padding-left: $lineheight/2;
941 /* Rules for edit pages */
957 /* Rules for non-map content pages */
960 background: $lightgrey;
967 padding: $lineheight;
970 /* Overrides for pages that use new layout conventions */
972 .header-illustration {
973 background-position: 0 0;
974 background-repeat: no-repeat;
982 background-image: image-url("sign-up-illustration.png");
986 background-image: image-url("confirm-illustration.png");
990 background-image: image-url("terms-illustration.png");
998 background-image: image-url("sign-up-illustration-arm.png");
1001 pointer-events: none;
1005 [dir=rtl] .header-illustration {
1006 transform: scaleX(-1);
1009 transform: scaleX(-1);
1013 #content.maximised {
1022 /* Rules for small maps in content areas */
1026 margin-bottom: $lineheight;
1029 @include media-breakpoint-up(md) {
1035 /* Rules for the user map */
1037 .content_map .leaflet-popup-content {
1038 margin: $lineheight/2;
1042 /* Rules for user popups on maps */
1053 /* Rules for the user list */
1059 /* Rules for the diary list page */
1063 padding-top: $lineheight;
1064 padding-bottom: $lineheight/2;
1065 border-top: 1px solid $grey;
1068 background-color: #fee;
1072 /* Rules for the diary entry page */
1078 margin-bottom: $lineheight;
1084 border-top: 1px dashed $grey;
1085 padding-top: $lineheight/2;
1086 padding-bottom: $lineheight/2;
1088 margin-top: $lineheight/2;
1089 padding-top: $lineheight;
1090 border-top: 1px solid $grey;
1093 background-color: #fee;
1096 margin-bottom: $lineheight/2;
1105 /* Rules for the log in page */
1107 #login_auth_buttons {
1112 padding: $lineheight/4 $lineheight/2;
1116 /* Rules for the account confirmation page */
1120 padding: $lineheight;
1121 margin-bottom: $lineheight;
1126 list-style: inherit;
1130 list-style-type: lower-alpha;
1135 /* Rules for the account settings page */
1137 #accountForm .user_image {
1141 #accountForm #user_image {
1145 #accountForm ul.accountImage-options {
1158 display: inline !important;
1161 /* Rules for the oauth authorization page */
1163 .oauth-authorize ul {
1167 /* Rules for messages pages */
1170 button[type="submit"] {
1172 white-space: nowrap;
1176 background: $offwhite;
1180 background: #CBEEA7;
1188 .inbox-row .inbox-mark-read {
1193 margin-bottom: $lineheight;
1194 padding: $lineheight/4 0px 4px 0px;
1195 border-bottom: 1px solid $grey;
1202 .info-line .user_thumbnail_tiny {
1203 vertical-align: middle;
1207 white-space: nowrap;
1216 .inbox-row-unread .inbox-mark-unread {
1220 /* Rules for highlighting fields with rails validation errors */
1223 display: inline-block;
1229 background-color: #ff7070;
1232 /* Rules for rails validation error boxes */
1236 border: 2px solid #ff7070;
1237 padding: 0 $lineheight/2;
1238 margin-bottom: $lineheight;
1239 background-color: #f0f0f0;
1242 margin: 0 -10px 10px -10px;
1243 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1246 background-color: #c00;
1254 padding: $lineheight/4;
1259 background-color: $lightgrey;
1261 .describe_location {
1270 background-color: $lightgrey;
1273 /* Rules for user images */
1280 img.user_thumbnail {
1285 img.user_thumbnail_tiny {
1292 /* Rules for geo microformats */
1295 border-bottom: none;
1298 /* General styles for action lists / subnavs */
1301 nav.secondary-actions {
1306 flex-direction: row;
1314 border-left: 1px solid $grey;
1315 padding-left: $lineheight/2;
1316 margin-right: $lineheight/2;
1317 margin-bottom: $lineheight/8;
1322 div.secondary-actions {
1327 /* Create a single-line dl */
1331 display: inline-block;
1338 /* Rules for OpenID logo */
1341 vertical-align: text-bottom;
1345 /* Rules for rich text */
1350 background: $lightgrey;
1355 background: $lightgrey;
1357 white-space: pre-wrap;
1365 padding: $lineheight;
1366 background-color: $offwhite;
1373 border-left: $lineheight solid $offwhite;
1374 padding-left: $lineheight;
1380 /* Rules for the user notes list */
1384 background-color: $offwhite;
1388 /* Rules for the iD editor */
1395 /* Rules for the "Welcome" page */
1396 .site-welcome, .site-fixthemap {
1398 background-image: image-url("welcome-sprite.png");
1399 background-size: 500px 250px;
1409 /* no-r2 */ background-position: -50px 0;
1414 vertical-align: middle;
1418 /* no-r2 */ background-position: -100px 0;
1422 /* no-r2 */ background-position: -150px 0;
1426 /* no-r2 */ background-position: -200px 0;
1430 /* no-r2 */ background-position: -250px 0;
1434 /* no-r2 */ background-position: -300px 0;
1438 /* no-r2 */ background-position: -350px 0;
1442 background-color: #333;
1447 .site-about #content {
1448 background-color: $lightgrey;
1459 color: $vibrant-green;
1465 background-position: 0 50%;
1466 background-repeat: no-repeat;
1467 background-image: image-url('about/osm.png');
1468 background-size: cover;
1469 background-color: $vibrant-green;
1473 background: $vibrant-green;
1477 display: inline-block;
1486 background: 40px 40px image-url('about/sprite.png') no-repeat;
1490 background-position: 0px 0px;
1494 background-position: 0px -40px;
1498 background-position: 0px -80px;
1502 background-position: 0px -120px;
1506 background-position: 0px -160px;
1510 background-position: -45px -160px;