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 @each $anchor, $border in (
428 .maplibregl-popup#{'[class*="anchor-#{$anchor}"]'} .maplibregl-popup-tip {
429 border-#{$border}-color: var(--bs-body-bg);
433 .maplibregl-popup-content,
434 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
435 .leaflet-control-attribution, .leaflet-control-scale-line {
436 @extend .bg-body, .text-body;
439 .leaflet-control-attribution, .leaflet-control-scale-line {
440 @extend .bg-opacity-75;
441 text-shadow: none !important;
444 .leaflet-popup-content-wrapper {
448 color: var(--bs-link-color) !important;
452 @include color-mode(dark) {
453 .leaflet-container .leaflet-control-attribution a {
454 color: var(--bs-link-color);
457 .leaflet-control-scale-line {
458 border-color: rgba(var(--bs-light-rgb), .75) !important;
462 @mixin dark-map-color-scheme {
463 .leaflet-tile-container,
464 #legend .filtered-image {
465 filter: var(--dark-mode-map-filter);
468 .leaflet-tile-container .leaflet-tile {
473 body[data-map-theme="dark"] {
474 @include dark-map-color-scheme;
477 @include color-mode(dark) {
478 body:not([data-map-theme]) {
479 @include dark-map-color-scheme;
483 /* Rules for attribution text under the main map shown on printouts */
485 .donate-attr { color: darken($green, 10%) !important; }
487 /* Temporary label size override until we remove site-wide font customisation */
498 /* Stop bootstrap 5 from floating legends when they don't need to be */
503 /* Override the text colour for primary and secondary buttons, to match our
504 bootstrap 4 colours. Note this has accessibility issues, which is why
505 bootstrap 5 calculates black as the appropriate colour, and we should
506 reconsider our colours at some point with that in mind. */
509 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
513 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
516 .btn-outline-secondary {
517 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
520 /* Rules for the search and direction forms */
531 input:not(:placeholder-shown) + .input-group-text .describe_location {
536 /* Rules for search results */
538 .search_results_entry li.list-group-item {
539 border-right: 1em solid var(--marker-color);
542 .leaflet-marker-icon.activatable:is(.active, :hover) > svg {
543 transform: scale(1.5);
544 transform-origin: bottom;
547 /* Rules for routing */
556 .routing_marker_column {
558 margin-right: .35rem;
566 /* Rules for the history sidebar */
568 .changeset-above-sidebar-viewport {
569 --changeset-border-color: #CC6655;
570 --changeset-fill-color: #DDBBBB;
571 --changeset-outline-color: #FFF4F4;
573 .changeset-in-sidebar-viewport {
574 --changeset-border-color: #FF9500;
575 --changeset-fill-color: #FFFFAF;
576 --changeset-outline-color: #FFFFFF;
577 &.changeset-highlight-outline {
578 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
581 .changeset-below-sidebar-viewport {
582 --changeset-border-color: #8888AA;
583 --changeset-fill-color: #CCCCDD;
584 --changeset-outline-color: #F4F4FF;
586 .changeset-highlight-outline {
587 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
590 #sidebar .changesets {
591 .changeset-color-hint-bar {
593 background: var(--changeset-border-color);
601 a.stretched-link > bdi, a:not(.stretched-link), [title] {
603 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
608 #sidebar .changeset_line .changeset_num_comments {
612 /* Rules for the browse sidebar */
618 tr > *:not([colspan]) {
619 white-space: pre-wrap;
620 word-wrap: break-word;
621 word-break: break-word;
629 .browse-element-list {
630 line-height: 1.25rem;
636 .d-flex > .browse-icon {
637 height: max(20px, 1.25rem);
646 @include color-mode(dark) {
647 #sidebar_content .browse-element-list .browse-icon-invertible {
648 filter: invert(.8) hue-rotate(180deg);
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;
849 div.secondary-actions {
854 /* Rules for rich text */
858 background: var(--bs-secondary-bg);
863 background: var(--bs-secondary-bg);
865 white-space: pre-wrap;
873 padding: $lineheight;
874 background-color: var(--bs-tertiary-bg);
881 border-left: $lineheight solid var(--bs-tertiary-bg);
882 padding-left: $lineheight;
884 color: var(--bs-secondary-color);
888 /* Rules for the "About" page */
890 .site-about #content {
900 color: $vibrant-green;
906 background-position: 0 50%;
907 background-repeat: no-repeat;
908 background-image: image-url('about/osm.png');
909 background-size: cover;
910 background-color: $vibrant-green;
914 background: $vibrant-green;
918 display: inline-block;
925 /* Rules for tables with usernames */
927 .messages-table .username,
928 #block_list .username {
932 /* Rules for navigation tabs */
934 .nav-tabs .username {
938 .bg-body-secondary .nav-tabs {
939 --bs-border-color: var(--bs-secondary-border-subtle);
940 --bs-secondary-bg: var(--bs-secondary-border-subtle);
944 /* Rules for traces */
947 mix-blend-mode: darken;
950 @include color-mode(dark) {
953 mix-blend-mode: lighten;
957 /* Rules for the heatmap */
960 grid-template-columns: auto;
961 grid-auto-columns: minmax(1em, 1fr);
962 grid-template-rows: auto;
963 grid-auto-rows: minmax(1em, 1fr);
967 [data-date], [data-date] span {
974 background-color: #ededed;
976 background-color: #14432a;
979 background-color: #4dd05a;
982 box-shadow: 0px 0px 0px 1px #8884;
987 @include color-mode(dark) {
990 background-color: #2d333b;
992 background-color: #4dd05a;
995 background-color: #14432a;
1002 --bs-tooltip-max-width: none;
1005 /* Rules for auth provider logos */
1007 .apple-logo rect { fill: black; }
1008 .apple-logo path { fill: white; }
1010 @include color-mode(dark) {
1011 .apple-logo rect { fill: white; }
1012 .apple-logo path { fill: black; }
1015 .github-logo rect { fill: black; }
1016 .github-logo path { fill: white; }
1018 @include color-mode(dark) {
1019 .github-logo rect { fill: white; }
1020 .github-logo path { fill: #1b1f24; }
1023 /* Rules for contextmenu */
1030 &.cm_dropdown_menu {