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.visible {
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-control .control-button {
358 background-color: #333;
359 background-color: rgba(0,0,0,.6);
364 background-color: black;
369 background-color: #333;
370 background-color: rgba(0,0,0,.5);
375 background-color: $vibrant-green;
379 border-start-start-radius: 4px;
383 border-end-start-radius: 4px;
392 /* Rules for the sidebar and main map area */
412 width: $sidebarWidth;
431 .overlay-sidebar #sidebar {
468 width: $sidebarWidth;
484 .leaflet-marker-draggable {
499 border-bottom: 1px solid $grey;
505 @include media-breakpoint-down(md) {
547 border: 2px solid #fff;
550 transition: border-color 0.08s ease-in;
557 border-bottom-right-radius: 3px;
561 text-stroke: 2px #fff;
562 background: rgba(255,255,255,.9);
564 input[type="radio"] {
569 &.active { border-color: darken($green, 10%); }
572 &.active { border-color: darken($green, 20%); }
582 li.disabled { color: $darkgrey; }
591 font-family: monospace;
609 top: $lineheight/2 !important;
611 margin-right: 0px !important;
612 margin-top: 0px !important;
616 .leaflet-popup-scrolled {
617 padding-right: $lineheight;
618 border-bottom: 0px !important;
619 border-top: 0px !important;
622 .leaflet-popup-content-wrapper {
623 border-radius: 4px !important;
626 /* Rules for attribution text under the main map shown on printouts */
632 .donate-attr { color: darken($green, 10%) !important; }
634 /* Rules for the sidebar */
638 padding: $lineheight/2 $lineheight;
639 // background: $offwhite;
640 // border-bottom: 1px solid $grey;
655 /* Temporary label size override until we remove site-wide font customisation */
663 /* Stop bootstrap 5 from floating legends when they don't need to be */
668 /* Override the text colour for primary and secondary buttons, to match our
669 bootstrap 4 colours. Note this has accessibility issues, which is why
670 bootstrap 5 calculates black as the appropriate colour, and we should
671 reconsider our colours at some point with that in mind. */
674 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
678 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
681 .btn-outline-secondary {
682 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
685 /* Rules for the search and direction forms */
687 header .search_forms,
692 /* Rules for the map key which appears in the popout sidebar */
695 .mapkey-table-key img {
702 /* Rules for search sidebar */
704 #sidebar .search_results_entry {
707 &.selected { background: $list-highlight; }
710 .search_more .loader {
715 .search_results_error {
720 /* Rules for routing */
723 background-image: image-url('routing-sprite.png');
726 background-repeat: no-repeat;
728 @for $i from 0 through 25 {
729 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
732 td.instruction, td.distance {
733 padding-top: $lineheight/5;
734 padding-bottom: $lineheight/5;
735 border-bottom: 1px solid $grey;
746 background: $list-highlight;
749 .routing_marker { width: 15px; cursor: move; }
755 /* Rules for the history sidebar */
757 #sidebar .changesets {
759 &.selected { background: $list-highlight; }
760 /* color is derived from changeset bbox fillColor in history.js */
762 a.stretched-link > span, a:not(.stretched-link), [title] {
764 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
776 .changeset_more .loader {
782 /* Rules for the browse sidebar */
786 padding-bottom: $spacer;
787 margin-bottom: $spacer;
788 border-bottom: 1px solid $grey;
791 word-wrap: break-word;
795 .browse-section:last-of-type {
800 background-color: $offwhite;
802 border-collapse: separate;
805 margin-bottom: $spacer;
808 border-bottom: 1px solid $grey;
811 tr:last-child th, tr:last-child td {
819 word-wrap: break-word;
820 white-space: pre-wrap;
825 background-color: $offwhite;
829 border-left: 1px solid $grey;
830 background-color: #fff;
833 .colour-preview-box {
838 border: 1px solid rgba(0, 0, 0, .1);
839 // add color via inline css on element: background-color: <tag value>;
843 .note-comments li, .changeset-comments li {
844 margin: $lineheight/2 0;
847 margin: 10px 6px 0 6px;
852 .subscribe-buttons input {
858 span.action-button:hover {
860 text-decoration: underline;
865 margin: 0 0 10px 10px;
878 background: $list-highlight;
885 /* Bootstrap buttons don't have any vertical margin, so
886 they touch when adjacent buttons wrap onto a new line
887 e.g. wide form buttons on a narrow sidebar */
891 margin-bottom: $spacer * 0.25;
895 /* Rules for export sidebar */
903 .export_area_inputs {
904 margin-bottom: $spacer;
912 background: $lightgrey;
914 #maxlat { margin-top: -1px; }
917 /* no-r2 */ margin-left: -1px;
921 /* no-r2 */ margin-right: -1px;
923 #minlat { margin-bottom: -1px; }
927 margin: $lineheight/4;
931 padding-left: $lineheight/2;
939 /* Rules for edit pages */
955 /* Rules for non-map content pages */
958 background: $lightgrey;
965 padding: $lineheight;
968 /* Overrides for pages that use new layout conventions */
970 .header-illustration {
971 background-position: 0 0;
972 background-repeat: no-repeat;
980 background-image: image-url("sign-up-illustration.png");
984 background-image: image-url("confirm-illustration.png");
988 background-image: image-url("terms-illustration.png");
996 background-image: image-url("sign-up-illustration-arm.png");
999 pointer-events: none;
1003 [dir=rtl] .header-illustration {
1004 transform: scaleX(-1);
1007 transform: scaleX(-1);
1011 #content.maximised {
1020 /* Rules for small maps in content areas */
1024 margin-bottom: $lineheight;
1027 @include media-breakpoint-up(md) {
1033 /* Rules for the user map */
1035 .content_map .leaflet-popup-content {
1036 margin: $lineheight/2;
1040 /* Rules for user popups on maps */
1051 /* Rules for the user list */
1057 /* Rules for the diary list page */
1061 padding-top: $lineheight;
1062 padding-bottom: $lineheight/2;
1063 border-top: 1px solid $grey;
1066 background-color: #fee;
1070 /* Rules for the diary entry page */
1076 margin-bottom: $lineheight;
1082 border-top: 1px dashed $grey;
1083 padding-top: $lineheight/2;
1084 padding-bottom: $lineheight/2;
1086 margin-top: $lineheight/2;
1087 padding-top: $lineheight;
1088 border-top: 1px solid $grey;
1091 background-color: #fee;
1094 margin-bottom: $lineheight/2;
1103 /* Rules for the log in page */
1105 #login_auth_buttons {
1110 padding: $lineheight/4 $lineheight/2;
1114 /* Rules for the account confirmation page */
1118 padding: $lineheight;
1119 margin-bottom: $lineheight;
1124 list-style: inherit;
1128 list-style-type: lower-alpha;
1133 /* Rules for the account settings page */
1135 #accountForm .user_image {
1139 #accountForm #user_image {
1143 #accountForm ul.accountImage-options {
1156 display: inline !important;
1159 /* Rules for the oauth authorization page */
1161 .oauth-authorize ul {
1165 /* Rules for messages pages */
1168 button[type="submit"] {
1170 white-space: nowrap;
1174 background: $offwhite;
1178 background: #CBEEA7;
1186 .inbox-row .inbox-mark-read {
1191 margin-bottom: $lineheight;
1192 padding: $lineheight/4 0px 4px 0px;
1193 border-bottom: 1px solid $grey;
1200 .info-line .user_thumbnail_tiny {
1201 vertical-align: middle;
1205 white-space: nowrap;
1214 .inbox-row-unread .inbox-mark-unread {
1218 /* Rules for highlighting fields with rails validation errors */
1221 display: inline-block;
1227 background-color: #ff7070;
1230 /* Rules for rails validation error boxes */
1234 border: 2px solid #ff7070;
1235 padding: 0 $lineheight/2;
1236 margin-bottom: $lineheight;
1237 background-color: #f0f0f0;
1240 margin: 0 -10px 10px -10px;
1241 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1244 background-color: #c00;
1252 padding: $lineheight/4;
1257 background-color: $lightgrey;
1259 .describe_location {
1268 background-color: $lightgrey;
1271 /* Rules for user images */
1278 img.user_thumbnail {
1283 img.user_thumbnail_tiny {
1290 /* Rules for geo microformats */
1293 border-bottom: none;
1296 /* General styles for action lists / subnavs */
1299 nav.secondary-actions {
1304 flex-direction: row;
1312 border-left: 1px solid $grey;
1313 padding-left: $lineheight/2;
1314 margin-right: $lineheight/2;
1315 margin-bottom: $lineheight/8;
1320 div.secondary-actions {
1325 /* Create a single-line dl */
1329 display: inline-block;
1336 /* Rules for OpenID logo */
1339 vertical-align: text-bottom;
1343 /* Rules for rich text */
1348 background: $lightgrey;
1353 background: $lightgrey;
1355 white-space: pre-wrap;
1363 padding: $lineheight;
1364 background-color: $offwhite;
1371 border-left: $lineheight solid $offwhite;
1372 padding-left: $lineheight;
1378 /* Rules for the user notes list */
1382 background-color: $offwhite;
1386 /* Rules for the iD editor */
1393 /* Rules for the "Welcome" page */
1394 .site-welcome, .site-fixthemap {
1396 background-image: image-url("welcome-sprite.png");
1397 background-size: 500px 250px;
1407 /* no-r2 */ background-position: -50px 0;
1412 vertical-align: middle;
1416 /* no-r2 */ background-position: -100px 0;
1420 /* no-r2 */ background-position: -150px 0;
1424 /* no-r2 */ background-position: -200px 0;
1428 /* no-r2 */ background-position: -250px 0;
1432 /* no-r2 */ background-position: -300px 0;
1436 /* no-r2 */ background-position: -350px 0;
1440 background-color: #333;
1445 .site-about #content {
1446 background-color: $lightgrey;
1457 color: $vibrant-green;
1463 background-position: 0 50%;
1464 background-repeat: no-repeat;
1465 background-image: image-url('about/osm.png');
1466 background-size: cover;
1467 background-color: $vibrant-green;
1471 background: $vibrant-green;
1475 display: inline-block;
1484 background: 40px 40px image-url('about/sprite.png') no-repeat;
1488 background-position: 0px 0px;
1492 background-position: 0px -40px;
1496 background-position: 0px -80px;
1500 background-position: 0px -120px;
1504 background-position: 0px -160px;
1508 background-position: -45px -160px;