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 routing */
576 .routing_marker_column {
578 margin-right: .35rem;
586 /* Rules for the history sidebar */
588 .changeset-above-sidebar-viewport {
589 --changeset-border-color: #CC6655;
590 --changeset-fill-color: #DDBBBB;
591 --changeset-outline-color: #FFF4F4;
593 .changeset-in-sidebar-viewport {
594 --changeset-border-color: #FF9500;
595 --changeset-fill-color: #FFFFAF;
596 --changeset-outline-color: #FFFFFF;
597 &.changeset-highlight-outline {
598 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
601 .changeset-below-sidebar-viewport {
602 --changeset-border-color: #8888AA;
603 --changeset-fill-color: #CCCCDD;
604 --changeset-outline-color: #F4F4FF;
606 .changeset-highlight-outline {
607 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
610 #sidebar .changesets {
611 .changeset-color-hint-bar {
613 background: var(--changeset-border-color);
621 a.stretched-link > bdi, a:not(.stretched-link), [title] {
623 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
628 #sidebar .changeset_line .changeset_num_comments {
632 /* Rules for the browse sidebar */
638 tr > *:not([colspan]) {
639 white-space: pre-wrap;
640 word-wrap: break-word;
641 word-break: break-word;
649 .browse-element-list {
650 line-height: 1.25rem;
656 .d-flex > .browse-icon {
657 height: max(20px, 1.25rem);
666 @include color-mode(dark) {
667 #sidebar_content .browse-element-list .browse-icon-invertible {
668 filter: invert(.8) hue-rotate(180deg);
672 /* Force LTR/RTL alignment for placeholder text */
674 .form-control::placeholder {
678 /* Rules for export sidebar */
681 .export_area_inputs {
694 /* Rules for edit pages */
705 /* Rules for non-map content pages */
709 padding: $lineheight;
712 /* Rules for login and signup pages */
714 .sessions-new, .users-new, .users-create {
715 #content .content-inner {
720 .header-illustration {
721 background-position: right;
722 background-repeat: no-repeat;
730 background-image: image-url("sign-up-illustration.svg");
731 background-position-x: 70px;
735 background-image: image-url("confirm-illustration.svg");
739 background-image: image-url("terms-illustration.svg");
743 [dir=rtl] .header-illustration {
744 transform: scaleX(-1);
747 transform: scaleX(-1);
751 transform: scaleX(-1);
755 /* Rules for small maps in content areas */
759 margin-bottom: $lineheight;
762 @include media-breakpoint-up(md) {
768 /* Rules for the user map */
770 .content_map .leaflet-popup-content {
774 /* Rules for user popups on maps */
778 margin: 0 0 5px 0 !important;
783 /* Rules for the diary entry page */
790 .diary-comment .col-auto {
793 .diary-comment .col {
798 /* Rules for the issues page */
800 .issues.issues-index {
806 /* Rules for the account confirmation page */
808 .accounts-terms-show {
810 padding: $lineheight;
811 margin-bottom: $lineheight;
820 list-style-type: lower-alpha;
825 /* Rules for user images */
837 img.user_thumbnail_tiny {
843 /* General styles for action lists / subnavs */
845 nav.secondary-actions {
858 border-left: 1px solid $grey;
859 padding-left: $lineheight * 0.5;
860 margin-right: $lineheight * 0.5;
861 margin-bottom: $lineheight * 0.125;
866 div.secondary-actions {
871 /* Rules for rich text */
875 background: var(--bs-secondary-bg);
880 background: var(--bs-secondary-bg);
882 white-space: pre-wrap;
890 padding: $lineheight;
891 background-color: var(--bs-tertiary-bg);
898 border-left: $lineheight solid var(--bs-tertiary-bg);
899 padding-left: $lineheight;
901 color: var(--bs-secondary-color);
905 /* Rules for the "About" page */
907 .site-about #content {
917 color: $vibrant-green;
923 background-position: 0 50%;
924 background-repeat: no-repeat;
925 background-image: image-url('about/osm.png');
926 background-size: cover;
927 background-color: $vibrant-green;
931 background: $vibrant-green;
935 display: inline-block;
942 /* Rules for tables with usernames */
944 .messages-table .username,
945 #block_list .username {
949 /* Rules for navigation tabs */
951 .nav-tabs .username {
955 .bg-body-secondary .nav-tabs {
956 --bs-border-color: var(--bs-secondary-border-subtle);
957 --bs-secondary-bg: var(--bs-secondary-border-subtle);
961 /* Rules for traces */
964 mix-blend-mode: darken;
967 @include color-mode(dark) {
970 mix-blend-mode: lighten;
974 /* Rules for the heatmap */
977 grid-template-columns: auto;
978 grid-auto-columns: minmax(1em, 1fr);
979 grid-template-rows: auto;
980 grid-auto-rows: minmax(1em, 1fr);
984 [data-date], [data-date] span {
991 background-color: #ededed;
993 background-color: #14432a;
996 background-color: #4dd05a;
999 box-shadow: 0px 0px 0px 1px #8884;
1004 @include color-mode(dark) {
1007 background-color: #2d333b;
1009 background-color: #4dd05a;
1012 background-color: #14432a;
1019 --bs-tooltip-max-width: none;