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;
23 text-decoration: underline dotted;
26 #container { position: relative; }
29 vertical-align: middle;
30 margin-right: $lineheight * 0.25;
36 display: inline-block;
40 background: transparent image-url("sprite.svg") no-repeat 0 0;
45 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
46 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
47 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
48 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
49 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
50 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
51 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
52 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
53 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
54 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
55 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
56 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
57 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
58 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
59 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
60 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
61 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
63 /* Utility for de-emphasizing content */
69 /* Rules for the header */
76 background: image-url("menu-icon.png") no-repeat;
77 background-size: 30px 30px;
80 margin: 14px 10px 0 0;
84 @include color-mode(dark) {
91 height: $headerHeight;
95 h1, nav, nav > ul, nav > ul > li {
96 display: inline-block;
101 padding: $lineheight * 0.5;
124 & > .btn-group .btn-outline-primary {
125 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
129 .btn-outline-primary {
134 border-top-color: $grey;
138 background-color: lighten($green, 30%);
143 // Small tweaks to the toggle to stop the primary colour showing through
144 // when the menu is shown
145 .show > .btn-outline-primary.dropdown-toggle {
146 background-color: $green;
147 border-color: $green;
150 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
161 background-color: lighten($grey, 10%);
165 nav.primary, nav.secondary {
168 background-color: $green;
174 #compact-secondary-nav {
179 #compact-secondary-nav {
180 display: inline-block;
193 flex-direction: column;
195 min-height: $headerHeight;
206 #sidebar .search_forms,
223 .user-menu, .login-menu {
228 #compact-secondary-nav {
233 display: inline-block;
236 .overlay-sidebar #sidebar .welcome {
240 .overlay-sidebar #sidebar #banner {
245 /* Utility for styling notification numbers */
248 background: lighten($green, 30%);
250 font-weight: $font-weight-normal;
253 /* Rules for Leaflet maps */
255 .leaflet-top.leaflet-right,
256 .leaflet-top.leaflet-left {
260 flex-direction: column;
261 flex-wrap: wrap-reverse;
264 .leaflet-control .control-button {
268 background-color: #333;
269 background-color: rgba(0,0,0,.6);
274 background-color: black;
279 background-color: #333;
280 background-color: rgba(0,0,0,.5);
285 background-color: $vibrant-green;
289 border-start-start-radius: 4px;
293 border-end-start-radius: 4px;
302 /* Rules for the sidebar and main map area */
322 width: $sidebarWidth;
329 .overlay-sidebar #sidebar {
356 width: $sidebarWidth;
372 .leaflet-marker-draggable {
387 @include media-breakpoint-down(md) {
422 --bs-btn-border-color: var(--bs-body-bg);
425 --bs-btn-border-color: var(--bs-primary-border-subtle);
434 li.disabled { color: $darkgrey; }
445 top: 10px !important;
447 margin-right: 0px !important;
448 margin-top: 0px !important;
452 .leaflet-popup-scrolled {
453 padding-right: $lineheight;
454 border-bottom: 0px !important;
455 border-top: 0px !important;
458 .leaflet-popup-content-wrapper {
459 border-radius: 4px !important;
462 /* Rules for attribution text under the main map shown on printouts */
464 .donate-attr { color: darken($green, 10%) !important; }
466 /* Rules for the sidebar */
476 /* Temporary label size override until we remove site-wide font customisation */
487 /* Stop bootstrap 5 from floating legends when they don't need to be */
492 /* Override the text colour for primary and secondary buttons, to match our
493 bootstrap 4 colours. Note this has accessibility issues, which is why
494 bootstrap 5 calculates black as the appropriate colour, and we should
495 reconsider our colours at some point with that in mind. */
498 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
502 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
505 .btn-outline-secondary {
506 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
509 /* Rules for the search and direction forms */
511 header .search_forms,
522 /* Rules for search sidebar */
524 #sidebar .search_results_entry {
526 background: $list-highlight;
529 .search_more .loader {
534 /* Rules for routing */
537 background-image: image-url('routing-sprite.png');
540 background-repeat: no-repeat;
542 @for $i from 0 through 25 {
543 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
546 @include color-mode(dark) {
559 background: $list-highlight;
562 .routing_marker { width: 15px; cursor: move; }
568 /* Rules for the history sidebar */
570 #sidebar .changesets {
572 &.selected { background: $list-highlight; }
573 /* color is derived from changeset bbox fillColor in history.js */
575 a.stretched-link > span, a:not(.stretched-link), [title] {
577 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
581 .changeset_more .loader {
587 /* Rules for the browse sidebar */
591 padding-bottom: $spacer;
592 margin-bottom: $spacer;
593 border-bottom: 1px solid $grey;
596 word-wrap: break-word;
600 .browse-section:last-of-type {
606 white-space: pre-wrap;
608 tr:last-child th, tr:last-child td {
615 margin: 0 0 10px 10px;
628 background: $list-highlight;
635 /* Bootstrap buttons don't have any vertical margin, so
636 they touch when adjacent buttons wrap onto a new line
637 e.g. wide form buttons on a narrow sidebar */
641 margin-bottom: $spacer * 0.25;
645 /* Force LTR/RTL alignment for placeholder text */
647 .form-control::placeholder {
651 /* Rules for export sidebar */
659 .export_area_inputs {
660 margin-bottom: $spacer;
672 /*rtl:ignore*/ float: left;
675 /*rtl:ignore*/ float: right;
680 /* Rules for edit pages */
691 /* Rules for non-map content pages */
697 padding: $lineheight;
700 /* Overrides for pages that use new layout conventions */
702 .header-illustration {
703 background-position: 0 0;
704 background-repeat: no-repeat;
712 background-image: image-url("sign-up-illustration.png");
716 background-image: image-url("confirm-illustration.png");
720 background-image: image-url("terms-illustration.png");
728 background-image: image-url("sign-up-illustration-arm.png");
731 pointer-events: none;
735 [dir=rtl] .header-illustration {
736 transform: scaleX(-1);
739 transform: scaleX(-1);
743 /* Rules for small maps in content areas */
747 margin-bottom: $lineheight;
750 @include media-breakpoint-up(md) {
756 /* Rules for the user map */
758 .content_map .leaflet-popup-content {
763 /* Rules for user popups on maps */
774 /* Rules for the diary entry page */
781 .diary-comment .col-auto {
784 .diary-comment .col {
789 /* Rules for the account confirmation page */
793 padding: $lineheight;
794 margin-bottom: $lineheight;
803 list-style-type: lower-alpha;
808 /* Rules for messages pages */
812 background: $offwhite;
815 .inbox-row-unread td {
820 /* Rules for user images */
832 img.user_thumbnail_tiny {
838 /* General styles for action lists / subnavs */
840 nav.secondary-actions {
853 border-left: 1px solid $grey;
854 padding-left: $lineheight * 0.5;
855 margin-right: $lineheight * 0.5;
856 margin-bottom: $lineheight * 0.125;
861 div.secondary-actions {
866 /* Rules for rich text */
871 background: var(--bs-secondary-bg);
876 background: var(--bs-secondary-bg);
878 white-space: pre-wrap;
886 padding: $lineheight;
887 background-color: var(--bs-tertiary-bg);
894 border-left: $lineheight solid var(--bs-tertiary-bg);
895 padding-left: $lineheight;
897 color: var(--bs-secondary-color);
901 /* Rules for the "Welcome" page */
902 .site-welcome, .site-fixthemap {
904 background-image: image-url("welcome-sprite.png");
905 background-size: 500px 250px;
915 /*rtl:ignore*/ background-position: -50px 0;
920 vertical-align: middle;
924 /*rtl:ignore*/ background-position: -100px 0;
928 /*rtl:ignore*/ background-position: -150px 0;
932 /*rtl:ignore*/ background-position: -200px 0;
936 /*rtl:ignore*/ background-position: -250px 0;
940 /*rtl:ignore*/ background-position: -300px 0;
944 /*rtl:ignore*/ background-position: -350px 0;
948 background-color: #333;
953 .site-about #content {
963 color: $vibrant-green;
969 background-position: 0 50%;
970 background-repeat: no-repeat;
971 background-image: image-url('about/osm.png');
972 background-size: cover;
973 background-color: $vibrant-green;
977 background: $vibrant-green;
981 display: inline-block;
990 background: 40px 40px image-url('about/sprite.png') no-repeat;
994 background-position: 0px 0px;
998 background-position: 0px -40px;
1002 background-position: 0px -80px;
1006 background-position: 0px -120px;
1010 background-position: 0px -160px;
1014 background-position: -45px -160px;
1019 /* Rules for tabs inside secondary background sections */
1021 .bg-body-secondary .nav-tabs {
1022 --bs-border-color: var(--bs-secondary-border-subtle);
1023 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1024 margin-bottom: -1px;
1027 /* Rules for traces */
1030 mix-blend-mode: darken;
1033 @include color-mode(dark) {
1036 mix-blend-mode: lighten;