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%);
191 background-color: lighten($grey, 10%);
195 nav.primary, nav.secondary {
198 background-color: $green;
204 #compact-secondary-nav {
209 #compact-secondary-nav {
210 display: inline-block;
224 float: none !important;
232 min-height: $headerHeight;
244 #sidebar .search_forms,
260 border-top: 1px solid #eee;
262 border-bottom: 1px solid #eee;
280 .user-menu, .login-menu {
285 #compact-secondary-nav {
290 display: inline-block;
293 .overlay-sidebar #sidebar .welcome {
297 .overlay-sidebar #sidebar #banner {
302 /* Utility for styling notification numbers */
305 background: lighten($green, 30%);
307 font-weight: $font-weight-normal;
310 /* Rules for the message shown in place of the map when javascript is disabled */
318 /* Rules for Leaflet maps */
320 .leaflet-top.leaflet-right,
321 .leaflet-top.leaflet-left {
325 flex-direction: column;
326 flex-wrap: wrap-reverse;
329 .leaflet-control .control-button {
333 background-color: #333;
334 background-color: rgba(0,0,0,.6);
339 background-color: black;
344 background-color: #333;
345 background-color: rgba(0,0,0,.5);
350 background-color: $vibrant-green;
354 border-start-start-radius: 4px;
358 border-end-start-radius: 4px;
367 /* Rules for the sidebar and main map area */
387 width: $sidebarWidth;
403 .overlay-sidebar #sidebar {
436 width: $sidebarWidth;
440 background-color: rgba(255, 255, 255, 0.5);
457 .leaflet-marker-draggable {
472 border-bottom: 1px solid $grey;
478 @include media-breakpoint-down(md) {
520 border: 2px solid #fff;
523 transition: border-color 0.08s ease-in;
530 border-bottom-right-radius: 3px;
534 text-stroke: 2px #fff;
535 background: rgba(255,255,255,.9);
537 input[type="radio"] {
542 &.active { border-color: darken($green, 10%); }
545 &.active { border-color: darken($green, 20%); }
555 li.disabled { color: $darkgrey; }
566 top: 10px !important;
568 margin-right: 0px !important;
569 margin-top: 0px !important;
573 .leaflet-popup-scrolled {
574 padding-right: $lineheight;
575 border-bottom: 0px !important;
576 border-top: 0px !important;
579 .leaflet-popup-content-wrapper {
580 border-radius: 4px !important;
583 /* Rules for attribution text under the main map shown on printouts */
589 .donate-attr { color: darken($green, 10%) !important; }
591 /* Rules for the sidebar */
605 /* Temporary label size override until we remove site-wide font customisation */
616 /* Stop bootstrap 5 from floating legends when they don't need to be */
621 /* Override the text colour for primary and secondary buttons, to match our
622 bootstrap 4 colours. Note this has accessibility issues, which is why
623 bootstrap 5 calculates black as the appropriate colour, and we should
624 reconsider our colours at some point with that in mind. */
627 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
631 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
634 .btn-outline-secondary {
635 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
638 /* Rules for the search and direction forms */
640 header .search_forms,
645 /* Rules for the map key which appears in the popout sidebar */
648 .mapkey-table-key img {
655 /* Rules for search sidebar */
657 #sidebar .search_results_entry {
660 &.selected { background: $list-highlight; }
663 .search_more .loader {
668 .search_results_error {
673 /* Rules for routing */
676 background-image: image-url('routing-sprite.png');
679 background-repeat: no-repeat;
681 @for $i from 0 through 25 {
682 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
694 background: $list-highlight;
697 .routing_marker { width: 15px; cursor: move; }
703 /* Rules for the history sidebar */
705 #sidebar .changesets {
707 &.selected { background: $list-highlight; }
708 /* color is derived from changeset bbox fillColor in history.js */
710 a.stretched-link > span, a:not(.stretched-link), [title] {
712 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
716 .changeset_more .loader {
722 /* Rules for the browse sidebar */
726 padding-bottom: $spacer;
727 margin-bottom: $spacer;
728 border-bottom: 1px solid $grey;
731 word-wrap: break-word;
735 .browse-section:last-of-type {
740 background-color: $offwhite;
742 border-collapse: separate;
745 margin-bottom: $spacer;
748 border-bottom: 1px solid $grey;
751 tr:last-child th, tr:last-child td {
759 word-wrap: break-word;
760 white-space: pre-wrap;
765 background-color: $offwhite;
769 border-left: 1px solid $grey;
770 background-color: #fff;
773 .colour-preview-box {
778 border: 1px solid rgba(0, 0, 0, .1);
779 // add color via inline css on element: background-color: <tag value>;
783 .subscribe-buttons input {
789 span.action-button:hover {
791 text-decoration: underline;
796 margin: 0 0 10px 10px;
809 background: $list-highlight;
816 /* Bootstrap buttons don't have any vertical margin, so
817 they touch when adjacent buttons wrap onto a new line
818 e.g. wide form buttons on a narrow sidebar */
822 margin-bottom: $spacer * 0.25;
826 /* Rules for export sidebar */
834 .export_area_inputs {
835 margin-bottom: $spacer;
843 background: $lightgrey;
845 #maxlat { margin-top: -1px; }
848 /* no-r2 */ margin-left: -1px;
852 /* no-r2 */ margin-right: -1px;
854 #minlat { margin-bottom: -1px; }
858 /* Rules for edit pages */
874 /* Rules for non-map content pages */
877 background: $lightgrey;
884 padding: $lineheight;
887 /* Overrides for pages that use new layout conventions */
889 .header-illustration {
890 background-position: 0 0;
891 background-repeat: no-repeat;
899 background-image: image-url("sign-up-illustration.png");
903 background-image: image-url("confirm-illustration.png");
907 background-image: image-url("terms-illustration.png");
915 background-image: image-url("sign-up-illustration-arm.png");
918 pointer-events: none;
922 [dir=rtl] .header-illustration {
923 transform: scaleX(-1);
926 transform: scaleX(-1);
939 /* Rules for small maps in content areas */
943 margin-bottom: $lineheight;
946 @include media-breakpoint-up(md) {
952 /* Rules for the user map */
954 .content_map .leaflet-popup-content {
959 /* Rules for user popups on maps */
970 /* Rules for the user list */
976 /* Rules for the diary entry page */
987 border-top: 1px dashed $grey;
989 border-top: 1px solid $grey;
994 /* Rules for the account confirmation page */
998 padding: $lineheight;
999 margin-bottom: $lineheight;
1004 list-style: inherit;
1008 list-style-type: lower-alpha;
1013 /* Rules for the oauth authorization page */
1015 .oauth-authorize ul {
1019 /* Rules for messages pages */
1023 background: $offwhite;
1027 background: #CBEEA7;
1032 background-color: $lightgrey;
1038 .describe_location {
1044 background-color: $lightgrey;
1047 /* Rules for user images */
1054 img.user_thumbnail {
1059 img.user_thumbnail_tiny {
1066 /* General styles for action lists / subnavs */
1068 nav.secondary-actions {
1073 flex-direction: row;
1081 border-left: 1px solid $grey;
1082 padding-left: $lineheight * 0.5;
1083 margin-right: $lineheight * 0.5;
1084 margin-bottom: $lineheight * 0.125;
1089 div.secondary-actions {
1094 /* Rules for rich text */
1099 background: $lightgrey;
1104 background: $lightgrey;
1106 white-space: pre-wrap;
1114 padding: $lineheight;
1115 background-color: $offwhite;
1122 border-left: $lineheight solid $offwhite;
1123 padding-left: $lineheight;
1129 /* Rules for the iD editor */
1136 /* Rules for the "Welcome" page */
1137 .site-welcome, .site-fixthemap {
1139 background-image: image-url("welcome-sprite.png");
1140 background-size: 500px 250px;
1150 /* no-r2 */ background-position: -50px 0;
1155 vertical-align: middle;
1159 /* no-r2 */ background-position: -100px 0;
1163 /* no-r2 */ background-position: -150px 0;
1167 /* no-r2 */ background-position: -200px 0;
1171 /* no-r2 */ background-position: -250px 0;
1175 /* no-r2 */ background-position: -300px 0;
1179 /* no-r2 */ background-position: -350px 0;
1183 background-color: #333;
1188 .site-about #content {
1189 background-color: $lightgrey;
1200 color: $vibrant-green;
1206 background-position: 0 50%;
1207 background-repeat: no-repeat;
1208 background-image: image-url('about/osm.png');
1209 background-size: cover;
1210 background-color: $vibrant-green;
1214 background: $vibrant-green;
1218 display: inline-block;
1227 background: 40px 40px image-url('about/sprite.png') no-repeat;
1231 background-position: 0px 0px;
1235 background-position: 0px -40px;
1239 background-position: 0px -80px;
1243 background-position: 0px -120px;
1247 background-position: 0px -160px;
1251 background-position: -45px -160px;