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;
428 .overlay-sidebar #sidebar {
465 width: $sidebarWidth;
481 .leaflet-marker-draggable {
496 border-bottom: 1px solid $grey;
502 @include media-breakpoint-down(md) {
551 border: 2px solid #fff;
554 transition: border-color 0.08s ease-in;
561 border-bottom-right-radius: 3px;
565 text-stroke: 2px #fff;
566 background: rgba(255,255,255,.9);
568 input[type="radio"] {
573 &.active { border-color: darken($green, 10%); }
576 &.active { border-color: darken($green, 20%); }
586 li.disabled { color: $darkgrey; }
599 font-family: monospace;
621 top: $lineheight/2 !important;
623 margin-right: 0px !important;
624 margin-top: 0px !important;
628 .leaflet-popup-scrolled {
629 padding-right: $lineheight;
630 border-bottom: 0px !important;
631 border-top: 0px !important;
634 .leaflet-popup-content-wrapper {
635 border-radius: 4px !important;
638 /* Rules for attribution text under the main map shown on printouts */
648 .attribution_license,
649 .attribution_project {
653 .attribution_notice {
657 .donate-attr { color: darken($green, 10%) !important; }
659 /* Rules for the sidebar */
663 padding: $lineheight/2 $lineheight;
664 // background: $offwhite;
665 // border-bottom: 1px solid $grey;
680 /* Temporary label size override until we remove site-wide font customisation */
688 /* Stop bootstrap 5 from floating legends when they don't need to be */
693 /* Override the text colour for primary and secondary buttons, to match our
694 bootstrap 4 colours. Note this has accessibility issues, which is why
695 bootstrap 5 calculates black as the appropriate colour, and we should
696 reconsider our colours at some point with that in mind. */
699 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
703 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
706 .btn-outline-secondary {
707 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
710 /* Rules for the search and direction forms */
712 header .search_forms,
717 /* Rules for the map key which appears in the popout sidebar */
720 .mapkey-table-key img {
727 /* Rules for search sidebar */
729 #sidebar .search_results_entry {
732 &.selected { background: $list-highlight; }
735 .search_more .loader {
740 .search_results_error {
745 /* Rules for routing */
748 background-image: image-url('routing-sprite.png');
751 background-repeat: no-repeat;
753 @for $i from 0 through 25 {
754 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
757 td.instruction, td.distance {
758 padding-top: $lineheight/5;
759 padding-bottom: $lineheight/5;
760 border-bottom: 1px solid $grey;
771 background: $list-highlight;
774 .routing_marker { width: 15px; cursor: move; }
780 /* Rules for the history sidebar */
782 #sidebar .changesets {
784 &.selected { background: $list-highlight; }
785 /* color is derived from changeset bbox fillColor in history.js */
787 a.stretched-link > span, a:not(.stretched-link), [title] {
789 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
801 .changeset_more .loader {
807 /* Rules for the browse sidebar */
811 padding-bottom: $spacer;
812 margin-bottom: $spacer;
813 border-bottom: 1px solid $grey;
816 word-wrap: break-word;
820 .browse-section:last-of-type {
825 background-color: $offwhite;
827 border-collapse: separate;
830 margin-bottom: $spacer;
833 border-bottom: 1px solid $grey;
836 tr:last-child th, tr:last-child td {
844 word-wrap: break-word;
845 white-space: pre-wrap;
850 background-color: $offwhite;
854 border-left: 1px solid $grey;
855 background-color: #fff;
858 .colour-preview-box {
863 border: 1px solid rgba(0, 0, 0, .1);
864 // add color via inline css on element: background-color: <tag value>;
868 .note-comments li, .changeset-comments li {
869 margin: $lineheight/2 0;
872 margin: 10px 6px 0 6px;
877 .subscribe-buttons input {
883 span.action-button:hover {
885 text-decoration: underline;
890 margin: 0 0 10px 10px;
903 background: $list-highlight;
910 /* Bootstrap buttons don't have any vertical margin, so
911 they touch when adjacent buttons wrap onto a new line
912 e.g. wide form buttons on a narrow sidebar */
916 margin-bottom: $spacer * 0.25;
920 /* Rules for export sidebar */
928 .export_area_inputs {
929 margin-bottom: $spacer;
937 background: $lightgrey;
939 #maxlat { margin-top: -1px; }
942 /* no-r2 */ margin-left: -1px;
946 /* no-r2 */ margin-right: -1px;
948 #minlat { margin-bottom: -1px; }
952 margin: $lineheight/4;
956 padding-left: $lineheight/2;
964 /* Rules for edit pages */
980 /* Rules for non-map content pages */
983 background: $lightgrey;
990 padding: $lineheight;
993 /* Overrides for pages that use new layout conventions */
995 .header-illustration {
996 background-position: 0 0;
997 background-repeat: no-repeat;
1005 background-image: image-url("sign-up-illustration.png");
1009 background-image: image-url("confirm-illustration.png");
1013 background-image: image-url("terms-illustration.png");
1021 background-image: image-url("sign-up-illustration-arm.png");
1024 pointer-events: none;
1028 [dir=rtl] .header-illustration {
1029 transform: scaleX(-1);
1032 transform: scaleX(-1);
1036 #content.maximised {
1045 /* Rules for small maps in content areas */
1049 margin-bottom: $lineheight;
1052 @include media-breakpoint-up(md) {
1058 /* Rules for the user map */
1060 .content_map .leaflet-popup-content {
1061 margin: $lineheight/2;
1065 /* Rules for user popups on maps */
1076 /* Rules for the user list */
1082 /* Rules for the diary list page */
1086 padding-top: $lineheight;
1087 padding-bottom: $lineheight/2;
1088 border-top: 1px solid $grey;
1091 background-color: #fee;
1095 /* Rules for the diary entry page */
1101 margin-bottom: $lineheight;
1107 border-top: 1px dashed $grey;
1108 padding-top: $lineheight/2;
1109 padding-bottom: $lineheight/2;
1111 margin-top: $lineheight/2;
1112 padding-top: $lineheight;
1113 border-top: 1px solid $grey;
1116 background-color: #fee;
1119 margin-bottom: $lineheight/2;
1128 /* Rules for the log in page */
1130 #login_auth_buttons {
1135 padding: $lineheight/4 $lineheight/2;
1139 /* Rules for the account confirmation page */
1143 padding: $lineheight;
1144 margin-bottom: $lineheight;
1149 list-style: inherit;
1153 list-style-type: lower-alpha;
1158 /* Rules for the account settings page */
1160 #accountForm .user_image {
1164 #accountForm #user_image {
1168 #accountForm ul.accountImage-options {
1181 display: inline !important;
1184 /* Rules for the oauth authorization page */
1186 .oauth-authorize ul {
1190 /* Rules for messages pages */
1193 button[type="submit"] {
1195 white-space: nowrap;
1199 background: $offwhite;
1203 background: #CBEEA7;
1211 .inbox-row .inbox-mark-read {
1216 margin-bottom: $lineheight;
1217 padding: $lineheight/4 0px 4px 0px;
1218 border-bottom: 1px solid $grey;
1225 .info-line .user_thumbnail_tiny {
1226 vertical-align: middle;
1230 white-space: nowrap;
1239 .inbox-row-unread .inbox-mark-unread {
1243 /* Rules for highlighting fields with rails validation errors */
1246 display: inline-block;
1252 background-color: #ff7070;
1255 /* Rules for rails validation error boxes */
1259 border: 2px solid #ff7070;
1260 padding: 0 $lineheight/2;
1261 margin-bottom: $lineheight;
1262 background-color: #f0f0f0;
1265 margin: 0 -10px 10px -10px;
1266 padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1269 background-color: #c00;
1277 padding: $lineheight/4;
1282 background-color: $lightgrey;
1284 .describe_location {
1293 background-color: $lightgrey;
1296 /* Rules for user images */
1303 img.user_thumbnail {
1308 img.user_thumbnail_tiny {
1315 /* Rules for geo microformats */
1318 border-bottom: none;
1321 /* General styles for action lists / subnavs */
1324 nav.secondary-actions {
1329 flex-direction: row;
1337 border-left: 1px solid $grey;
1338 padding-left: $lineheight/2;
1339 margin-right: $lineheight/2;
1340 margin-bottom: $lineheight/8;
1345 div.secondary-actions {
1350 /* Create a single-line dl */
1354 display: inline-block;
1361 /* Rules for OpenID logo */
1364 vertical-align: text-bottom;
1368 /* Rules for rich text */
1373 background: $lightgrey;
1378 background: $lightgrey;
1380 white-space: pre-wrap;
1388 padding: $lineheight;
1389 background-color: $offwhite;
1396 border-left: $lineheight solid $offwhite;
1397 padding-left: $lineheight;
1403 /* Rules for the user notes list */
1407 background-color: $offwhite;
1411 /* Rules for the iD editor */
1418 /* Rules for the "Welcome" page */
1419 .site-welcome, .site-fixthemap {
1421 background-image: image-url("welcome-sprite.png");
1422 background-size: 500px 250px;
1432 /* no-r2 */ background-position: -50px 0;
1437 vertical-align: middle;
1441 /* no-r2 */ background-position: -100px 0;
1445 /* no-r2 */ background-position: -150px 0;
1449 /* no-r2 */ background-position: -200px 0;
1453 /* no-r2 */ background-position: -250px 0;
1457 /* no-r2 */ background-position: -300px 0;
1461 /* no-r2 */ background-position: -350px 0;
1465 background-color: #333;
1470 .site-about #content {
1471 background-color: $lightgrey;
1482 color: $vibrant-green;
1488 background-position: 0 50%;
1489 background-repeat: no-repeat;
1490 background-image: image-url('about/osm.png');
1491 background-size: cover;
1492 background-color: $vibrant-green;
1496 background: $vibrant-green;
1500 display: inline-block;
1509 background: 40px 40px image-url('about/sprite.png') no-repeat;
1513 background-position: 0px 0px;
1517 background-position: 0px -40px;
1521 background-position: 0px -80px;
1525 background-position: 0px -120px;
1529 background-position: 0px -160px;
1533 background-position: -45px -160px;