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 background-color: lighten($green, 30%);
127 // Small tweaks to the toggle to stop the primary colour showing through
128 // when the menu is shown
129 .show > .btn-outline-primary.dropdown-toggle {
130 background-color: $green;
131 border-color: $green;
134 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
149 nav.primary, nav.secondary {
152 background-color: $green;
158 #compact-secondary-nav {
168 flex-direction: column;
170 min-height: $headerHeight;
173 display: none !important;
185 #sidebar .search_forms {
200 flex-direction: column;
204 justify-content: center;
207 .user-menu, .login-menu {
212 #compact-secondary-nav {
217 display: inline-block;
220 .overlay-sidebar #sidebar .welcome {
224 .overlay-sidebar #sidebar #banner {
229 /* Rules for language selector */
231 button.d-md-none[data-bs-target="#select_language_dialog"] {
236 .select_language_list {
244 /* Utility for styling notification numbers */
247 background: transparentize(lighten($green, 25%), .25);
249 font-weight: $font-weight-normal;
252 /* Rules for Leaflet maps */
254 .leaflet-top.leaflet-right,
255 .leaflet-top.leaflet-left {
259 flex-direction: column;
260 flex-wrap: wrap-reverse;
263 .leaflet-control .control-button {
269 background-color: rgba(0,0,0,.6);
274 background-color: black;
279 background-color: rgba(0,0,0,.5);
284 border-start-start-radius: 4px;
288 border-end-start-radius: 4px;
293 .leaflet-control.active .control-button {
294 background-color: $vibrant-green;
297 /* Rules for the sidebar and main map area */
317 width: $sidebarWidth;
320 .overlay-sidebar #sidebar {
333 .sidebar-close-controls,
349 width: $sidebarWidth;
365 .leaflet-marker-draggable {
370 animation: 1500ms forwards query-marker-fade;
372 @keyframes query-marker-fade {
388 @include media-breakpoint-down(md) {
403 .overlay-sidebar.overlay-right-sidebar {
423 box-sizing: content-box;
424 top: - map.get($border-widths, 4);
425 left: - map.get($border-widths, 4);
426 --bs-btn-border-color: var(--bs-body-bg);
429 --bs-btn-border-color: var(--bs-primary-border-subtle);
434 .form-check.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, .leaflet-popup-tip,
459 .leaflet-contextmenu, .leaflet-contextmenu-item,
460 .leaflet-control-attribution, .leaflet-control-scale-line {
461 @extend .bg-body, .text-body;
464 .leaflet-control-attribution, .leaflet-control-scale-line {
465 @extend .bg-opacity-75;
466 text-shadow: none !important;
469 .leaflet-contextmenu-item.over {
470 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
473 .leaflet-popup-content-wrapper {
477 color: var(--bs-link-color) !important;
481 @include color-mode(dark) {
482 .leaflet-container .leaflet-control-attribution a {
483 color: var(--bs-link-color);
486 .leaflet-control-scale-line {
487 border-color: rgba(var(--bs-light-rgb), .75) !important;
491 @mixin dark-map-color-scheme {
492 .leaflet-tile-container,
493 #legend .filtered-image {
494 filter: var(--dark-mode-map-filter);
497 .leaflet-tile-container .leaflet-tile {
502 body[data-map-theme="dark"] {
503 @include dark-map-color-scheme;
506 @include color-mode(dark) {
507 body:not([data-map-theme]) {
508 @include dark-map-color-scheme;
512 /* Rules for attribution text under the main map shown on printouts */
514 .donate-attr { color: darken($green, 10%) !important; }
516 /* Temporary label size override until we remove site-wide font customisation */
527 /* Stop bootstrap 5 from floating legends when they don't need to be */
532 /* Override the text colour for primary and secondary buttons, to match our
533 bootstrap 4 colours. Note this has accessibility issues, which is why
534 bootstrap 5 calculates black as the appropriate colour, and we should
535 reconsider our colours at some point with that in mind. */
538 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
542 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
545 .btn-outline-secondary {
546 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
549 /* Rules for the search and direction forms */
551 header .search_forms,
562 /* Rules for routing */
571 .routing_marker_column {
573 margin-right: .35rem;
581 /* Rules for the history sidebar */
583 .changeset-above-sidebar-viewport {
584 --changeset-border-color: #CC6655;
585 --changeset-fill-color: #DDBBBB;
586 --changeset-outline-color: #FFF4F4;
588 .changeset-in-sidebar-viewport {
589 --changeset-border-color: #FF9500;
590 --changeset-fill-color: #FFFFAF;
591 --changeset-outline-color: #FFFFFF;
592 &.changeset-highlight-outline {
593 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
596 .changeset-below-sidebar-viewport {
597 --changeset-border-color: #8888AA;
598 --changeset-fill-color: #CCCCDD;
599 --changeset-outline-color: #F4F4FF;
601 .changeset-highlight-outline {
602 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
605 #sidebar .changesets {
606 .changeset-color-hint-bar {
608 background: var(--changeset-border-color);
616 a.stretched-link > bdi, a:not(.stretched-link), [title] {
618 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
623 /* Rules for the browse sidebar */
627 padding-bottom: $spacer;
628 margin-bottom: $spacer;
629 border-bottom: 1px solid $grey;
632 word-wrap: break-word;
636 .browse-section:last-of-type {
642 white-space: pre-wrap;
643 word-wrap: break-word;
644 word-break: break-word;
646 tr:last-child th, tr:last-child td {
656 /* Force LTR/RTL alignment for placeholder text */
658 .form-control::placeholder {
662 /* Rules for export sidebar */
665 .export_area_inputs {
678 /* Rules for edit pages */
689 /* Rules for non-map content pages */
693 padding: $lineheight;
696 /* Rules for login and signup pages */
698 .sessions-new, .users-new, .users-create {
699 #content .content-inner {
704 .header-illustration {
705 background-position: right;
706 background-repeat: no-repeat;
714 background-image: image-url("sign-up-illustration.svg");
715 background-position-x: 70px;
719 background-image: image-url("confirm-illustration.svg");
723 background-image: image-url("terms-illustration.svg");
727 [dir=rtl] .header-illustration {
728 transform: scaleX(-1);
731 transform: scaleX(-1);
735 transform: scaleX(-1);
739 /* Rules for small maps in content areas */
743 margin-bottom: $lineheight;
746 @include media-breakpoint-up(md) {
752 /* Rules for the user map */
754 .content_map .leaflet-popup-content {
758 /* Rules for user popups on maps */
762 margin: 0 0 5px 0 !important;
767 /* Rules for the diary entry page */
774 .diary-comment .col-auto {
777 .diary-comment .col {
782 /* Rules for the issues page */
784 .issues.issues-index {
790 /* Rules for the account confirmation page */
792 .accounts-terms-show {
794 padding: $lineheight;
795 margin-bottom: $lineheight;
804 list-style-type: lower-alpha;
809 /* Rules for user images */
821 img.user_thumbnail_tiny {
827 /* General styles for action lists / subnavs */
829 nav.secondary-actions {
842 border-left: 1px solid $grey;
843 padding-left: $lineheight * 0.5;
844 margin-right: $lineheight * 0.5;
845 margin-bottom: $lineheight * 0.125;
850 div.secondary-actions {
855 /* Rules for rich text */
859 background: var(--bs-secondary-bg);
864 background: var(--bs-secondary-bg);
866 white-space: pre-wrap;
874 padding: $lineheight;
875 background-color: var(--bs-tertiary-bg);
882 border-left: $lineheight solid var(--bs-tertiary-bg);
883 padding-left: $lineheight;
885 color: var(--bs-secondary-color);
889 /* Rules for the "About" page */
891 .site-about #content {
901 color: $vibrant-green;
907 background-position: 0 50%;
908 background-repeat: no-repeat;
909 background-image: image-url('about/osm.png');
910 background-size: cover;
911 background-color: $vibrant-green;
915 background: $vibrant-green;
919 display: inline-block;
926 /* Rules for tables with usernames */
928 .messages-table .username,
929 #block_list .username {
933 /* Rules for navigation tabs */
935 .nav-tabs .username {
939 .bg-body-secondary .nav-tabs {
940 --bs-border-color: var(--bs-secondary-border-subtle);
941 --bs-secondary-bg: var(--bs-secondary-border-subtle);
945 /* Rules for traces */
948 mix-blend-mode: darken;
951 @include color-mode(dark) {
954 mix-blend-mode: lighten;
958 /* Rules for map sidebar icons */
960 .browse-section .browse-element-list {
961 line-height: 1.25rem;
967 .d-flex > .browse-icon {
968 height: max(20px, 1.25rem);
971 @include color-mode(dark) {
972 .browse-icon-invertible {
973 filter: invert(.8) hue-rotate(180deg);
978 /* Rules for the social links */
980 @include color-mode(dark) {
986 /* Rules for the heatmap */
989 grid-template-columns: auto;
990 grid-auto-columns: minmax(1em, 1fr);
991 grid-template-rows: auto;
992 grid-auto-rows: minmax(1em, 1fr);
996 [data-date], [data-date] span {
1003 background-color: #ededed;
1005 background-color: #14432a;
1008 background-color: #4dd05a;
1011 box-shadow: 0px 0px 0px 1px #8884;
1016 @include color-mode(dark) {
1019 background-color: #2d333b;
1021 background-color: #4dd05a;
1024 background-color: #14432a;
1031 --bs-tooltip-max-width: none;