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 */
72 background: image-url("menu-icon.svg") no-repeat;
73 background-size: 30px 30px;
79 @include color-mode(dark) {
86 height: $headerHeight;
91 padding: $lineheight * 0.5;
95 height: $headerHeight;
97 gap: $lineheight * 0.5;
110 #edit_tab .btn-outline-primary {
111 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
115 .btn-outline-primary {
120 background-color: lighten($green, 30%);
125 // Small tweaks to the toggle to stop the primary colour showing through
126 // when the menu is shown
127 .show > .btn-outline-primary.dropdown-toggle {
128 background-color: $green;
129 border-color: $green;
132 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
147 nav.primary, nav.secondary {
150 background-color: $green;
156 #compact-secondary-nav {
166 flex-direction: column;
168 min-height: $headerHeight;
171 display: none !important;
183 #sidebar .search_forms {
198 flex-direction: column;
202 justify-content: center;
205 .user-menu, .login-menu {
210 #compact-secondary-nav {
215 display: inline-block;
218 .overlay-sidebar #sidebar .welcome {
222 .overlay-sidebar #sidebar #banner {
227 /* Rules for language selector */
229 .select_language_list {
237 /* Utility for styling notification numbers */
240 background: transparentize(lighten($green, 25%), .25);
242 font-weight: $font-weight-normal;
245 /* Rules for Leaflet maps */
247 .leaflet-top.leaflet-right,
248 .leaflet-top.leaflet-left {
252 flex-direction: column;
253 flex-wrap: wrap-reverse;
256 .leaflet-control .control-button {
262 background-color: rgba(0,0,0,.6);
267 background-color: black;
272 background-color: rgba(0,0,0,.5);
277 border-start-start-radius: 4px;
281 border-end-start-radius: 4px;
286 .leaflet-control.active .control-button {
287 background-color: $vibrant-green;
290 /* Rules for the sidebar and main map area */
310 width: $sidebarWidth;
313 .overlay-sidebar #sidebar {
326 .sidebar-close-controls,
342 width: $sidebarWidth;
358 .leaflet-marker-draggable {
363 animation: 1500ms forwards query-marker-fade;
365 @keyframes query-marker-fade {
381 @include media-breakpoint-down(md) {
396 .overlay-sidebar.overlay-right-sidebar {
416 box-sizing: content-box;
417 top: - map.get($border-widths, 4);
418 left: - map.get($border-widths, 4);
419 --bs-btn-border-color: var(--bs-body-bg);
422 --bs-btn-border-color: var(--bs-primary-border-subtle);
427 .form-check.disabled { color: $darkgrey; }
438 top: 10px !important;
440 margin-right: 0px !important;
441 margin-top: 0px !important;
445 .leaflet-popup-scrolled {
446 padding-right: $lineheight;
447 border-bottom: 0px !important;
448 border-top: 0px !important;
451 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
452 .leaflet-contextmenu, .leaflet-contextmenu-item,
453 .leaflet-control-attribution, .leaflet-control-scale-line {
454 @extend .bg-body, .text-body;
457 .leaflet-control-attribution, .leaflet-control-scale-line {
458 @extend .bg-opacity-75;
459 text-shadow: none !important;
462 .leaflet-contextmenu-item.over {
463 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
466 .leaflet-popup-content-wrapper {
470 color: var(--bs-link-color) !important;
474 @include color-mode(dark) {
475 .leaflet-container .leaflet-control-attribution a {
476 color: var(--bs-link-color);
479 .leaflet-control-scale-line {
480 border-color: rgba(var(--bs-light-rgb), .75) !important;
484 @mixin dark-map-color-scheme {
485 .leaflet-tile-container,
486 #legend .filtered-image {
487 filter: var(--dark-mode-map-filter);
490 .leaflet-tile-container .leaflet-tile {
495 body[data-map-theme="dark"] {
496 @include dark-map-color-scheme;
499 @include color-mode(dark) {
500 body:not([data-map-theme]) {
501 @include dark-map-color-scheme;
505 /* Rules for attribution text under the main map shown on printouts */
507 .donate-attr { color: darken($green, 10%) !important; }
509 /* Temporary label size override until we remove site-wide font customisation */
520 /* Stop bootstrap 5 from floating legends when they don't need to be */
525 /* Override the text colour for primary and secondary buttons, to match our
526 bootstrap 4 colours. Note this has accessibility issues, which is why
527 bootstrap 5 calculates black as the appropriate colour, and we should
528 reconsider our colours at some point with that in mind. */
531 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
535 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
538 .btn-outline-secondary {
539 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
542 /* Rules for the search and direction forms */
544 header .search_forms,
554 input:not(:placeholder-shown) + .input-group-text .describe_location {
559 /* Rules for search results */
561 .search_results_entry li.list-group-item {
562 border-right: 1em solid var(--marker-color);
565 .leaflet-marker-icon:is(.active, :hover) > svg {
566 transform: scale(1.5);
567 transform-origin: bottom;
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;