4 @import "rails_bootstrap_forms";
7 $bootstrap-icons-font-dir: "bootstrap-icons/font/fonts";
8 @import "bootstrap-icons/font/bootstrap-icons";
10 /* Styles common to large and small screens */
12 /* Default rules for the body of every page */
15 font-size: $typeheight;
16 --dark-mode-map-filter: none;
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 */
74 fill: var(--bs-emphasis-color);
75 stroke: var(--bs-body-bg);
80 height: $headerHeight;
85 padding: $lineheight * 0.5;
89 height: $headerHeight;
91 gap: $lineheight * 0.5;
104 #edit_tab .btn-outline-primary {
105 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
109 .btn-outline-primary {
114 background-color: lighten($green, 30%);
119 // Small tweaks to the toggle to stop the primary colour showing through
120 // when the menu is shown
121 .show > .btn-outline-primary.dropdown-toggle {
122 background-color: $green;
123 border-color: $green;
126 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
141 nav.primary, nav.secondary {
144 background-color: $green;
150 #compact-secondary-nav {
157 min-height: $headerHeight;
160 display: none !important;
181 .user-menu, .login-menu {
186 #compact-secondary-nav {
190 .overlay-sidebar #sidebar {
198 /* Rules for language selector */
200 .select_language_list {
208 &:hover .current_locale_name {
209 text-decoration: underline;
214 /* Utility for styling notification numbers */
217 background: transparentize(lighten($green, 25%), .25);
219 font-weight: $font-weight-normal;
222 /* Rules for Leaflet maps */
224 .leaflet-top.leaflet-right,
225 .leaflet-top.leaflet-left {
229 flex-direction: column;
230 flex-wrap: wrap-reverse;
233 .leaflet-control .control-button {
239 background-color: rgba(0,0,0,.6);
244 background-color: black;
249 background-color: rgba(0,0,0,.5);
254 border-start-start-radius: 4px;
258 border-end-start-radius: 4px;
263 .leaflet-control.active .control-button {
264 background-color: $vibrant-green;
267 /* Rules for the sidebar and main map area */
287 width: $sidebarWidth;
290 .overlay-sidebar #sidebar {
300 .sidebar-close-controls,
314 width: $sidebarWidth;
329 .leaflet-marker-draggable {
334 animation: 1500ms forwards query-marker-fade;
336 @keyframes query-marker-fade {
352 @include media-breakpoint-down(md) {
367 .overlay-sidebar.overlay-right-sidebar {
387 box-sizing: content-box;
388 top: - map.get($border-widths, 4);
389 left: - map.get($border-widths, 4);
390 --bs-btn-border-color: var(--bs-body-bg);
393 --bs-btn-border-color: var(--bs-primary-border-subtle);
398 .form-check.disabled { color: $darkgrey; }
409 top: 10px !important;
411 margin-right: 0px !important;
412 margin-top: 0px !important;
416 .leaflet-popup-scrolled {
417 padding-right: $lineheight;
418 border-bottom: 0px !important;
419 border-top: 0px !important;
422 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
423 .leaflet-control-attribution, .leaflet-control-scale-line {
424 @extend .bg-body, .text-body;
427 .leaflet-control-attribution, .leaflet-control-scale-line {
428 @extend .bg-opacity-75;
429 text-shadow: none !important;
432 .leaflet-popup-content-wrapper {
436 color: var(--bs-link-color) !important;
440 @include color-mode(dark) {
441 .leaflet-container .leaflet-control-attribution a {
442 color: var(--bs-link-color);
445 .leaflet-control-scale-line {
446 border-color: rgba(var(--bs-light-rgb), .75) !important;
450 @mixin dark-map-color-scheme {
451 .leaflet-tile-container,
452 #legend .filtered-image {
453 filter: var(--dark-mode-map-filter);
456 .leaflet-tile-container .leaflet-tile {
461 body[data-map-theme="dark"] {
462 @include dark-map-color-scheme;
465 @include color-mode(dark) {
466 body:not([data-map-theme]) {
467 @include dark-map-color-scheme;
471 /* Rules for attribution text under the main map shown on printouts */
473 .donate-attr { color: darken($green, 10%) !important; }
475 /* Temporary label size override until we remove site-wide font customisation */
486 /* Stop bootstrap 5 from floating legends when they don't need to be */
491 /* Override the text colour for primary and secondary buttons, to match our
492 bootstrap 4 colours. Note this has accessibility issues, which is why
493 bootstrap 5 calculates black as the appropriate colour, and we should
494 reconsider our colours at some point with that in mind. */
497 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
501 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
504 .btn-outline-secondary {
505 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
508 /* Rules for the search and direction forms */
519 input:not(:placeholder-shown) + .input-group-text .describe_location {
524 /* Rules for search results */
526 .search_results_entry li.list-group-item {
527 border-right: 1em solid var(--marker-color);
530 .leaflet-marker-icon.activatable:is(.active, :hover) > svg {
531 transform: scale(1.5);
532 transform-origin: bottom;
535 /* Rules for routing */
544 .routing_marker_column {
546 margin-right: .35rem;
554 /* Rules for the history sidebar */
556 .changeset-above-sidebar-viewport {
557 --changeset-border-color: #CC6655;
558 --changeset-fill-color: #DDBBBB;
559 --changeset-outline-color: #FFF4F4;
561 .changeset-in-sidebar-viewport {
562 --changeset-border-color: #FF9500;
563 --changeset-fill-color: #FFFFAF;
564 --changeset-outline-color: #FFFFFF;
565 &.changeset-highlight-outline {
566 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
569 .changeset-below-sidebar-viewport {
570 --changeset-border-color: #8888AA;
571 --changeset-fill-color: #CCCCDD;
572 --changeset-outline-color: #F4F4FF;
574 .changeset-highlight-outline {
575 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
578 #sidebar .changesets {
579 .changeset-color-hint-bar {
581 background: var(--changeset-border-color);
589 a.stretched-link > bdi, a:not(.stretched-link), [title] {
591 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
596 #sidebar .changeset_line .changeset_num_comments {
600 /* Rules for the browse sidebar */
606 tr > *:not([colspan]) {
607 white-space: pre-wrap;
608 word-wrap: break-word;
609 word-break: break-word;
617 .browse-element-list {
618 line-height: 1.25rem;
624 .d-flex > .browse-icon {
625 height: max(20px, 1.25rem);
634 @include color-mode(dark) {
635 #sidebar_content .browse-element-list .browse-icon-invertible {
636 filter: invert(.8) hue-rotate(180deg);
640 /* Force LTR/RTL alignment for placeholder text */
642 .form-control::placeholder {
646 /* Rules for export sidebar */
649 .export_area_inputs {
662 /* Rules for edit pages */
673 /* Rules for non-map content pages */
677 padding: $lineheight;
680 /* Rules for login and signup pages */
682 .sessions-new, .users-new, .users-create {
683 #content .content-inner {
688 .header-illustration {
689 background-position: right;
690 background-repeat: no-repeat;
698 background-image: image-url("sign-up-illustration.svg");
699 background-position-x: 70px;
703 background-image: image-url("confirm-illustration.svg");
707 background-image: image-url("terms-illustration.svg");
711 [dir=rtl] .header-illustration {
712 transform: scaleX(-1);
715 transform: scaleX(-1);
719 transform: scaleX(-1);
723 /* Rules for small maps in content areas */
727 margin-bottom: $lineheight;
730 @include media-breakpoint-up(md) {
736 /* Rules for the user map */
738 .content_map .leaflet-popup-content {
742 /* Rules for user popups on maps */
746 margin: 0 0 5px 0 !important;
751 /* Rules for the diary entry page */
758 .diary-comment .col-auto {
761 .diary-comment .col {
766 /* Rules for the issues page */
768 .issues.issues-index {
774 /* Rules for the account confirmation page */
776 .accounts-terms-show {
778 padding: $lineheight;
779 margin-bottom: $lineheight;
788 list-style-type: lower-alpha;
793 /* Rules for user images */
805 img.user_thumbnail_tiny {
811 /* General styles for action lists / subnavs */
813 nav.secondary-actions {
826 border-left: 1px solid $grey;
827 padding-left: $lineheight * 0.5;
828 margin-right: $lineheight * 0.5;
829 margin-bottom: $lineheight * 0.125;
834 div.secondary-actions {
839 /* Rules for rich text */
843 background: var(--bs-secondary-bg);
848 background: var(--bs-secondary-bg);
850 white-space: pre-wrap;
858 padding: $lineheight;
859 background-color: var(--bs-tertiary-bg);
866 border-left: $lineheight solid var(--bs-tertiary-bg);
867 padding-left: $lineheight;
869 color: var(--bs-secondary-color);
873 /* Rules for the "About" page */
875 .site-about #content {
885 color: $vibrant-green;
891 background-position: 0 50%;
892 background-repeat: no-repeat;
893 background-image: image-url('about/osm.png');
894 background-size: cover;
895 background-color: $vibrant-green;
899 background: $vibrant-green;
903 display: inline-block;
910 /* Rules for tables with usernames */
912 .messages-table .username,
913 #block_list .username {
917 /* Rules for navigation tabs */
919 .nav-tabs .username {
923 .bg-body-secondary .nav-tabs {
924 --bs-border-color: var(--bs-secondary-border-subtle);
925 --bs-secondary-bg: var(--bs-secondary-border-subtle);
929 /* Rules for traces */
932 mix-blend-mode: darken;
935 @include color-mode(dark) {
938 mix-blend-mode: lighten;
942 /* Rules for the heatmap */
945 grid-template-columns: auto;
946 grid-auto-columns: minmax(1em, 1fr);
947 grid-template-rows: auto;
948 grid-auto-rows: minmax(1em, 1fr);
952 [data-date], [data-date] span {
959 background-color: #ededed;
961 background-color: #14432a;
964 background-color: #4dd05a;
967 box-shadow: 0px 0px 0px 1px #8884;
972 @include color-mode(dark) {
975 background-color: #2d333b;
977 background-color: #4dd05a;
980 background-color: #14432a;
987 --bs-tooltip-max-width: none;
990 /* Rules for auth provider logos */
992 .apple-logo rect { fill: black; }
993 .apple-logo path { fill: white; }
995 @media (prefers-color-scheme: dark) {
996 .apple-logo rect { fill: white; }
997 .apple-logo path { fill: black; }
1000 .github-logo rect { fill: white; }
1001 .github-logo path { fill: black; }
1003 @media (prefers-color-scheme: dark) {
1004 .github-logo rect { fill: black; }
1005 .github-logo path { fill: white; }
1008 /* Rules for contextmenu */
1013 background-color: $gray-200;
1020 &.cm_dropdown_menu {
1027 @media (prefers-color-scheme: dark) {
1031 background-color: $gray-700;