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;
14 --marker-red: #f6110a;
15 --marker-green: #9cef11;
16 --marker-blue: #0b8ef1;
20 text-decoration: underline dotted;
23 /* Utility for de-emphasizing content */
25 .text-body-secondary a {
29 /* Bootstrap contextual table classes overrides in dark mode */
31 @include color-mode(dark) {
33 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
36 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
39 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
41 .table-primary, .table-secondary, .table-success {
42 --bs-table-color: initial;
43 border-color: inherit;
47 /* Utility for delayed loading spinner */
50 animation: 300ms linear forwards delayed-fade-in;
53 @keyframes delayed-fade-in {
59 /* Bootstrap close button overrides for nested light/dark themes */
61 [data-bs-theme="dark"],
62 [data-bs-theme] [data-bs-theme="dark"] {
63 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
66 [data-bs-theme="light"],
67 [data-bs-theme] [data-bs-theme="light"] {
68 --bs-btn-close-filter: none;
71 /* Rules for the header */
78 background: image-url("menu-icon.svg") no-repeat;
79 background-size: 30px 30px;
82 margin: 14px 10px 0 0;
86 @include color-mode(dark) {
93 height: $headerHeight;
98 padding: $lineheight * 0.5;
102 height: $headerHeight;
116 #edit_tab .btn-outline-primary {
117 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
121 .btn-outline-primary {
126 background-color: lighten($green, 30%);
131 // Small tweaks to the toggle to stop the primary colour showing through
132 // when the menu is shown
133 .show > .btn-outline-primary.dropdown-toggle {
134 background-color: $green;
135 border-color: $green;
138 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
153 nav.primary, nav.secondary {
156 background-color: $green;
162 #compact-secondary-nav {
172 flex-direction: column;
174 min-height: $headerHeight;
177 display: none !important;
189 #sidebar .search_forms {
204 flex-direction: column;
208 justify-content: center;
211 .user-menu, .login-menu {
216 #compact-secondary-nav {
221 display: inline-block;
224 .overlay-sidebar #sidebar .welcome {
228 .overlay-sidebar #sidebar #banner {
233 /* Rules for language selector */
235 button.d-md-none[data-bs-target="#select_language_dialog"] {
240 .select_language_list {
248 /* Utility for styling notification numbers */
251 background: transparentize(lighten($green, 25%), .25);
253 font-weight: $font-weight-normal;
256 /* Rules for Leaflet maps */
258 .leaflet-top.leaflet-right,
259 .leaflet-top.leaflet-left {
263 flex-direction: column;
264 flex-wrap: wrap-reverse;
267 .leaflet-control .control-button {
273 background-color: rgba(0,0,0,.6);
278 background-color: black;
283 background-color: rgba(0,0,0,.5);
288 border-start-start-radius: 4px;
292 border-end-start-radius: 4px;
297 .leaflet-control.active .control-button {
298 background-color: $vibrant-green;
301 /* Rules for the sidebar and main map area */
321 width: $sidebarWidth;
324 .overlay-sidebar #sidebar {
337 .sidebar-close-controls,
353 width: $sidebarWidth;
369 .leaflet-marker-draggable {
374 animation: 1500ms forwards query-marker-fade;
376 @keyframes query-marker-fade {
392 @include media-breakpoint-down(md) {
407 .overlay-sidebar.overlay-right-sidebar {
427 box-sizing: content-box;
428 top: - map.get($border-widths, 4);
429 left: - map.get($border-widths, 4);
430 --bs-btn-border-color: var(--bs-body-bg);
433 --bs-btn-border-color: var(--bs-primary-border-subtle);
438 .form-check.disabled { color: $darkgrey; }
449 top: 10px !important;
451 margin-right: 0px !important;
452 margin-top: 0px !important;
456 .leaflet-popup-scrolled {
457 padding-right: $lineheight;
458 border-bottom: 0px !important;
459 border-top: 0px !important;
462 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
463 .leaflet-contextmenu, .leaflet-contextmenu-item,
464 .leaflet-control-attribution, .leaflet-control-scale-line {
465 @extend .bg-body, .text-body;
468 .leaflet-control-attribution, .leaflet-control-scale-line {
469 @extend .bg-opacity-75;
470 text-shadow: none !important;
473 .leaflet-contextmenu-item.over {
474 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
477 .leaflet-popup-content-wrapper {
481 color: var(--bs-link-color) !important;
485 @include color-mode(dark) {
486 .leaflet-container .leaflet-control-attribution a {
487 color: var(--bs-link-color);
490 .leaflet-control-scale-line {
491 border-color: rgba(var(--bs-light-rgb), .75) !important;
495 @mixin dark-map-color-scheme {
496 .leaflet-tile-container,
497 #legend .filtered-image {
498 filter: var(--dark-mode-map-filter);
501 .leaflet-tile-container .leaflet-tile {
506 body[data-map-theme="dark"] {
507 @include dark-map-color-scheme;
510 @include color-mode(dark) {
511 body:not([data-map-theme]) {
512 @include dark-map-color-scheme;
516 /* Rules for attribution text under the main map shown on printouts */
518 .donate-attr { color: darken($green, 10%) !important; }
520 /* Temporary label size override until we remove site-wide font customisation */
531 /* Stop bootstrap 5 from floating legends when they don't need to be */
536 /* Override the text colour for primary and secondary buttons, to match our
537 bootstrap 4 colours. Note this has accessibility issues, which is why
538 bootstrap 5 calculates black as the appropriate colour, and we should
539 reconsider our colours at some point with that in mind. */
542 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
546 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
549 .btn-outline-secondary {
550 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
553 /* Rules for the search and direction forms */
555 header .search_forms,
565 input:not(:placeholder-shown) + .input-group-text .describe_location {
570 /* Rules for routing */
579 .routing_marker_column {
581 margin-right: .35rem;
589 /* Rules for the history sidebar */
591 .changeset-above-sidebar-viewport {
592 --changeset-border-color: #CC6655;
593 --changeset-fill-color: #DDBBBB;
594 --changeset-outline-color: #FFF4F4;
596 .changeset-in-sidebar-viewport {
597 --changeset-border-color: #FF9500;
598 --changeset-fill-color: #FFFFAF;
599 --changeset-outline-color: #FFFFFF;
600 &.changeset-highlight-outline {
601 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
604 .changeset-below-sidebar-viewport {
605 --changeset-border-color: #8888AA;
606 --changeset-fill-color: #CCCCDD;
607 --changeset-outline-color: #F4F4FF;
609 .changeset-highlight-outline {
610 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
613 #sidebar .changesets {
614 .changeset-color-hint-bar {
616 background: var(--changeset-border-color);
624 a.stretched-link > bdi, a:not(.stretched-link), [title] {
626 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
631 #sidebar .changeset_line .changeset_num_comments {
635 /* Rules for the browse sidebar */
641 tr > *:not([colspan]) {
642 white-space: pre-wrap;
643 word-wrap: break-word;
644 word-break: break-word;
652 .browse-element-list {
653 line-height: 1.25rem;
659 .d-flex > .browse-icon {
660 height: max(20px, 1.25rem);
669 @include color-mode(dark) {
670 #sidebar_content .browse-element-list .browse-icon-invertible {
671 filter: invert(.8) hue-rotate(180deg);
675 /* Force LTR/RTL alignment for placeholder text */
677 .form-control::placeholder {
681 /* Rules for export sidebar */
684 .export_area_inputs {
697 /* Rules for edit pages */
708 /* Rules for non-map content pages */
712 padding: $lineheight;
715 /* Rules for login and signup pages */
717 .sessions-new, .users-new, .users-create {
718 #content .content-inner {
723 .header-illustration {
724 background-position: right;
725 background-repeat: no-repeat;
733 background-image: image-url("sign-up-illustration.svg");
734 background-position-x: 70px;
738 background-image: image-url("confirm-illustration.svg");
742 background-image: image-url("terms-illustration.svg");
746 [dir=rtl] .header-illustration {
747 transform: scaleX(-1);
750 transform: scaleX(-1);
754 transform: scaleX(-1);
758 /* Rules for small maps in content areas */
762 margin-bottom: $lineheight;
765 @include media-breakpoint-up(md) {
771 /* Rules for the user map */
773 .content_map .leaflet-popup-content {
777 /* Rules for user popups on maps */
781 margin: 0 0 5px 0 !important;
786 /* Rules for the diary entry page */
793 .diary-comment .col-auto {
796 .diary-comment .col {
801 /* Rules for the issues page */
803 .issues.issues-index {
809 /* Rules for the account confirmation page */
811 .accounts-terms-show {
813 padding: $lineheight;
814 margin-bottom: $lineheight;
823 list-style-type: lower-alpha;
828 /* Rules for user images */
840 img.user_thumbnail_tiny {
846 /* General styles for action lists / subnavs */
848 nav.secondary-actions {
861 border-left: 1px solid $grey;
862 padding-left: $lineheight * 0.5;
863 margin-right: $lineheight * 0.5;
864 margin-bottom: $lineheight * 0.125;
869 div.secondary-actions {
874 /* Rules for rich text */
878 background: var(--bs-secondary-bg);
883 background: var(--bs-secondary-bg);
885 white-space: pre-wrap;
893 padding: $lineheight;
894 background-color: var(--bs-tertiary-bg);
901 border-left: $lineheight solid var(--bs-tertiary-bg);
902 padding-left: $lineheight;
904 color: var(--bs-secondary-color);
908 /* Rules for the "About" page */
910 .site-about #content {
920 color: $vibrant-green;
926 background-position: 0 50%;
927 background-repeat: no-repeat;
928 background-image: image-url('about/osm.png');
929 background-size: cover;
930 background-color: $vibrant-green;
934 background: $vibrant-green;
938 display: inline-block;
945 /* Rules for tables with usernames */
947 .messages-table .username,
948 #block_list .username {
952 /* Rules for navigation tabs */
954 .nav-tabs .username {
958 .bg-body-secondary .nav-tabs {
959 --bs-border-color: var(--bs-secondary-border-subtle);
960 --bs-secondary-bg: var(--bs-secondary-border-subtle);
964 /* Rules for traces */
967 mix-blend-mode: darken;
970 @include color-mode(dark) {
973 mix-blend-mode: lighten;
977 /* Rules for the heatmap */
980 grid-template-columns: auto;
981 grid-auto-columns: minmax(1em, 1fr);
982 grid-template-rows: auto;
983 grid-auto-rows: minmax(1em, 1fr);
987 [data-date], [data-date] span {
994 background-color: #ededed;
996 background-color: #14432a;
999 background-color: #4dd05a;
1002 box-shadow: 0px 0px 0px 1px #8884;
1007 @include color-mode(dark) {
1010 background-color: #2d333b;
1012 background-color: #4dd05a;
1015 background-color: #14432a;
1022 --bs-tooltip-max-width: none;