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);
361 border-radius: 4px 0 0 4px;
367 background-color: black;
372 background-color: #333;
373 background-color: rgba(0,0,0,.5);
378 background-color: $vibrant-green;
386 .leaflet-control .zoomin,
387 .control-layers .control-button {
389 border-radius: 4px 0 0 0;
392 .leaflet-control .zoomout,
393 .control-key .control-button {
398 .control-locate .control-button,
399 .control-share .control-button {
400 border-radius: 0 0 0 4px;
403 /* Rules for the sidebar and main map area */
423 width: $sidebarWidth;
442 .overlay-sidebar #sidebar {
479 width: $sidebarWidth;
495 .leaflet-marker-draggable {
510 border-bottom: 1px solid $grey;
516 @include media-breakpoint-down(md) {
565 border: 2px solid #fff;
568 transition: border-color 0.08s ease-in;
575 border-bottom-right-radius: 3px;
579 text-stroke: 2px #fff;
580 background: rgba(255,255,255,.9);
582 input[type="radio"] {
587 &.active { border-color: darken($green, 10%); }
590 &.active { border-color: darken($green, 20%); }
600 li.disabled { color: $darkgrey; }
610 text-decoration: none;
611 background-color: $lightblue;
613 border-right: 1px solid #fff;
617 border-right: 1px solid #fff;
618 border-radius: 4px 0 0 4px;
622 border-radius: 0 4px 4px 0;
626 background-color: $blue;
638 font-family: monospace;
660 top: $lineheight/2 !important;
662 margin-right: 0px !important;
663 margin-top: 0px !important;
667 .leaflet-popup-scrolled {
668 padding-right: $lineheight;
669 border-bottom: 0px !important;
670 border-top: 0px !important;
673 .leaflet-popup-content-wrapper {
674 border-radius: 4px !important;
677 /* Rules for attribution text under the main map shown on printouts */
687 .attribution_license,
688 .attribution_project {
692 .attribution_notice {
696 .donate-attr { color: darken($green, 10%) !important; }
698 /* Rules for the sidebar */
702 padding: $lineheight/2 $lineheight;
703 // background: $offwhite;
704 // border-bottom: 1px solid $grey;
723 margin: $lineheight auto;
734 /* Temporary label size override until we remove site-wide font customisation */
742 /* Stop bootstrap 5 from floating legends when they don't need to be */
747 /* Override the text colour for primary and secondary buttons, to match our
748 bootstrap 4 colours. Note this has accessibility issues, which is why
749 bootstrap 5 calculates black as the appropriate colour, and we should
750 reconsider our colours at some point with that in mind. */
753 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
757 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
760 .btn-outline-secondary {
761 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
764 /* Rules for the search and direction forms */
766 header .search_forms,
771 /* Rules for the map key which appears in the popout sidebar */
774 .mapkey-table-key img {
781 /* Rules for search sidebar */
783 #sidebar .search_results_entry {
786 &.selected { background: $list-highlight; }
789 .search_more .loader {
795 .search_results_error {
800 /* Rules for routing */
803 background-image: image-url('routing-sprite.png');
806 background-repeat: no-repeat;
808 @for $i from 0 through 25 {
809 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
812 td.instruction, td.distance {
813 padding-top: $lineheight/5;
814 padding-bottom: $lineheight/5;
815 border-bottom: 1px solid $grey;
826 background: $list-highlight;
829 .routing_marker { width: 15px; cursor: move; }
831 /* Rules for entity history */
836 border-bottom: $keyline;
844 /* Rules for the history sidebar */
846 #sidebar .changesets {
848 &.selected { background: $list-highlight; }
849 /* color is derived from changeset bbox fillColor in history.js */
851 a.stretched-link > span, a:not(.stretched-link), [title] {
853 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
865 .changeset_more .loader {
871 /* Rules for the browse sidebar */
875 padding-bottom: $spacer;
876 margin-bottom: $spacer;
877 border-bottom: 1px solid $grey;
880 word-wrap: break-word;
884 .browse-section:last-of-type {
889 background-color: $offwhite;
891 border-collapse: separate;
894 margin-bottom: $spacer;
897 border-bottom: 1px solid $grey;
900 tr:last-child th, tr:last-child td {
908 word-wrap: break-word;
909 white-space: pre-wrap;
914 background-color: $offwhite;
918 border-left: 1px solid $grey;
919 background-color: #fff;
922 .colour-preview-box {
927 border: 1px solid rgba(0, 0, 0, .1);
928 // add color via inline css on element: background-color: <tag value>;
932 .note-comments li, .changeset-comments li {
933 margin: $lineheight/2 0;
936 margin: 10px 6px 0 6px;
941 .subscribe-buttons input {
947 span.action-button:hover {
949 text-decoration: underline;
954 margin: 0 0 10px 10px;
967 background: $list-highlight;
974 /* Bootstrap buttons don't have any vertical margin, so
975 they touch when adjacent buttons wrap onto a new line
976 e.g. wide form buttons on a narrow sidebar */
980 margin-bottom: $spacer * 0.25;
984 /* Rules for export sidebar */
992 .export_area_inputs {
993 margin-bottom: $spacer;
1001 background: $lightgrey;
1003 #maxlat { margin-top: -1px; }
1006 /* no-r2 */ margin-left: -1px;
1010 /* no-r2 */ margin-right: -1px;
1012 #minlat { margin-bottom: -1px; }
1016 margin: $lineheight/4;
1020 padding-left: $lineheight/2;
1023 margin-bottom: 10px;
1028 /* Rules for edit pages */
1044 /* Rules for non-map content pages */
1047 background: $lightgrey;
1054 padding: $lineheight;
1057 /* Overrides for pages that use new layout conventions */
1059 .header-illustration {
1060 background-position: 0 0;
1061 background-repeat: no-repeat;
1069 background-image: image-url("sign-up-illustration.png");
1073 background-image: image-url("confirm-illustration.png");
1077 background-image: image-url("terms-illustration.png");
1085 background-image: image-url("sign-up-illustration-arm.png");
1088 pointer-events: none;
1092 [dir=rtl] .header-illustration {
1093 transform: scaleX(-1);
1096 #content.maximised {
1105 /* Rules for small maps in content areas */
1109 margin-bottom: $lineheight;
1112 @include media-breakpoint-up(md) {
1118 /* Rules for the user map */
1120 .content_map .leaflet-popup-content {
1121 margin: $lineheight/2;
1125 /* Rules for user popups on maps */
1131 margin-top: 0 0 0 60px;
1136 /* Rules for the user list */
1142 /* Rules for the diary list page */
1146 padding-top: $lineheight;
1147 padding-bottom: $lineheight/2;
1148 border-top: 1px solid $grey;
1151 background-color: #fee;
1155 /* Rules for the diary entry page */
1161 margin-bottom: $lineheight;
1167 border-top: 1px dashed $grey;
1168 padding-top: $lineheight/2;
1169 padding-bottom: $lineheight/2;
1171 margin-top: $lineheight/2;
1172 padding-top: $lineheight;
1173 border-top: 1px solid $grey;
1176 background-color: #fee;
1179 margin-bottom: $lineheight/2;
1188 /* Rules for the log in page */
1190 #login_auth_buttons {
1195 padding: $lineheight/4 $lineheight/2;
1199 /* Rules for the account confirmation page */
1203 padding: $lineheight;
1204 margin-bottom: $lineheight;
1209 list-style: inherit;
1213 list-style-type: lower-alpha;
1218 /* Rules for the account settings page */
1220 #accountForm .user_image {
1224 #accountForm #user_image {
1228 #accountForm ul.accountImage-options {
1241 display: inline !important;
1244 /* Rules for the oauth authorization page */
1246 .oauth-authorize ul {
1250 /* Rules for messages pages */
1253 button[type="submit"] {
1255 white-space: nowrap;
1259 background: $offwhite;
1263 background: #CBEEA7;
1271 .inbox-row .inbox-mark-read {
1276 margin-bottom: $lineheight;
1277 padding: $lineheight/4 0px 4px 0px;
1278 border-bottom: 1px solid $grey;
1285 .info-line .user_thumbnail_tiny {
1286 vertical-align: middle;
1290 white-space: nowrap;
1299 .inbox-row-unread .inbox-mark-unread {
1303 /* Rules for "flash" notice boxes shown at the top of the content area */
1307 background-color: #ff7070;
1311 background-color: #ffe0cc;
1315 background-color: #CBEEA7;
1319 /* Rules for highlighting fields with rails validation errors */
1322 display: inline-block;
1328 background-color: #ff7070;
1331 /* Rules for rails validation error boxes */
1335 border: 2px solid #ff7070;
1336 padding: 0 $lineheight/2;
1337 margin-bottom: $lineheight;
1338 background-color: #f0f0f0;
1341 margin: 0 -10px 10px -10px;
1342 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1345 background-color: #c00;
1353 padding: $lineheight/4;
1358 background-color: $lightgrey;
1360 .describe_location {
1369 background-color: $lightgrey;
1375 vertical-align: middle;
1380 /* Rules for user images */
1387 img.user_thumbnail {
1392 img.user_thumbnail_tiny {
1399 /* Rules for geo microformats */
1402 border-bottom: none;
1405 /* General styles for action lists / subnavs */
1408 nav.secondary-actions {
1413 flex-direction: row;
1421 border-left: 1px solid $grey;
1422 padding-left: $lineheight/2;
1423 margin-right: $lineheight/2;
1424 margin-bottom: $lineheight/8;
1429 div.secondary-actions {
1434 /* Create a single-line dl */
1438 display: inline-block;
1445 /* Rules for OpenID logo */
1448 vertical-align: text-bottom;
1452 /* Rules for rich text */
1457 background: $lightgrey;
1462 background: $lightgrey;
1464 white-space: pre-wrap;
1472 padding: $lineheight;
1473 background-color: $offwhite;
1480 border-left: $lineheight solid $offwhite;
1481 padding-left: $lineheight;
1487 /* Rules for the user notes list */
1491 background-color: $offwhite;
1495 /* Rules for the iD editor */
1502 /* Rules for the "Welcome" page */
1503 .site-welcome, .site-fixthemap {
1505 background-image: image-url("welcome-sprite.png");
1506 background-size: 500px 250px;
1516 /* no-r2 */ background-position: -50px 0;
1521 vertical-align: middle;
1525 /* no-r2 */ background-position: -100px 0;
1529 /* no-r2 */ background-position: -150px 0;
1533 /* no-r2 */ background-position: -200px 0;
1537 /* no-r2 */ background-position: -250px 0;
1541 /* no-r2 */ background-position: -300px 0;
1545 /* no-r2 */ background-position: -350px 0;
1549 background-color: #333;
1554 .site-about #content {
1555 background-color: $lightgrey;
1566 color: $vibrant-green;
1572 background-position: 0 50%;
1573 background-repeat: no-repeat;
1574 background-image: image-url('about/osm.png');
1575 background-size: cover;
1576 background-color: $vibrant-green;
1580 background: $vibrant-green;
1584 display: inline-block;
1593 background: 40px 40px image-url('about/sprite.png') no-repeat;
1597 background-position: 0px 0px;
1601 background-position: 0px -40px;
1605 background-position: 0px -80px;
1609 background-position: 0px -120px;
1613 background-position: 0px -160px;
1617 background-position: -45px -160px;