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;
307 .user-menu, .login-menu {
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-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 {
461 width: $sidebarWidth;
465 background-color: rgba(255, 255, 255, 0.5);
482 .leaflet-marker-draggable {
497 border-bottom: 1px solid $grey;
503 @include media-breakpoint-down(md) {
545 border: 2px solid #fff;
548 transition: border-color 0.08s ease-in;
555 border-bottom-right-radius: 3px;
559 text-stroke: 2px #fff;
560 background: rgba(255,255,255,.9);
562 input[type="radio"] {
567 &.active { border-color: darken($green, 10%); }
570 &.active { border-color: darken($green, 20%); }
580 li.disabled { color: $darkgrey; }
589 font-family: monospace;
607 top: $lineheight/2 !important;
609 margin-right: 0px !important;
610 margin-top: 0px !important;
614 .leaflet-popup-scrolled {
615 padding-right: $lineheight;
616 border-bottom: 0px !important;
617 border-top: 0px !important;
620 .leaflet-popup-content-wrapper {
621 border-radius: 4px !important;
624 /* Rules for attribution text under the main map shown on printouts */
630 .donate-attr { color: darken($green, 10%) !important; }
632 /* Rules for the sidebar */
636 padding: $lineheight/2 $lineheight;
637 // background: $offwhite;
638 // border-bottom: 1px solid $grey;
653 /* Temporary label size override until we remove site-wide font customisation */
661 /* Stop bootstrap 5 from floating legends when they don't need to be */
666 /* Override the text colour for primary and secondary buttons, to match our
667 bootstrap 4 colours. Note this has accessibility issues, which is why
668 bootstrap 5 calculates black as the appropriate colour, and we should
669 reconsider our colours at some point with that in mind. */
672 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
676 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
679 .btn-outline-secondary {
680 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
683 /* Rules for the search and direction forms */
685 header .search_forms,
690 /* Rules for the map key which appears in the popout sidebar */
693 .mapkey-table-key img {
700 /* Rules for search sidebar */
702 #sidebar .search_results_entry {
705 &.selected { background: $list-highlight; }
708 .search_more .loader {
713 .search_results_error {
718 /* Rules for routing */
721 background-image: image-url('routing-sprite.png');
724 background-repeat: no-repeat;
726 @for $i from 0 through 25 {
727 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
730 td.instruction, td.distance {
731 padding-top: $lineheight/5;
732 padding-bottom: $lineheight/5;
733 border-bottom: 1px solid $grey;
744 background: $list-highlight;
747 .routing_marker { width: 15px; cursor: move; }
753 /* Rules for the history sidebar */
755 #sidebar .changesets {
757 &.selected { background: $list-highlight; }
758 /* color is derived from changeset bbox fillColor in history.js */
760 a.stretched-link > span, a:not(.stretched-link), [title] {
762 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
774 .changeset_more .loader {
780 /* Rules for the browse sidebar */
784 padding-bottom: $spacer;
785 margin-bottom: $spacer;
786 border-bottom: 1px solid $grey;
789 word-wrap: break-word;
793 .browse-section:last-of-type {
798 background-color: $offwhite;
800 border-collapse: separate;
803 margin-bottom: $spacer;
806 border-bottom: 1px solid $grey;
809 tr:last-child th, tr:last-child td {
817 word-wrap: break-word;
818 white-space: pre-wrap;
823 background-color: $offwhite;
827 border-left: 1px solid $grey;
828 background-color: #fff;
831 .colour-preview-box {
836 border: 1px solid rgba(0, 0, 0, .1);
837 // add color via inline css on element: background-color: <tag value>;
841 .note-comments li, .changeset-comments li {
842 margin: $lineheight/2 0;
845 margin: 10px 6px 0 6px;
850 .subscribe-buttons input {
856 span.action-button:hover {
858 text-decoration: underline;
863 margin: 0 0 10px 10px;
876 background: $list-highlight;
883 /* Bootstrap buttons don't have any vertical margin, so
884 they touch when adjacent buttons wrap onto a new line
885 e.g. wide form buttons on a narrow sidebar */
889 margin-bottom: $spacer * 0.25;
893 /* Rules for export sidebar */
901 .export_area_inputs {
902 margin-bottom: $spacer;
910 background: $lightgrey;
912 #maxlat { margin-top: -1px; }
915 /* no-r2 */ margin-left: -1px;
919 /* no-r2 */ margin-right: -1px;
921 #minlat { margin-bottom: -1px; }
925 margin: $lineheight/4;
929 padding-left: $lineheight/2;
937 /* Rules for edit pages */
953 /* Rules for non-map content pages */
956 background: $lightgrey;
963 padding: $lineheight;
966 /* Overrides for pages that use new layout conventions */
968 .header-illustration {
969 background-position: 0 0;
970 background-repeat: no-repeat;
978 background-image: image-url("sign-up-illustration.png");
982 background-image: image-url("confirm-illustration.png");
986 background-image: image-url("terms-illustration.png");
994 background-image: image-url("sign-up-illustration-arm.png");
997 pointer-events: none;
1001 [dir=rtl] .header-illustration {
1002 transform: scaleX(-1);
1005 transform: scaleX(-1);
1009 #content.maximised {
1018 /* Rules for small maps in content areas */
1022 margin-bottom: $lineheight;
1025 @include media-breakpoint-up(md) {
1031 /* Rules for the user map */
1033 .content_map .leaflet-popup-content {
1034 margin: $lineheight/2;
1038 /* Rules for user popups on maps */
1049 /* Rules for the user list */
1055 /* Rules for the diary entry page */
1066 border-top: 1px dashed $grey;
1068 border-top: 1px solid $grey;
1071 margin-bottom: $lineheight/2;
1076 /* Rules for the log in page */
1078 #login_auth_buttons {
1083 padding: $lineheight/4 $lineheight/2;
1087 /* Rules for the account confirmation page */
1091 padding: $lineheight;
1092 margin-bottom: $lineheight;
1097 list-style: inherit;
1101 list-style-type: lower-alpha;
1106 /* Rules for the oauth authorization page */
1108 .oauth-authorize ul {
1112 /* Rules for messages pages */
1116 background: $offwhite;
1120 background: #CBEEA7;
1125 background-color: $lightgrey;
1127 .describe_location {
1136 background-color: $lightgrey;
1139 /* Rules for user images */
1146 img.user_thumbnail {
1151 img.user_thumbnail_tiny {
1158 /* General styles for action lists / subnavs */
1160 nav.secondary-actions {
1165 flex-direction: row;
1173 border-left: 1px solid $grey;
1174 padding-left: $lineheight/2;
1175 margin-right: $lineheight/2;
1176 margin-bottom: $lineheight/8;
1181 div.secondary-actions {
1186 /* Rules for rich text */
1191 background: $lightgrey;
1196 background: $lightgrey;
1198 white-space: pre-wrap;
1206 padding: $lineheight;
1207 background-color: $offwhite;
1214 border-left: $lineheight solid $offwhite;
1215 padding-left: $lineheight;
1221 /* Rules for the user notes list */
1225 background-color: $offwhite;
1229 /* Rules for the iD editor */
1236 /* Rules for the "Welcome" page */
1237 .site-welcome, .site-fixthemap {
1239 background-image: image-url("welcome-sprite.png");
1240 background-size: 500px 250px;
1250 /* no-r2 */ background-position: -50px 0;
1255 vertical-align: middle;
1259 /* no-r2 */ background-position: -100px 0;
1263 /* no-r2 */ background-position: -150px 0;
1267 /* no-r2 */ background-position: -200px 0;
1271 /* no-r2 */ background-position: -250px 0;
1275 /* no-r2 */ background-position: -300px 0;
1279 /* no-r2 */ background-position: -350px 0;
1283 background-color: #333;
1288 .site-about #content {
1289 background-color: $lightgrey;
1300 color: $vibrant-green;
1306 background-position: 0 50%;
1307 background-repeat: no-repeat;
1308 background-image: image-url('about/osm.png');
1309 background-size: cover;
1310 background-color: $vibrant-green;
1314 background: $vibrant-green;
1318 display: inline-block;
1327 background: 40px 40px image-url('about/sprite.png') no-repeat;
1331 background-position: 0px 0px;
1335 background-position: 0px -40px;
1339 background-position: 0px -80px;
1343 background-position: 0px -120px;
1347 background-position: 0px -160px;
1351 background-position: -45px -160px;