4 @import "rails_bootstrap_forms";
7 /* Styles common to large and small screens */
9 /* Default rules for the body of every page */
12 font-size: $typeheight;
13 --dark-mode-map-filter: none;
17 text-decoration: underline dotted;
20 /* Utility for de-emphasizing content */
22 .text-body-secondary a {
26 /* Bootstrap contextual table classes overrides in dark mode */
28 @include color-mode(dark) {
30 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
33 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
36 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
38 .table-primary, .table-secondary, .table-success {
39 --bs-table-color: initial;
40 border-color: inherit;
44 /* Utility for delayed loading spinner */
47 animation: 300ms linear forwards delayed-fade-in;
50 @keyframes delayed-fade-in {
56 /* Bootstrap close button overrides for nested light/dark themes */
58 [data-bs-theme="dark"],
59 [data-bs-theme] [data-bs-theme="dark"] {
60 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
63 [data-bs-theme="light"],
64 [data-bs-theme] [data-bs-theme="light"] {
65 --bs-btn-close-filter: none;
68 /* Rules for the header */
75 background: image-url("menu-icon.svg") no-repeat;
76 background-size: 30px 30px;
79 margin: 14px 10px 0 0;
83 @include color-mode(dark) {
90 height: $headerHeight;
95 padding: $lineheight * 0.5;
99 height: $headerHeight;
113 #edit_tab .btn-outline-primary {
114 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
118 .btn-outline-primary {
123 background-color: lighten($green, 30%);
128 // Small tweaks to the toggle to stop the primary colour showing through
129 // when the menu is shown
130 .show > .btn-outline-primary.dropdown-toggle {
131 background-color: $green;
132 border-color: $green;
135 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
150 nav.primary, nav.secondary {
153 background-color: $green;
159 #compact-secondary-nav {
169 flex-direction: column;
171 min-height: $headerHeight;
174 display: none !important;
186 #sidebar .search_forms {
201 flex-direction: column;
205 justify-content: center;
208 .user-menu, .login-menu {
213 #compact-secondary-nav {
218 display: inline-block;
221 .overlay-sidebar #sidebar .welcome {
225 .overlay-sidebar #sidebar #banner {
230 /* Rules for language selector */
232 button.d-md-none[data-bs-target="#select_language_dialog"] {
237 .select_language_list {
245 /* Utility for styling notification numbers */
248 background: transparentize(lighten($green, 25%), .25);
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 {
270 background-color: rgba(0,0,0,.6);
275 background-color: black;
280 background-color: rgba(0,0,0,.5);
285 border-start-start-radius: 4px;
289 border-end-start-radius: 4px;
294 .leaflet-control.active .control-button {
295 background-color: $vibrant-green;
298 /* Rules for the sidebar and main map area */
318 width: $sidebarWidth;
321 .overlay-sidebar #sidebar {
334 .sidebar-close-controls,
350 width: $sidebarWidth;
366 .leaflet-marker-draggable {
371 animation: 1500ms forwards query-marker-fade;
373 @keyframes query-marker-fade {
389 @include media-breakpoint-down(md) {
404 .overlay-sidebar.overlay-right-sidebar {
424 box-sizing: content-box;
425 top: - map.get($border-widths, 4);
426 left: - map.get($border-widths, 4);
427 --bs-btn-border-color: var(--bs-body-bg);
430 --bs-btn-border-color: var(--bs-primary-border-subtle);
435 .form-check.disabled { color: $darkgrey; }
446 top: 10px !important;
448 margin-right: 0px !important;
449 margin-top: 0px !important;
453 .leaflet-popup-scrolled {
454 padding-right: $lineheight;
455 border-bottom: 0px !important;
456 border-top: 0px !important;
459 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
460 .leaflet-contextmenu, .leaflet-contextmenu-item,
461 .leaflet-control-attribution, .leaflet-control-scale-line {
462 @extend .bg-body, .text-body;
465 .leaflet-control-attribution, .leaflet-control-scale-line {
466 @extend .bg-opacity-75;
467 text-shadow: none !important;
470 .leaflet-contextmenu-item.over {
471 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
474 .leaflet-popup-content-wrapper {
478 color: var(--bs-link-color) !important;
482 @include color-mode(dark) {
483 .leaflet-container .leaflet-control-attribution a {
484 color: var(--bs-link-color);
487 .leaflet-control-scale-line {
488 border-color: rgba(var(--bs-light-rgb), .75) !important;
492 @mixin dark-map-color-scheme {
493 .leaflet-tile-container,
494 #legend .filtered-image {
495 filter: var(--dark-mode-map-filter);
498 .leaflet-tile-container .leaflet-tile {
503 body[data-map-theme="dark"] {
504 @include dark-map-color-scheme;
507 @include color-mode(dark) {
508 body:not([data-map-theme]) {
509 @include dark-map-color-scheme;
513 /* Rules for attribution text under the main map shown on printouts */
515 .donate-attr { color: darken($green, 10%) !important; }
517 /* Temporary label size override until we remove site-wide font customisation */
528 /* Stop bootstrap 5 from floating legends when they don't need to be */
533 /* Override the text colour for primary and secondary buttons, to match our
534 bootstrap 4 colours. Note this has accessibility issues, which is why
535 bootstrap 5 calculates black as the appropriate colour, and we should
536 reconsider our colours at some point with that in mind. */
539 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
543 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
546 .btn-outline-secondary {
547 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
550 /* Rules for the search and direction forms */
552 header .search_forms,
562 input:not(:placeholder-shown) + .input-group-text .describe_location {
567 /* Rules for search results */
569 .search_results_entry li.list-group-item {
570 border-right: 1em solid var(--marker-color);
573 .leaflet-marker-icon:is(.active, :hover) > svg {
574 transform: scale(1.5);
575 transform-origin: bottom;
578 /* Rules for routing */
587 .routing_marker_column {
589 margin-right: .35rem;
597 /* Rules for the history sidebar */
599 .changeset-above-sidebar-viewport {
600 --changeset-border-color: #CC6655;
601 --changeset-fill-color: #DDBBBB;
602 --changeset-outline-color: #FFF4F4;
604 .changeset-in-sidebar-viewport {
605 --changeset-border-color: #FF9500;
606 --changeset-fill-color: #FFFFAF;
607 --changeset-outline-color: #FFFFFF;
608 &.changeset-highlight-outline {
609 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
612 .changeset-below-sidebar-viewport {
613 --changeset-border-color: #8888AA;
614 --changeset-fill-color: #CCCCDD;
615 --changeset-outline-color: #F4F4FF;
617 .changeset-highlight-outline {
618 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
621 #sidebar .changesets {
622 .changeset-color-hint-bar {
624 background: var(--changeset-border-color);
632 a.stretched-link > bdi, a:not(.stretched-link), [title] {
634 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
639 #sidebar .changeset_line .changeset_num_comments {
643 /* Rules for the browse sidebar */
649 tr > *:not([colspan]) {
650 white-space: pre-wrap;
651 word-wrap: break-word;
652 word-break: break-word;
660 .browse-element-list {
661 line-height: 1.25rem;
667 .d-flex > .browse-icon {
668 height: max(20px, 1.25rem);
677 @include color-mode(dark) {
678 #sidebar_content .browse-element-list .browse-icon-invertible {
679 filter: invert(.8) hue-rotate(180deg);
683 /* Force LTR/RTL alignment for placeholder text */
685 .form-control::placeholder {
689 /* Rules for export sidebar */
692 .export_area_inputs {
705 /* Rules for edit pages */
716 /* Rules for non-map content pages */
720 padding: $lineheight;
723 /* Rules for login and signup pages */
725 .sessions-new, .users-new, .users-create {
726 #content .content-inner {
731 .header-illustration {
732 background-position: right;
733 background-repeat: no-repeat;
741 background-image: image-url("sign-up-illustration.svg");
742 background-position-x: 70px;
746 background-image: image-url("confirm-illustration.svg");
750 background-image: image-url("terms-illustration.svg");
754 [dir=rtl] .header-illustration {
755 transform: scaleX(-1);
758 transform: scaleX(-1);
762 transform: scaleX(-1);
766 /* Rules for small maps in content areas */
770 margin-bottom: $lineheight;
773 @include media-breakpoint-up(md) {
779 /* Rules for the user map */
781 .content_map .leaflet-popup-content {
785 /* Rules for user popups on maps */
789 margin: 0 0 5px 0 !important;
794 /* Rules for the diary entry page */
801 .diary-comment .col-auto {
804 .diary-comment .col {
809 /* Rules for the issues page */
811 .issues.issues-index {
817 /* Rules for the account confirmation page */
819 .accounts-terms-show {
821 padding: $lineheight;
822 margin-bottom: $lineheight;
831 list-style-type: lower-alpha;
836 /* Rules for user images */
848 img.user_thumbnail_tiny {
854 /* General styles for action lists / subnavs */
856 nav.secondary-actions {
869 border-left: 1px solid $grey;
870 padding-left: $lineheight * 0.5;
871 margin-right: $lineheight * 0.5;
872 margin-bottom: $lineheight * 0.125;
877 div.secondary-actions {
882 /* Rules for rich text */
886 background: var(--bs-secondary-bg);
891 background: var(--bs-secondary-bg);
893 white-space: pre-wrap;
901 padding: $lineheight;
902 background-color: var(--bs-tertiary-bg);
909 border-left: $lineheight solid var(--bs-tertiary-bg);
910 padding-left: $lineheight;
912 color: var(--bs-secondary-color);
916 /* Rules for the "About" page */
918 .site-about #content {
928 color: $vibrant-green;
934 background-position: 0 50%;
935 background-repeat: no-repeat;
936 background-image: image-url('about/osm.png');
937 background-size: cover;
938 background-color: $vibrant-green;
942 background: $vibrant-green;
946 display: inline-block;
953 /* Rules for tables with usernames */
955 .messages-table .username,
956 #block_list .username {
960 /* Rules for navigation tabs */
962 .nav-tabs .username {
966 .bg-body-secondary .nav-tabs {
967 --bs-border-color: var(--bs-secondary-border-subtle);
968 --bs-secondary-bg: var(--bs-secondary-border-subtle);
972 /* Rules for traces */
975 mix-blend-mode: darken;
978 @include color-mode(dark) {
981 mix-blend-mode: lighten;
985 /* Rules for the heatmap */
988 grid-template-columns: auto;
989 grid-auto-columns: minmax(1em, 1fr);
990 grid-template-rows: auto;
991 grid-auto-rows: minmax(1em, 1fr);
995 [data-date], [data-date] span {
1002 background-color: #ededed;
1004 background-color: #14432a;
1007 background-color: #4dd05a;
1010 box-shadow: 0px 0px 0px 1px #8884;
1015 @include color-mode(dark) {
1018 background-color: #2d333b;
1020 background-color: #4dd05a;
1023 background-color: #14432a;
1030 --bs-tooltip-max-width: none;