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) {
554 border: 2px solid #fff;
557 transition: border-color 0.08s ease-in;
564 border-bottom-right-radius: 3px;
568 text-stroke: 2px #fff;
569 background: rgba(255,255,255,.9);
571 input[type="radio"] {
576 &.active { border-color: darken($green, 10%); }
579 &.active { border-color: darken($green, 20%); }
589 li.disabled { color: $darkgrey; }
602 font-family: monospace;
624 top: $lineheight/2 !important;
626 margin-right: 0px !important;
627 margin-top: 0px !important;
631 .leaflet-popup-scrolled {
632 padding-right: $lineheight;
633 border-bottom: 0px !important;
634 border-top: 0px !important;
637 .leaflet-popup-content-wrapper {
638 border-radius: 4px !important;
641 /* Rules for attribution text under the main map shown on printouts */
651 .attribution_license,
652 .attribution_project {
656 .attribution_notice {
660 .donate-attr { color: darken($green, 10%) !important; }
662 /* Rules for the sidebar */
666 padding: $lineheight/2 $lineheight;
667 // background: $offwhite;
668 // border-bottom: 1px solid $grey;
683 /* Temporary label size override until we remove site-wide font customisation */
691 /* Stop bootstrap 5 from floating legends when they don't need to be */
696 /* Override the text colour for primary and secondary buttons, to match our
697 bootstrap 4 colours. Note this has accessibility issues, which is why
698 bootstrap 5 calculates black as the appropriate colour, and we should
699 reconsider our colours at some point with that in mind. */
702 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
706 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
709 .btn-outline-secondary {
710 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
713 /* Rules for the search and direction forms */
715 header .search_forms,
720 /* Rules for the map key which appears in the popout sidebar */
723 .mapkey-table-key img {
730 /* Rules for search sidebar */
732 #sidebar .search_results_entry {
735 &.selected { background: $list-highlight; }
738 .search_more .loader {
743 .search_results_error {
748 /* Rules for routing */
751 background-image: image-url('routing-sprite.png');
754 background-repeat: no-repeat;
756 @for $i from 0 through 25 {
757 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
760 td.instruction, td.distance {
761 padding-top: $lineheight/5;
762 padding-bottom: $lineheight/5;
763 border-bottom: 1px solid $grey;
774 background: $list-highlight;
777 .routing_marker { width: 15px; cursor: move; }
783 /* Rules for the history sidebar */
785 #sidebar .changesets {
787 &.selected { background: $list-highlight; }
788 /* color is derived from changeset bbox fillColor in history.js */
790 a.stretched-link > span, a:not(.stretched-link), [title] {
792 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
804 .changeset_more .loader {
810 /* Rules for the browse sidebar */
814 padding-bottom: $spacer;
815 margin-bottom: $spacer;
816 border-bottom: 1px solid $grey;
819 word-wrap: break-word;
823 .browse-section:last-of-type {
828 background-color: $offwhite;
830 border-collapse: separate;
833 margin-bottom: $spacer;
836 border-bottom: 1px solid $grey;
839 tr:last-child th, tr:last-child td {
847 word-wrap: break-word;
848 white-space: pre-wrap;
853 background-color: $offwhite;
857 border-left: 1px solid $grey;
858 background-color: #fff;
861 .colour-preview-box {
866 border: 1px solid rgba(0, 0, 0, .1);
867 // add color via inline css on element: background-color: <tag value>;
871 .note-comments li, .changeset-comments li {
872 margin: $lineheight/2 0;
875 margin: 10px 6px 0 6px;
880 .subscribe-buttons input {
886 span.action-button:hover {
888 text-decoration: underline;
893 margin: 0 0 10px 10px;
906 background: $list-highlight;
913 /* Bootstrap buttons don't have any vertical margin, so
914 they touch when adjacent buttons wrap onto a new line
915 e.g. wide form buttons on a narrow sidebar */
919 margin-bottom: $spacer * 0.25;
923 /* Rules for export sidebar */
931 .export_area_inputs {
932 margin-bottom: $spacer;
940 background: $lightgrey;
942 #maxlat { margin-top: -1px; }
945 /* no-r2 */ margin-left: -1px;
949 /* no-r2 */ margin-right: -1px;
951 #minlat { margin-bottom: -1px; }
955 margin: $lineheight/4;
959 padding-left: $lineheight/2;
967 /* Rules for edit pages */
983 /* Rules for non-map content pages */
986 background: $lightgrey;
993 padding: $lineheight;
996 /* Overrides for pages that use new layout conventions */
998 .header-illustration {
999 background-position: 0 0;
1000 background-repeat: no-repeat;
1008 background-image: image-url("sign-up-illustration.png");
1012 background-image: image-url("confirm-illustration.png");
1016 background-image: image-url("terms-illustration.png");
1024 background-image: image-url("sign-up-illustration-arm.png");
1027 pointer-events: none;
1031 [dir=rtl] .header-illustration {
1032 transform: scaleX(-1);
1035 transform: scaleX(-1);
1039 #content.maximised {
1048 /* Rules for small maps in content areas */
1052 margin-bottom: $lineheight;
1055 @include media-breakpoint-up(md) {
1061 /* Rules for the user map */
1063 .content_map .leaflet-popup-content {
1064 margin: $lineheight/2;
1068 /* Rules for user popups on maps */
1079 /* Rules for the user list */
1085 /* Rules for the diary list page */
1089 padding-top: $lineheight;
1090 padding-bottom: $lineheight/2;
1091 border-top: 1px solid $grey;
1094 background-color: #fee;
1098 /* Rules for the diary entry page */
1104 margin-bottom: $lineheight;
1110 border-top: 1px dashed $grey;
1111 padding-top: $lineheight/2;
1112 padding-bottom: $lineheight/2;
1114 margin-top: $lineheight/2;
1115 padding-top: $lineheight;
1116 border-top: 1px solid $grey;
1119 background-color: #fee;
1122 margin-bottom: $lineheight/2;
1131 /* Rules for the log in page */
1133 #login_auth_buttons {
1138 padding: $lineheight/4 $lineheight/2;
1142 /* Rules for the account confirmation page */
1146 padding: $lineheight;
1147 margin-bottom: $lineheight;
1152 list-style: inherit;
1156 list-style-type: lower-alpha;
1161 /* Rules for the account settings page */
1163 #accountForm .user_image {
1167 #accountForm #user_image {
1171 #accountForm ul.accountImage-options {
1184 display: inline !important;
1187 /* Rules for the oauth authorization page */
1189 .oauth-authorize ul {
1193 /* Rules for messages pages */
1196 button[type="submit"] {
1198 white-space: nowrap;
1202 background: $offwhite;
1206 background: #CBEEA7;
1214 .inbox-row .inbox-mark-read {
1219 margin-bottom: $lineheight;
1220 padding: $lineheight/4 0px 4px 0px;
1221 border-bottom: 1px solid $grey;
1228 .info-line .user_thumbnail_tiny {
1229 vertical-align: middle;
1233 white-space: nowrap;
1242 .inbox-row-unread .inbox-mark-unread {
1246 /* Rules for highlighting fields with rails validation errors */
1249 display: inline-block;
1255 background-color: #ff7070;
1258 /* Rules for rails validation error boxes */
1262 border: 2px solid #ff7070;
1263 padding: 0 $lineheight/2;
1264 margin-bottom: $lineheight;
1265 background-color: #f0f0f0;
1268 margin: 0 -10px 10px -10px;
1269 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1272 background-color: #c00;
1280 padding: $lineheight/4;
1285 background-color: $lightgrey;
1287 .describe_location {
1296 background-color: $lightgrey;
1299 /* Rules for user images */
1306 img.user_thumbnail {
1311 img.user_thumbnail_tiny {
1318 /* Rules for geo microformats */
1321 border-bottom: none;
1324 /* General styles for action lists / subnavs */
1327 nav.secondary-actions {
1332 flex-direction: row;
1340 border-left: 1px solid $grey;
1341 padding-left: $lineheight/2;
1342 margin-right: $lineheight/2;
1343 margin-bottom: $lineheight/8;
1348 div.secondary-actions {
1353 /* Create a single-line dl */
1357 display: inline-block;
1364 /* Rules for OpenID logo */
1367 vertical-align: text-bottom;
1371 /* Rules for rich text */
1376 background: $lightgrey;
1381 background: $lightgrey;
1383 white-space: pre-wrap;
1391 padding: $lineheight;
1392 background-color: $offwhite;
1399 border-left: $lineheight solid $offwhite;
1400 padding-left: $lineheight;
1406 /* Rules for the user notes list */
1410 background-color: $offwhite;
1414 /* Rules for the iD editor */
1421 /* Rules for the "Welcome" page */
1422 .site-welcome, .site-fixthemap {
1424 background-image: image-url("welcome-sprite.png");
1425 background-size: 500px 250px;
1435 /* no-r2 */ background-position: -50px 0;
1440 vertical-align: middle;
1444 /* no-r2 */ background-position: -100px 0;
1448 /* no-r2 */ background-position: -150px 0;
1452 /* no-r2 */ background-position: -200px 0;
1456 /* no-r2 */ background-position: -250px 0;
1460 /* no-r2 */ background-position: -300px 0;
1464 /* no-r2 */ background-position: -350px 0;
1468 background-color: #333;
1473 .site-about #content {
1474 background-color: $lightgrey;
1485 color: $vibrant-green;
1491 background-position: 0 50%;
1492 background-repeat: no-repeat;
1493 background-image: image-url('about/osm.png');
1494 background-size: cover;
1495 background-color: $vibrant-green;
1499 background: $vibrant-green;
1503 display: inline-block;
1512 background: 40px 40px image-url('about/sprite.png') no-repeat;
1516 background-position: 0px 0px;
1520 background-position: 0px -40px;
1524 background-position: 0px -80px;
1528 background-position: 0px -120px;
1532 background-position: 0px -160px;
1536 background-position: -45px -160px;