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 {
240 /* Utility for styling notification numbers */
243 background: transparentize(lighten($green, 25%), .25);
245 font-weight: $font-weight-normal;
248 /* Rules for Leaflet maps */
250 .leaflet-top.leaflet-right,
251 .leaflet-top.leaflet-left {
255 flex-direction: column;
256 flex-wrap: wrap-reverse;
259 .leaflet-control .control-button {
265 background-color: rgba(0,0,0,.6);
270 background-color: black;
275 background-color: rgba(0,0,0,.5);
280 border-start-start-radius: 4px;
284 border-end-start-radius: 4px;
289 .leaflet-control.active .control-button {
290 background-color: $vibrant-green;
293 /* Rules for the sidebar and main map area */
313 width: $sidebarWidth;
316 .overlay-sidebar #sidebar {
329 .sidebar-close-controls,
345 width: $sidebarWidth;
361 .leaflet-marker-draggable {
366 animation: 1500ms forwards query-marker-fade;
368 @keyframes query-marker-fade {
384 @include media-breakpoint-down(md) {
399 .overlay-sidebar.overlay-right-sidebar {
419 box-sizing: content-box;
420 top: - map.get($border-widths, 4);
421 left: - map.get($border-widths, 4);
422 --bs-btn-border-color: var(--bs-body-bg);
425 --bs-btn-border-color: var(--bs-primary-border-subtle);
430 .form-check.disabled { color: $darkgrey; }
441 top: 10px !important;
443 margin-right: 0px !important;
444 margin-top: 0px !important;
448 .leaflet-popup-scrolled {
449 padding-right: $lineheight;
450 border-bottom: 0px !important;
451 border-top: 0px !important;
454 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
455 .leaflet-contextmenu, .leaflet-contextmenu-item,
456 .leaflet-control-attribution, .leaflet-control-scale-line {
457 @extend .bg-body, .text-body;
460 .leaflet-control-attribution, .leaflet-control-scale-line {
461 @extend .bg-opacity-75;
462 text-shadow: none !important;
465 .leaflet-contextmenu-item.over {
466 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
469 .leaflet-popup-content-wrapper {
473 color: var(--bs-link-color) !important;
477 @include color-mode(dark) {
478 .leaflet-container .leaflet-control-attribution a {
479 color: var(--bs-link-color);
482 .leaflet-control-scale-line {
483 border-color: rgba(var(--bs-light-rgb), .75) !important;
487 @mixin dark-map-color-scheme {
488 .leaflet-tile-container,
489 #legend .filtered-image {
490 filter: var(--dark-mode-map-filter);
493 .leaflet-tile-container .leaflet-tile {
498 body[data-map-theme="dark"] {
499 @include dark-map-color-scheme;
502 @include color-mode(dark) {
503 body:not([data-map-theme]) {
504 @include dark-map-color-scheme;
508 /* Rules for attribution text under the main map shown on printouts */
510 .donate-attr { color: darken($green, 10%) !important; }
512 /* Temporary label size override until we remove site-wide font customisation */
523 /* Stop bootstrap 5 from floating legends when they don't need to be */
528 /* Override the text colour for primary and secondary buttons, to match our
529 bootstrap 4 colours. Note this has accessibility issues, which is why
530 bootstrap 5 calculates black as the appropriate colour, and we should
531 reconsider our colours at some point with that in mind. */
534 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
538 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
541 .btn-outline-secondary {
542 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
545 /* Rules for the search and direction forms */
547 header .search_forms,
558 /* Rules for routing */
567 .routing_marker_column {
569 margin-right: .35rem;
577 /* Rules for the history sidebar */
579 .changeset-above-sidebar-viewport {
580 --changeset-border-color: #CC6655;
581 --changeset-fill-color: #DDBBBB;
582 --changeset-outline-color: #FFF4F4;
584 .changeset-in-sidebar-viewport {
585 --changeset-border-color: #FF9500;
586 --changeset-fill-color: #FFFFAF;
587 --changeset-outline-color: #FFFFFF;
588 &.changeset-highlight-outline {
589 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
592 .changeset-below-sidebar-viewport {
593 --changeset-border-color: #8888AA;
594 --changeset-fill-color: #CCCCDD;
595 --changeset-outline-color: #F4F4FF;
597 .changeset-highlight-outline {
598 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
601 #sidebar .changesets {
602 .changeset-color-hint-bar {
604 background: var(--changeset-border-color);
612 a.stretched-link > bdi, a:not(.stretched-link), [title] {
614 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
619 /* Rules for the browse sidebar */
623 padding-bottom: $spacer;
624 margin-bottom: $spacer;
625 border-bottom: 1px solid $grey;
628 word-wrap: break-word;
632 .browse-section:last-of-type {
638 white-space: pre-wrap;
639 word-wrap: break-word;
640 word-break: break-word;
642 tr:last-child th, tr:last-child td {
652 /* Force LTR/RTL alignment for placeholder text */
654 .form-control::placeholder {
658 /* Rules for export sidebar */
661 .export_area_inputs {
674 /* Rules for edit pages */
685 /* Rules for non-map content pages */
689 padding: $lineheight;
692 /* Rules for login and signup pages */
694 .sessions-new, .users-new, .users-create {
695 #content .content-inner {
700 .header-illustration {
701 background-position: right;
702 background-repeat: no-repeat;
710 background-image: image-url("sign-up-illustration.svg");
711 background-position-x: 70px;
715 background-image: image-url("confirm-illustration.svg");
719 background-image: image-url("terms-illustration.svg");
723 [dir=rtl] .header-illustration {
724 transform: scaleX(-1);
727 transform: scaleX(-1);
731 transform: scaleX(-1);
735 /* Rules for small maps in content areas */
739 margin-bottom: $lineheight;
742 @include media-breakpoint-up(md) {
748 /* Rules for the user map */
750 .content_map .leaflet-popup-content {
754 /* Rules for user popups on maps */
758 margin: 0 0 5px 0 !important;
763 /* Rules for the diary entry page */
770 .diary-comment .col-auto {
773 .diary-comment .col {
778 /* Rules for the issues page */
780 .issues.issues-index {
786 /* Rules for the account confirmation page */
788 .accounts-terms-show {
790 padding: $lineheight;
791 margin-bottom: $lineheight;
800 list-style-type: lower-alpha;
805 /* Rules for user images */
817 img.user_thumbnail_tiny {
823 /* General styles for action lists / subnavs */
825 nav.secondary-actions {
838 border-left: 1px solid $grey;
839 padding-left: $lineheight * 0.5;
840 margin-right: $lineheight * 0.5;
841 margin-bottom: $lineheight * 0.125;
846 div.secondary-actions {
851 /* Rules for rich text */
855 background: var(--bs-secondary-bg);
860 background: var(--bs-secondary-bg);
862 white-space: pre-wrap;
870 padding: $lineheight;
871 background-color: var(--bs-tertiary-bg);
878 border-left: $lineheight solid var(--bs-tertiary-bg);
879 padding-left: $lineheight;
881 color: var(--bs-secondary-color);
885 /* Rules for the "About" page */
887 .site-about #content {
897 color: $vibrant-green;
903 background-position: 0 50%;
904 background-repeat: no-repeat;
905 background-image: image-url('about/osm.png');
906 background-size: cover;
907 background-color: $vibrant-green;
911 background: $vibrant-green;
915 display: inline-block;
922 /* Rules for tables with usernames */
924 .messages-table .username,
925 #block_list .username {
929 /* Rules for navigation tabs */
931 .nav-tabs .username {
935 .bg-body-secondary .nav-tabs {
936 --bs-border-color: var(--bs-secondary-border-subtle);
937 --bs-secondary-bg: var(--bs-secondary-border-subtle);
941 /* Rules for traces */
944 mix-blend-mode: darken;
947 @include color-mode(dark) {
950 mix-blend-mode: lighten;
954 /* Rules for map sidebar icons */
956 .browse-section .browse-element-list {
957 line-height: 1.25rem;
963 .d-flex > .browse-icon {
964 height: max(20px, 1.25rem);
967 @include color-mode(dark) {
968 .browse-icon-invertible {
969 filter: invert(.8) hue-rotate(180deg);
974 /* Rules for the social links */
976 @include color-mode(dark) {
982 /* Rules for the heatmap */
985 grid-template-columns: auto;
986 grid-auto-columns: minmax(1em, 1fr);
987 grid-template-rows: auto;
988 grid-auto-rows: minmax(1em, 1fr);
992 [data-date], [data-date] span {
999 background-color: #ededed;
1001 background-color: #14432a;
1004 background-color: #4dd05a;
1007 box-shadow: 0px 0px 0px 1px #8884;
1012 @include color-mode(dark) {
1015 background-color: #2d333b;
1017 background-color: #4dd05a;
1020 background-color: #14432a;
1027 --bs-tooltip-max-width: none;