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 */
71 fill: var(--bs-emphasis-color);
72 stroke: var(--bs-body-bg);
77 height: $headerHeight;
82 padding: $lineheight * 0.5;
86 height: $headerHeight;
88 gap: $lineheight * 0.5;
101 #edit_tab .btn-outline-primary {
102 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
106 .btn-outline-primary {
111 background-color: lighten($green, 30%);
116 // Small tweaks to the toggle to stop the primary colour showing through
117 // when the menu is shown
118 .show > .btn-outline-primary.dropdown-toggle {
119 background-color: $green;
120 border-color: $green;
123 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
138 nav.primary, nav.secondary {
141 background-color: $green;
147 #compact-secondary-nav {
154 min-height: $headerHeight;
157 display: none !important;
178 .user-menu, .login-menu {
183 #compact-secondary-nav {
187 .overlay-sidebar #sidebar {
195 /* Rules for language selector */
197 .select_language_list {
205 /* Utility for styling notification numbers */
208 background: transparentize(lighten($green, 25%), .25);
210 font-weight: $font-weight-normal;
213 /* Rules for Leaflet maps */
215 .leaflet-top.leaflet-right,
216 .leaflet-top.leaflet-left {
220 flex-direction: column;
221 flex-wrap: wrap-reverse;
224 .leaflet-control .control-button {
230 background-color: rgba(0,0,0,.6);
235 background-color: black;
240 background-color: rgba(0,0,0,.5);
245 border-start-start-radius: 4px;
249 border-end-start-radius: 4px;
254 .leaflet-control.active .control-button {
255 background-color: $vibrant-green;
258 /* Rules for the sidebar and main map area */
278 width: $sidebarWidth;
281 .overlay-sidebar #sidebar {
291 .sidebar-close-controls,
305 width: $sidebarWidth;
320 .leaflet-marker-draggable {
325 animation: 1500ms forwards query-marker-fade;
327 @keyframes query-marker-fade {
343 @include media-breakpoint-down(md) {
358 .overlay-sidebar.overlay-right-sidebar {
378 box-sizing: content-box;
379 top: - map.get($border-widths, 4);
380 left: - map.get($border-widths, 4);
381 --bs-btn-border-color: var(--bs-body-bg);
384 --bs-btn-border-color: var(--bs-primary-border-subtle);
389 .form-check.disabled { color: $darkgrey; }
400 top: 10px !important;
402 margin-right: 0px !important;
403 margin-top: 0px !important;
407 .leaflet-popup-scrolled {
408 padding-right: $lineheight;
409 border-bottom: 0px !important;
410 border-top: 0px !important;
413 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
414 .leaflet-contextmenu, .leaflet-contextmenu-item,
415 .leaflet-control-attribution, .leaflet-control-scale-line {
416 @extend .bg-body, .text-body;
419 .leaflet-control-attribution, .leaflet-control-scale-line {
420 @extend .bg-opacity-75;
421 text-shadow: none !important;
424 .leaflet-contextmenu-item.over {
425 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
428 .leaflet-popup-content-wrapper {
432 color: var(--bs-link-color) !important;
436 @include color-mode(dark) {
437 .leaflet-container .leaflet-control-attribution a {
438 color: var(--bs-link-color);
441 .leaflet-control-scale-line {
442 border-color: rgba(var(--bs-light-rgb), .75) !important;
446 @mixin dark-map-color-scheme {
447 .leaflet-tile-container,
448 #legend .filtered-image {
449 filter: var(--dark-mode-map-filter);
452 .leaflet-tile-container .leaflet-tile {
457 body[data-map-theme="dark"] {
458 @include dark-map-color-scheme;
461 @include color-mode(dark) {
462 body:not([data-map-theme]) {
463 @include dark-map-color-scheme;
467 /* Rules for attribution text under the main map shown on printouts */
469 .donate-attr { color: darken($green, 10%) !important; }
471 /* Temporary label size override until we remove site-wide font customisation */
482 /* Stop bootstrap 5 from floating legends when they don't need to be */
487 /* Override the text colour for primary and secondary buttons, to match our
488 bootstrap 4 colours. Note this has accessibility issues, which is why
489 bootstrap 5 calculates black as the appropriate colour, and we should
490 reconsider our colours at some point with that in mind. */
493 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
497 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
500 .btn-outline-secondary {
501 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
504 /* Rules for the search and direction forms */
515 input:not(:placeholder-shown) + .input-group-text .describe_location {
520 /* Rules for search results */
522 .search_results_entry li.list-group-item {
523 border-right: 1em solid var(--marker-color);
526 .leaflet-marker-icon.activatable:is(.active, :hover) > svg {
527 transform: scale(1.5);
528 transform-origin: bottom;
531 /* Rules for routing */
540 .routing_marker_column {
542 margin-right: .35rem;
550 /* Rules for the history sidebar */
552 .changeset-above-sidebar-viewport {
553 --changeset-border-color: #CC6655;
554 --changeset-fill-color: #DDBBBB;
555 --changeset-outline-color: #FFF4F4;
557 .changeset-in-sidebar-viewport {
558 --changeset-border-color: #FF9500;
559 --changeset-fill-color: #FFFFAF;
560 --changeset-outline-color: #FFFFFF;
561 &.changeset-highlight-outline {
562 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
565 .changeset-below-sidebar-viewport {
566 --changeset-border-color: #8888AA;
567 --changeset-fill-color: #CCCCDD;
568 --changeset-outline-color: #F4F4FF;
570 .changeset-highlight-outline {
571 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
574 #sidebar .changesets {
575 .changeset-color-hint-bar {
577 background: var(--changeset-border-color);
585 a.stretched-link > bdi, a:not(.stretched-link), [title] {
587 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
592 #sidebar .changeset_line .changeset_num_comments {
596 /* Rules for the browse sidebar */
602 tr > *:not([colspan]) {
603 white-space: pre-wrap;
604 word-wrap: break-word;
605 word-break: break-word;
613 .browse-element-list {
614 line-height: 1.25rem;
620 .d-flex > .browse-icon {
621 height: max(20px, 1.25rem);
630 @include color-mode(dark) {
631 #sidebar_content .browse-element-list .browse-icon-invertible {
632 filter: invert(.8) hue-rotate(180deg);
636 /* Force LTR/RTL alignment for placeholder text */
638 .form-control::placeholder {
642 /* Rules for export sidebar */
645 .export_area_inputs {
658 /* Rules for edit pages */
669 /* Rules for non-map content pages */
673 padding: $lineheight;
676 /* Rules for login and signup pages */
678 .sessions-new, .users-new, .users-create {
679 #content .content-inner {
684 .header-illustration {
685 background-position: right;
686 background-repeat: no-repeat;
694 background-image: image-url("sign-up-illustration.svg");
695 background-position-x: 70px;
699 background-image: image-url("confirm-illustration.svg");
703 background-image: image-url("terms-illustration.svg");
707 [dir=rtl] .header-illustration {
708 transform: scaleX(-1);
711 transform: scaleX(-1);
715 transform: scaleX(-1);
719 /* Rules for small maps in content areas */
723 margin-bottom: $lineheight;
726 @include media-breakpoint-up(md) {
732 /* Rules for the user map */
734 .content_map .leaflet-popup-content {
738 /* Rules for user popups on maps */
742 margin: 0 0 5px 0 !important;
747 /* Rules for the diary entry page */
754 .diary-comment .col-auto {
757 .diary-comment .col {
762 /* Rules for the issues page */
764 .issues.issues-index {
770 /* Rules for the account confirmation page */
772 .accounts-terms-show {
774 padding: $lineheight;
775 margin-bottom: $lineheight;
784 list-style-type: lower-alpha;
789 /* Rules for user images */
801 img.user_thumbnail_tiny {
807 /* General styles for action lists / subnavs */
809 nav.secondary-actions {
822 border-left: 1px solid $grey;
823 padding-left: $lineheight * 0.5;
824 margin-right: $lineheight * 0.5;
825 margin-bottom: $lineheight * 0.125;
830 div.secondary-actions {
835 /* Rules for rich text */
839 background: var(--bs-secondary-bg);
844 background: var(--bs-secondary-bg);
846 white-space: pre-wrap;
854 padding: $lineheight;
855 background-color: var(--bs-tertiary-bg);
862 border-left: $lineheight solid var(--bs-tertiary-bg);
863 padding-left: $lineheight;
865 color: var(--bs-secondary-color);
869 /* Rules for the "About" page */
871 .site-about #content {
881 color: $vibrant-green;
887 background-position: 0 50%;
888 background-repeat: no-repeat;
889 background-image: image-url('about/osm.png');
890 background-size: cover;
891 background-color: $vibrant-green;
895 background: $vibrant-green;
899 display: inline-block;
906 /* Rules for tables with usernames */
908 .messages-table .username,
909 #block_list .username {
913 /* Rules for navigation tabs */
915 .nav-tabs .username {
919 .bg-body-secondary .nav-tabs {
920 --bs-border-color: var(--bs-secondary-border-subtle);
921 --bs-secondary-bg: var(--bs-secondary-border-subtle);
925 /* Rules for traces */
928 mix-blend-mode: darken;
931 @include color-mode(dark) {
934 mix-blend-mode: lighten;
938 /* Rules for the heatmap */
941 grid-template-columns: auto;
942 grid-auto-columns: minmax(1em, 1fr);
943 grid-template-rows: auto;
944 grid-auto-rows: minmax(1em, 1fr);
948 [data-date], [data-date] span {
955 background-color: #ededed;
957 background-color: #14432a;
960 background-color: #4dd05a;
963 box-shadow: 0px 0px 0px 1px #8884;
968 @include color-mode(dark) {
971 background-color: #2d333b;
973 background-color: #4dd05a;
976 background-color: #14432a;
983 --bs-tooltip-max-width: none;