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,
561 input:not(:placeholder-shown) + .input-group-text .describe_location {
566 /* Rules for routing */
575 .routing_marker_column {
577 margin-right: .35rem;
585 /* Rules for the history sidebar */
587 .changeset-above-sidebar-viewport {
588 --changeset-border-color: #CC6655;
589 --changeset-fill-color: #DDBBBB;
590 --changeset-outline-color: #FFF4F4;
592 .changeset-in-sidebar-viewport {
593 --changeset-border-color: #FF9500;
594 --changeset-fill-color: #FFFFAF;
595 --changeset-outline-color: #FFFFFF;
596 &.changeset-highlight-outline {
597 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
600 .changeset-below-sidebar-viewport {
601 --changeset-border-color: #8888AA;
602 --changeset-fill-color: #CCCCDD;
603 --changeset-outline-color: #F4F4FF;
605 .changeset-highlight-outline {
606 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
609 #sidebar .changesets {
610 .changeset-color-hint-bar {
612 background: var(--changeset-border-color);
620 a.stretched-link > bdi, a:not(.stretched-link), [title] {
622 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
627 #sidebar .changeset_line .changeset_num_comments {
631 /* Rules for the browse sidebar */
637 tr > *:not([colspan]) {
638 white-space: pre-wrap;
639 word-wrap: break-word;
640 word-break: break-word;
648 .browse-element-list {
649 line-height: 1.25rem;
655 .d-flex > .browse-icon {
656 height: max(20px, 1.25rem);
665 @include color-mode(dark) {
666 #sidebar_content .browse-element-list .browse-icon-invertible {
667 filter: invert(.8) hue-rotate(180deg);
671 /* Force LTR/RTL alignment for placeholder text */
673 .form-control::placeholder {
677 /* Rules for export sidebar */
680 .export_area_inputs {
693 /* Rules for edit pages */
704 /* Rules for non-map content pages */
708 padding: $lineheight;
711 /* Rules for login and signup pages */
713 .sessions-new, .users-new, .users-create {
714 #content .content-inner {
719 .header-illustration {
720 background-position: right;
721 background-repeat: no-repeat;
729 background-image: image-url("sign-up-illustration.svg");
730 background-position-x: 70px;
734 background-image: image-url("confirm-illustration.svg");
738 background-image: image-url("terms-illustration.svg");
742 [dir=rtl] .header-illustration {
743 transform: scaleX(-1);
746 transform: scaleX(-1);
750 transform: scaleX(-1);
754 /* Rules for small maps in content areas */
758 margin-bottom: $lineheight;
761 @include media-breakpoint-up(md) {
767 /* Rules for the user map */
769 .content_map .leaflet-popup-content {
773 /* Rules for user popups on maps */
777 margin: 0 0 5px 0 !important;
782 /* Rules for the diary entry page */
789 .diary-comment .col-auto {
792 .diary-comment .col {
797 /* Rules for the issues page */
799 .issues.issues-index {
805 /* Rules for the account confirmation page */
807 .accounts-terms-show {
809 padding: $lineheight;
810 margin-bottom: $lineheight;
819 list-style-type: lower-alpha;
824 /* Rules for user images */
836 img.user_thumbnail_tiny {
842 /* General styles for action lists / subnavs */
844 nav.secondary-actions {
857 border-left: 1px solid $grey;
858 padding-left: $lineheight * 0.5;
859 margin-right: $lineheight * 0.5;
860 margin-bottom: $lineheight * 0.125;
865 div.secondary-actions {
870 /* Rules for rich text */
874 background: var(--bs-secondary-bg);
879 background: var(--bs-secondary-bg);
881 white-space: pre-wrap;
889 padding: $lineheight;
890 background-color: var(--bs-tertiary-bg);
897 border-left: $lineheight solid var(--bs-tertiary-bg);
898 padding-left: $lineheight;
900 color: var(--bs-secondary-color);
904 /* Rules for the "About" page */
906 .site-about #content {
916 color: $vibrant-green;
922 background-position: 0 50%;
923 background-repeat: no-repeat;
924 background-image: image-url('about/osm.png');
925 background-size: cover;
926 background-color: $vibrant-green;
930 background: $vibrant-green;
934 display: inline-block;
941 /* Rules for tables with usernames */
943 .messages-table .username,
944 #block_list .username {
948 /* Rules for navigation tabs */
950 .nav-tabs .username {
954 .bg-body-secondary .nav-tabs {
955 --bs-border-color: var(--bs-secondary-border-subtle);
956 --bs-secondary-bg: var(--bs-secondary-border-subtle);
960 /* Rules for traces */
963 mix-blend-mode: darken;
966 @include color-mode(dark) {
969 mix-blend-mode: lighten;
973 /* Rules for the heatmap */
976 grid-template-columns: auto;
977 grid-auto-columns: minmax(1em, 1fr);
978 grid-template-rows: auto;
979 grid-auto-rows: minmax(1em, 1fr);
983 [data-date], [data-date] span {
990 background-color: #ededed;
992 background-color: #14432a;
995 background-color: #4dd05a;
998 box-shadow: 0px 0px 0px 1px #8884;
1003 @include color-mode(dark) {
1006 background-color: #2d333b;
1008 background-color: #4dd05a;
1011 background-color: #14432a;
1018 --bs-tooltip-max-width: none;