4 @import "rails_bootstrap_forms";
6 /* Styles common to large and small screens */
8 /* Default rules for the body of every page */
11 font-size: $typeheight;
12 --dark-mode-map-filter: none;
16 text-decoration: underline dotted;
19 /* Utility for de-emphasizing content */
21 .text-body-secondary a {
25 /* Bootstrap contextual table classes overrides in dark mode */
27 @include color-mode(dark) {
29 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
32 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
35 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
37 .table-primary, .table-secondary, .table-success {
38 --bs-table-color: initial;
39 border-color: inherit;
43 /* Utility for delayed loading spinner */
46 animation: 300ms linear forwards delayed-fade-in;
49 @keyframes delayed-fade-in {
55 /* Bootstrap close button overrides for nested light/dark themes */
57 [data-bs-theme="dark"],
58 [data-bs-theme] [data-bs-theme="dark"] {
59 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
62 [data-bs-theme="light"],
63 [data-bs-theme] [data-bs-theme="light"] {
64 --bs-btn-close-filter: none;
67 /* Rules for the header */
74 background: image-url("menu-icon.svg") no-repeat;
75 background-size: 30px 30px;
78 margin: 14px 10px 0 0;
82 @include color-mode(dark) {
89 height: $headerHeight;
94 padding: $lineheight * 0.5;
98 height: $headerHeight;
112 #edit_tab .btn-outline-primary {
113 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
117 .btn-outline-primary {
122 border-top-color: $grey;
126 background-color: lighten($green, 30%);
131 // Small tweaks to the toggle to stop the primary colour showing through
132 // when the menu is shown
133 .show > .btn-outline-primary.dropdown-toggle {
134 background-color: $green;
135 border-color: $green;
138 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
153 nav.primary, nav.secondary {
156 background-color: $green;
162 #compact-secondary-nav {
172 flex-direction: column;
174 min-height: $headerHeight;
177 display: none !important;
189 #sidebar .search_forms {
204 flex-direction: column;
208 justify-content: center;
211 .user-menu, .login-menu {
216 #compact-secondary-nav {
221 display: inline-block;
224 .overlay-sidebar #sidebar .welcome {
228 .overlay-sidebar #sidebar #banner {
233 /* Utility for styling notification numbers */
236 background: transparentize(lighten($green, 25%), .25);
238 font-weight: $font-weight-normal;
241 /* Rules for Leaflet maps */
243 .leaflet-top.leaflet-right,
244 .leaflet-top.leaflet-left {
248 flex-direction: column;
249 flex-wrap: wrap-reverse;
252 .leaflet-control .control-button {
258 background-color: #333;
259 background-color: rgba(0,0,0,.6);
264 background-color: black;
269 background-color: #333;
270 background-color: rgba(0,0,0,.5);
275 border-start-start-radius: 4px;
279 border-end-start-radius: 4px;
284 .leaflet-control.active .control-button {
285 background-color: $vibrant-green;
288 /* Rules for the sidebar and main map area */
308 width: $sidebarWidth;
311 .overlay-sidebar #sidebar {
324 .sidebar-close-controls,
340 width: $sidebarWidth;
356 .leaflet-marker-draggable {
361 animation: 1500ms forwards query-marker-fade;
363 @keyframes query-marker-fade {
379 @include media-breakpoint-down(md) {
394 .overlay-sidebar.overlay-right-sidebar {
414 box-sizing: content-box;
415 top: - map.get($border-widths, 4);
416 left: - map.get($border-widths, 4);
417 --bs-btn-border-color: var(--bs-body-bg);
420 --bs-btn-border-color: var(--bs-primary-border-subtle);
425 li.disabled { color: $darkgrey; }
436 top: 10px !important;
438 margin-right: 0px !important;
439 margin-top: 0px !important;
443 .leaflet-popup-scrolled {
444 padding-right: $lineheight;
445 border-bottom: 0px !important;
446 border-top: 0px !important;
449 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
450 .leaflet-contextmenu, .leaflet-contextmenu-item,
451 .leaflet-control-attribution, .leaflet-control-scale-line {
452 @extend .bg-body, .text-body;
455 .leaflet-control-attribution, .leaflet-control-scale-line {
456 @extend .bg-opacity-75;
457 text-shadow: none !important;
460 .leaflet-contextmenu-item.over {
461 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
464 .leaflet-popup-content-wrapper {
468 color: var(--bs-link-color) !important;
472 @include color-mode(dark) {
473 .leaflet-container .leaflet-control-attribution a {
474 color: var(--bs-link-color);
477 .leaflet-control-scale-line {
478 border-color: rgba(var(--bs-light-rgb), .75) !important;
482 @mixin dark-map-color-scheme {
483 .leaflet-tile-container,
484 .mapkey-table-entry td:first-child > * {
485 filter: var(--dark-mode-map-filter);
488 .leaflet-tile-container .leaflet-tile {
493 body[data-map-theme="dark"] {
494 @include dark-map-color-scheme;
497 @include color-mode(dark) {
498 body:not([data-map-theme]) {
499 @include dark-map-color-scheme;
503 /* Rules for attribution text under the main map shown on printouts */
505 .donate-attr { color: darken($green, 10%) !important; }
507 /* Temporary label size override until we remove site-wide font customisation */
518 /* Stop bootstrap 5 from floating legends when they don't need to be */
523 /* Override the text colour for primary and secondary buttons, to match our
524 bootstrap 4 colours. Note this has accessibility issues, which is why
525 bootstrap 5 calculates black as the appropriate colour, and we should
526 reconsider our colours at some point with that in mind. */
529 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
533 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
536 .btn-outline-secondary {
537 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
540 /* Rules for the search and direction forms */
542 header .search_forms,
553 /* Rules for routing */
562 .routing_marker_column {
564 margin-right: .35rem;
572 /* Rules for the history sidebar */
574 .changeset-above-sidebar-viewport {
575 --changeset-border-color: #CC6655;
576 --changeset-fill-color: #DDBBBB;
577 --changeset-outline-color: #FFF4F4;
579 .changeset-in-sidebar-viewport {
580 --changeset-border-color: #FF9500;
581 --changeset-fill-color: #FFFFAF;
582 --changeset-outline-color: #FFFFFF;
583 &.changeset-highlight-outline {
584 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
587 .changeset-below-sidebar-viewport {
588 --changeset-border-color: #8888AA;
589 --changeset-fill-color: #CCCCDD;
590 --changeset-outline-color: #F4F4FF;
592 .changeset-highlight-outline {
593 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
596 #sidebar .changesets {
597 .changeset-color-hint-bar {
599 background: var(--changeset-border-color);
607 a.stretched-link > span, a:not(.stretched-link), [title] {
609 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
614 /* Rules for the browse sidebar */
618 padding-bottom: $spacer;
619 margin-bottom: $spacer;
620 border-bottom: 1px solid $grey;
623 word-wrap: break-word;
627 .browse-section:last-of-type {
633 white-space: pre-wrap;
634 word-wrap: break-word;
635 word-break: break-word;
637 tr:last-child th, tr:last-child td {
647 /* Force LTR/RTL alignment for placeholder text */
649 .form-control::placeholder {
653 /* Rules for export sidebar */
656 .export_area_inputs {
669 /* Rules for edit pages */
680 /* Rules for non-map content pages */
684 padding: $lineheight;
687 /* Rules for login and signup pages */
689 .sessions-new, .users-new, .users-create {
690 #content .content-inner {
695 .header-illustration {
696 background-position: right;
697 background-repeat: no-repeat;
705 background-image: image-url("sign-up-illustration.svg");
706 background-position-x: 70px;
710 background-image: image-url("confirm-illustration.svg");
714 background-image: image-url("terms-illustration.svg");
718 [dir=rtl] .header-illustration {
719 transform: scaleX(-1);
722 transform: scaleX(-1);
726 transform: scaleX(-1);
730 /* Rules for small maps in content areas */
734 margin-bottom: $lineheight;
737 @include media-breakpoint-up(md) {
743 /* Rules for the user map */
745 .content_map .leaflet-popup-content {
749 /* Rules for user popups on maps */
759 /* Rules for the diary entry page */
766 .diary-comment .col-auto {
769 .diary-comment .col {
774 /* Rules for the issues page */
776 .issues.issues-index {
782 /* Rules for the account confirmation page */
784 .accounts-terms-show {
786 padding: $lineheight;
787 margin-bottom: $lineheight;
796 list-style-type: lower-alpha;
801 /* Rules for user images */
813 img.user_thumbnail_tiny {
819 /* General styles for action lists / subnavs */
821 nav.secondary-actions {
834 border-left: 1px solid $grey;
835 padding-left: $lineheight * 0.5;
836 margin-right: $lineheight * 0.5;
837 margin-bottom: $lineheight * 0.125;
842 div.secondary-actions {
847 /* Rules for rich text */
851 background: var(--bs-secondary-bg);
856 background: var(--bs-secondary-bg);
858 white-space: pre-wrap;
866 padding: $lineheight;
867 background-color: var(--bs-tertiary-bg);
874 border-left: $lineheight solid var(--bs-tertiary-bg);
875 padding-left: $lineheight;
877 color: var(--bs-secondary-color);
881 /* Rules for the "About" page */
883 .site-about #content {
893 color: $vibrant-green;
899 background-position: 0 50%;
900 background-repeat: no-repeat;
901 background-image: image-url('about/osm.png');
902 background-size: cover;
903 background-color: $vibrant-green;
907 background: $vibrant-green;
911 display: inline-block;
918 /* Rules for tables with usernames */
920 .messages-table .username,
921 #block_list .username {
925 /* Rules for navigation tabs */
927 .nav-tabs .username {
931 .bg-body-secondary .nav-tabs {
932 --bs-border-color: var(--bs-secondary-border-subtle);
933 --bs-secondary-bg: var(--bs-secondary-border-subtle);
937 /* Rules for traces */
940 mix-blend-mode: darken;
943 @include color-mode(dark) {
946 mix-blend-mode: lighten;
950 /* Rules for map sidebar icons */
952 .browse-section .browse-element-list {
953 line-height: 1.25rem;
959 .d-flex > .browse-icon {
960 height: max(20px, 1.25rem);
963 @include color-mode(dark) {
964 .browse-icon-invertible {
965 filter: invert(.8) hue-rotate(180deg);