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 * 0.25;
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 * 0.5;
113 text-decoration: none;
120 vertical-align: middle;
146 & > .btn-group .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%);
190 .btn-outline-secondary {
191 @include button-outline-variant($darkgrey, $color-hover: $darkgrey, $active-background: white, $active-border: $darkgrey);
199 .btn-outline-secondary {
200 @include button-outline-variant($darkgrey, $color-hover: $white, $active-color: $white);
205 background-color: lighten($grey, 10%);
209 nav.primary, nav.secondary {
212 background-color: $green;
218 #compact-secondary-nav {
223 #compact-secondary-nav {
224 display: inline-block;
238 float: none !important;
246 min-height: $headerHeight;
258 #sidebar .search_forms,
274 border-top: 1px solid #eee;
276 border-bottom: 1px solid #eee;
294 .user-menu, .login-menu {
299 #compact-secondary-nav {
304 display: inline-block;
307 .overlay-sidebar #sidebar .welcome {
311 .overlay-sidebar #sidebar #banner {
316 /* Utility for styling notification numbers */
319 background: lighten($green, 30%);
321 font-weight: $font-weight-normal;
324 /* Rules for the message shown in place of the map when javascript is disabled */
332 /* Rules for Leaflet maps */
334 .leaflet-top.leaflet-right,
335 .leaflet-top.leaflet-left {
339 flex-direction: column;
340 flex-wrap: wrap-reverse;
343 .leaflet-control .control-button {
347 background-color: #333;
348 background-color: rgba(0,0,0,.6);
353 background-color: black;
358 background-color: #333;
359 background-color: rgba(0,0,0,.5);
364 background-color: $vibrant-green;
368 border-start-start-radius: 4px;
372 border-end-start-radius: 4px;
381 /* Rules for the sidebar and main map area */
401 width: $sidebarWidth;
417 .overlay-sidebar #sidebar {
450 width: $sidebarWidth;
454 background-color: rgba(255, 255, 255, 0.5);
471 .leaflet-marker-draggable {
486 border-bottom: 1px solid $grey;
492 @include media-breakpoint-down(md) {
534 border: 2px solid #fff;
537 transition: border-color 0.08s ease-in;
544 border-bottom-right-radius: 3px;
548 text-stroke: 2px #fff;
549 background: rgba(255,255,255,.9);
551 input[type="radio"] {
556 &.active { border-color: darken($green, 10%); }
559 &.active { border-color: darken($green, 20%); }
569 li.disabled { color: $darkgrey; }
580 top: 10px !important;
582 margin-right: 0px !important;
583 margin-top: 0px !important;
587 .leaflet-popup-scrolled {
588 padding-right: $lineheight;
589 border-bottom: 0px !important;
590 border-top: 0px !important;
593 .leaflet-popup-content-wrapper {
594 border-radius: 4px !important;
597 /* Rules for attribution text under the main map shown on printouts */
603 .donate-attr { color: darken($green, 10%) !important; }
605 /* Rules for the sidebar */
619 /* Temporary label size override until we remove site-wide font customisation */
630 /* Stop bootstrap 5 from floating legends when they don't need to be */
635 /* Override the text colour for primary and secondary buttons, to match our
636 bootstrap 4 colours. Note this has accessibility issues, which is why
637 bootstrap 5 calculates black as the appropriate colour, and we should
638 reconsider our colours at some point with that in mind. */
641 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
645 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
648 .btn-outline-secondary {
649 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
652 /* Rules for the search and direction forms */
654 header .search_forms,
659 /* Rules for the map key which appears in the popout sidebar */
662 .mapkey-table-key img {
669 /* Rules for search sidebar */
671 #sidebar .search_results_entry {
674 &.selected { background: $list-highlight; }
677 .search_more .loader {
682 .search_results_error {
687 /* Rules for routing */
690 background-image: image-url('routing-sprite.png');
693 background-repeat: no-repeat;
695 @for $i from 0 through 25 {
696 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
708 background: $list-highlight;
711 .routing_marker { width: 15px; cursor: move; }
717 /* Rules for the history sidebar */
719 #sidebar .changesets {
721 &.selected { background: $list-highlight; }
722 /* color is derived from changeset bbox fillColor in history.js */
724 a.stretched-link > span, a:not(.stretched-link), [title] {
726 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
730 .changeset_more .loader {
736 /* Rules for the browse sidebar */
740 padding-bottom: $spacer;
741 margin-bottom: $spacer;
742 border-bottom: 1px solid $grey;
745 word-wrap: break-word;
749 .browse-section:last-of-type {
754 background-color: $offwhite;
756 border-collapse: separate;
759 margin-bottom: $spacer;
762 border-bottom: 1px solid $grey;
765 tr:last-child th, tr:last-child td {
773 word-wrap: break-word;
774 white-space: pre-wrap;
779 background-color: $offwhite;
783 border-left: 1px solid $grey;
784 background-color: #fff;
787 .colour-preview-box {
792 border: 1px solid rgba(0, 0, 0, .1);
793 // add color via inline css on element: background-color: <tag value>;
797 .subscribe-buttons input {
803 span.action-button:hover {
805 text-decoration: underline;
810 margin: 0 0 10px 10px;
823 background: $list-highlight;
830 /* Bootstrap buttons don't have any vertical margin, so
831 they touch when adjacent buttons wrap onto a new line
832 e.g. wide form buttons on a narrow sidebar */
836 margin-bottom: $spacer * 0.25;
840 /* Rules for export sidebar */
848 .export_area_inputs {
849 margin-bottom: $spacer;
857 background: $lightgrey;
859 #maxlat { margin-top: -1px; }
862 /* no-r2 */ margin-left: -1px;
866 /* no-r2 */ margin-right: -1px;
868 #minlat { margin-bottom: -1px; }
872 /* Rules for edit pages */
888 /* Rules for non-map content pages */
891 background: $lightgrey;
898 padding: $lineheight;
901 /* Overrides for pages that use new layout conventions */
903 .header-illustration {
904 background-position: 0 0;
905 background-repeat: no-repeat;
913 background-image: image-url("sign-up-illustration.png");
917 background-image: image-url("confirm-illustration.png");
921 background-image: image-url("terms-illustration.png");
929 background-image: image-url("sign-up-illustration-arm.png");
932 pointer-events: none;
936 [dir=rtl] .header-illustration {
937 transform: scaleX(-1);
940 transform: scaleX(-1);
953 /* Rules for small maps in content areas */
957 margin-bottom: $lineheight;
960 @include media-breakpoint-up(md) {
966 /* Rules for the user map */
968 .content_map .leaflet-popup-content {
973 /* Rules for user popups on maps */
984 /* Rules for the user list */
990 /* Rules for the diary entry page */
1001 border-top: 1px dashed $grey;
1003 border-top: 1px solid $grey;
1008 /* Rules for the account confirmation page */
1012 padding: $lineheight;
1013 margin-bottom: $lineheight;
1018 list-style: inherit;
1022 list-style-type: lower-alpha;
1027 /* Rules for the oauth authorization page */
1029 .oauth-authorize ul {
1033 /* Rules for messages pages */
1037 background: $offwhite;
1041 background: #CBEEA7;
1046 background-color: $lightgrey;
1052 .describe_location {
1058 background-color: $lightgrey;
1061 /* Rules for user images */
1068 img.user_thumbnail {
1073 img.user_thumbnail_tiny {
1080 /* General styles for action lists / subnavs */
1082 nav.secondary-actions {
1087 flex-direction: row;
1095 border-left: 1px solid $grey;
1096 padding-left: $lineheight * 0.5;
1097 margin-right: $lineheight * 0.5;
1098 margin-bottom: $lineheight * 0.125;
1103 div.secondary-actions {
1108 /* Rules for rich text */
1113 background: $lightgrey;
1118 background: $lightgrey;
1120 white-space: pre-wrap;
1128 padding: $lineheight;
1129 background-color: $offwhite;
1136 border-left: $lineheight solid $offwhite;
1137 padding-left: $lineheight;
1143 /* Rules for the iD editor */
1150 /* Rules for the "Welcome" page */
1151 .site-welcome, .site-fixthemap {
1153 background-image: image-url("welcome-sprite.png");
1154 background-size: 500px 250px;
1164 /* no-r2 */ background-position: -50px 0;
1169 vertical-align: middle;
1173 /* no-r2 */ background-position: -100px 0;
1177 /* no-r2 */ background-position: -150px 0;
1181 /* no-r2 */ background-position: -200px 0;
1185 /* no-r2 */ background-position: -250px 0;
1189 /* no-r2 */ background-position: -300px 0;
1193 /* no-r2 */ background-position: -350px 0;
1197 background-color: #333;
1202 .site-about #content {
1203 background-color: $lightgrey;
1214 color: $vibrant-green;
1220 background-position: 0 50%;
1221 background-repeat: no-repeat;
1222 background-image: image-url('about/osm.png');
1223 background-size: cover;
1224 background-color: $vibrant-green;
1228 background: $vibrant-green;
1232 display: inline-block;
1241 background: 40px 40px image-url('about/sprite.png') no-repeat;
1245 background-position: 0px 0px;
1249 background-position: 0px -40px;
1253 background-position: 0px -80px;
1257 background-position: 0px -120px;
1261 background-position: 0px -160px;
1265 background-position: -45px -160px;