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;
129 & > .btn-group .btn-outline-primary {
130 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
134 .btn-outline-primary {
139 border-top-color: $grey;
143 background-color: lighten($green, 30%);
148 // Small tweaks to the toggle to stop the primary colour showing through
149 // when the menu is shown
150 .show > .btn-outline-primary.dropdown-toggle {
151 background-color: $green;
152 border-color: $green;
155 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
170 color: darken($darkgrey, 25%);
174 background-color: lighten($grey, 10%);
178 nav.primary, nav.secondary {
181 background-color: $green;
187 #compact-secondary-nav {
192 #compact-secondary-nav {
193 display: inline-block;
207 float: none !important;
215 min-height: $headerHeight;
227 #sidebar .search_forms,
243 border-top: 1px solid #eee;
245 border-bottom: 1px solid #eee;
263 .user-menu, .login-menu {
268 #compact-secondary-nav {
273 display: inline-block;
276 .overlay-sidebar #sidebar .welcome {
280 .overlay-sidebar #sidebar #banner {
285 /* Utility for styling notification numbers */
288 background: lighten($green, 30%);
290 font-weight: $font-weight-normal;
293 /* Rules for the message shown in place of the map when javascript is disabled */
301 /* Rules for Leaflet maps */
303 .leaflet-top.leaflet-right,
304 .leaflet-top.leaflet-left {
308 flex-direction: column;
309 flex-wrap: wrap-reverse;
312 .leaflet-control .control-button {
316 background-color: #333;
317 background-color: rgba(0,0,0,.6);
322 background-color: black;
327 background-color: #333;
328 background-color: rgba(0,0,0,.5);
333 background-color: $vibrant-green;
337 border-start-start-radius: 4px;
341 border-end-start-radius: 4px;
350 /* Rules for the sidebar and main map area */
370 width: $sidebarWidth;
386 .overlay-sidebar #sidebar {
419 width: $sidebarWidth;
423 background-color: rgba(255, 255, 255, 0.5);
440 .leaflet-marker-draggable {
455 border-bottom: 1px solid $grey;
461 @include media-breakpoint-down(md) {
503 border: 2px solid #fff;
506 transition: border-color 0.08s ease-in;
513 border-bottom-right-radius: 3px;
517 text-stroke: 2px #fff;
518 background: rgba(255,255,255,.9);
520 input[type="radio"] {
525 &.active { border-color: darken($green, 10%); }
528 &.active { border-color: darken($green, 20%); }
538 li.disabled { color: $darkgrey; }
549 top: 10px !important;
551 margin-right: 0px !important;
552 margin-top: 0px !important;
556 .leaflet-popup-scrolled {
557 padding-right: $lineheight;
558 border-bottom: 0px !important;
559 border-top: 0px !important;
562 .leaflet-popup-content-wrapper {
563 border-radius: 4px !important;
566 /* Rules for attribution text under the main map shown on printouts */
572 .donate-attr { color: darken($green, 10%) !important; }
574 /* Rules for the sidebar */
588 /* Temporary label size override until we remove site-wide font customisation */
599 /* Stop bootstrap 5 from floating legends when they don't need to be */
604 /* Override the text colour for primary and secondary buttons, to match our
605 bootstrap 4 colours. Note this has accessibility issues, which is why
606 bootstrap 5 calculates black as the appropriate colour, and we should
607 reconsider our colours at some point with that in mind. */
610 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
614 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
617 .btn-outline-secondary {
618 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
621 /* Rules for the search and direction forms */
623 header .search_forms,
628 /* Rules for the map key which appears in the popout sidebar */
631 .mapkey-table-key img {
638 /* Rules for search sidebar */
640 #sidebar .search_results_entry {
643 &.selected { background: $list-highlight; }
646 .search_more .loader {
651 .search_results_error {
656 /* Rules for routing */
659 background-image: image-url('routing-sprite.png');
662 background-repeat: no-repeat;
664 @for $i from 0 through 25 {
665 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
677 background: $list-highlight;
680 .routing_marker { width: 15px; cursor: move; }
686 /* Rules for the history sidebar */
688 #sidebar .changesets {
690 &.selected { background: $list-highlight; }
691 /* color is derived from changeset bbox fillColor in history.js */
693 a.stretched-link > span, a:not(.stretched-link), [title] {
695 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
699 .changeset_more .loader {
705 /* Rules for the browse sidebar */
709 padding-bottom: $spacer;
710 margin-bottom: $spacer;
711 border-bottom: 1px solid $grey;
714 word-wrap: break-word;
718 .browse-section:last-of-type {
723 background-color: $offwhite;
725 border-collapse: separate;
728 margin-bottom: $spacer;
731 border-bottom: 1px solid $grey;
734 tr:last-child th, tr:last-child td {
742 word-wrap: break-word;
743 white-space: pre-wrap;
748 background-color: $offwhite;
752 border-left: 1px solid $grey;
753 background-color: #fff;
756 .colour-preview-box {
761 border: 1px solid rgba(0, 0, 0, .1);
762 // add color via inline css on element: background-color: <tag value>;
766 .subscribe-buttons input {
772 span.action-button:hover {
774 text-decoration: underline;
779 margin: 0 0 10px 10px;
792 background: $list-highlight;
799 /* Bootstrap buttons don't have any vertical margin, so
800 they touch when adjacent buttons wrap onto a new line
801 e.g. wide form buttons on a narrow sidebar */
805 margin-bottom: $spacer * 0.25;
809 /* Rules for export sidebar */
817 .export_area_inputs {
818 margin-bottom: $spacer;
826 background: $lightgrey;
828 #maxlat { margin-top: -1px; }
831 /* no-r2 */ margin-left: -1px;
835 /* no-r2 */ margin-right: -1px;
837 #minlat { margin-bottom: -1px; }
841 /* Rules for edit pages */
857 /* Rules for non-map content pages */
860 background: $lightgrey;
867 padding: $lineheight;
870 /* Overrides for pages that use new layout conventions */
872 .header-illustration {
873 background-position: 0 0;
874 background-repeat: no-repeat;
882 background-image: image-url("sign-up-illustration.png");
886 background-image: image-url("confirm-illustration.png");
890 background-image: image-url("terms-illustration.png");
898 background-image: image-url("sign-up-illustration-arm.png");
901 pointer-events: none;
905 [dir=rtl] .header-illustration {
906 transform: scaleX(-1);
909 transform: scaleX(-1);
922 /* Rules for small maps in content areas */
926 margin-bottom: $lineheight;
929 @include media-breakpoint-up(md) {
935 /* Rules for the user map */
937 .content_map .leaflet-popup-content {
942 /* Rules for user popups on maps */
953 /* Rules for the user list */
959 /* Rules for the diary entry page */
970 border-top: 1px dashed $grey;
972 border-top: 1px solid $grey;
977 /* Rules for the account confirmation page */
981 padding: $lineheight;
982 margin-bottom: $lineheight;
991 list-style-type: lower-alpha;
996 /* Rules for the oauth authorization page */
998 .oauth-authorize ul {
1002 /* Rules for messages pages */
1006 background: $offwhite;
1010 background: #CBEEA7;
1015 background-color: $lightgrey;
1021 .describe_location {
1027 background-color: $lightgrey;
1030 /* Rules for user images */
1037 img.user_thumbnail {
1042 img.user_thumbnail_tiny {
1049 /* General styles for action lists / subnavs */
1051 nav.secondary-actions {
1056 flex-direction: row;
1064 border-left: 1px solid $grey;
1065 padding-left: $lineheight * 0.5;
1066 margin-right: $lineheight * 0.5;
1067 margin-bottom: $lineheight * 0.125;
1072 div.secondary-actions {
1077 /* Rules for rich text */
1082 background: $lightgrey;
1087 background: $lightgrey;
1089 white-space: pre-wrap;
1097 padding: $lineheight;
1098 background-color: $offwhite;
1105 border-left: $lineheight solid $offwhite;
1106 padding-left: $lineheight;
1112 /* Rules for the iD editor */
1119 /* Rules for the "Welcome" page */
1120 .site-welcome, .site-fixthemap {
1122 background-image: image-url("welcome-sprite.png");
1123 background-size: 500px 250px;
1133 /* no-r2 */ background-position: -50px 0;
1138 vertical-align: middle;
1142 /* no-r2 */ background-position: -100px 0;
1146 /* no-r2 */ background-position: -150px 0;
1150 /* no-r2 */ background-position: -200px 0;
1154 /* no-r2 */ background-position: -250px 0;
1158 /* no-r2 */ background-position: -300px 0;
1162 /* no-r2 */ background-position: -350px 0;
1166 background-color: #333;
1171 .site-about #content {
1172 background-color: $lightgrey;
1183 color: $vibrant-green;
1189 background-position: 0 50%;
1190 background-repeat: no-repeat;
1191 background-image: image-url('about/osm.png');
1192 background-size: cover;
1193 background-color: $vibrant-green;
1197 background: $vibrant-green;
1201 display: inline-block;
1210 background: 40px 40px image-url('about/sprite.png') no-repeat;
1214 background-position: 0px 0px;
1218 background-position: 0px -40px;
1222 background-position: 0px -80px;
1226 background-position: 0px -120px;
1230 background-position: 0px -160px;
1234 background-position: -45px -160px;