4 @import "rails_bootstrap_forms";
6 /* Styles common to large and small screens */
8 /* Default rules for the body of every page */
11 font-size: $typeheight;
12 --dark-mode-map-filter: none;
16 text-decoration: underline dotted;
19 /* Utility for de-emphasizing content */
21 .text-body-secondary a {
25 /* Bootstrap contextual table classes overrides in dark mode */
27 @include color-mode(dark) {
29 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
32 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
35 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
37 .table-primary, .table-secondary, .table-success {
38 --bs-table-color: initial;
39 border-color: inherit;
43 /* Utility for delayed loading spinner */
46 animation: 300ms linear forwards delayed-fade-in;
49 @keyframes delayed-fade-in {
55 /* Bootstrap close button overrides for nested light/dark themes */
57 [data-bs-theme="dark"],
58 [data-bs-theme] [data-bs-theme="dark"] {
59 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
62 [data-bs-theme="light"],
63 [data-bs-theme] [data-bs-theme="light"] {
64 --bs-btn-close-filter: none;
67 /* Rules for the header */
74 background: image-url("menu-icon.svg") no-repeat;
75 background-size: 30px 30px;
78 margin: 14px 10px 0 0;
82 @include color-mode(dark) {
89 height: $headerHeight;
94 padding: $lineheight * 0.5;
98 height: $headerHeight;
112 #edit_tab .btn-outline-primary {
113 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
117 .btn-outline-primary {
122 background-color: lighten($green, 30%);
127 // Small tweaks to the toggle to stop the primary colour showing through
128 // when the menu is shown
129 .show > .btn-outline-primary.dropdown-toggle {
130 background-color: $green;
131 border-color: $green;
134 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
149 nav.primary, nav.secondary {
152 background-color: $green;
158 #compact-secondary-nav {
168 flex-direction: column;
170 min-height: $headerHeight;
173 display: none !important;
185 #sidebar .search_forms {
200 flex-direction: column;
204 justify-content: center;
207 .user-menu, .login-menu {
212 #compact-secondary-nav {
217 display: inline-block;
220 .overlay-sidebar #sidebar .welcome {
224 .overlay-sidebar #sidebar #banner {
229 /* Utility for styling notification numbers */
232 background: transparentize(lighten($green, 25%), .25);
234 font-weight: $font-weight-normal;
237 /* Rules for Leaflet maps */
239 .leaflet-top.leaflet-right,
240 .leaflet-top.leaflet-left {
244 flex-direction: column;
245 flex-wrap: wrap-reverse;
248 .leaflet-control .control-button {
254 background-color: rgba(0,0,0,.6);
259 background-color: black;
264 background-color: rgba(0,0,0,.5);
269 border-start-start-radius: 4px;
273 border-end-start-radius: 4px;
278 .leaflet-control.active .control-button {
279 background-color: $vibrant-green;
282 /* Rules for the sidebar and main map area */
302 width: $sidebarWidth;
305 .overlay-sidebar #sidebar {
318 .sidebar-close-controls,
334 width: $sidebarWidth;
350 .leaflet-marker-draggable {
355 animation: 1500ms forwards query-marker-fade;
357 @keyframes query-marker-fade {
373 @include media-breakpoint-down(md) {
388 .overlay-sidebar.overlay-right-sidebar {
408 box-sizing: content-box;
409 top: - map.get($border-widths, 4);
410 left: - map.get($border-widths, 4);
411 --bs-btn-border-color: var(--bs-body-bg);
414 --bs-btn-border-color: var(--bs-primary-border-subtle);
419 li.disabled { color: $darkgrey; }
430 top: 10px !important;
432 margin-right: 0px !important;
433 margin-top: 0px !important;
437 .leaflet-popup-scrolled {
438 padding-right: $lineheight;
439 border-bottom: 0px !important;
440 border-top: 0px !important;
443 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
444 .leaflet-contextmenu, .leaflet-contextmenu-item,
445 .leaflet-control-attribution, .leaflet-control-scale-line {
446 @extend .bg-body, .text-body;
449 .leaflet-control-attribution, .leaflet-control-scale-line {
450 @extend .bg-opacity-75;
451 text-shadow: none !important;
454 .leaflet-contextmenu-item.over {
455 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
458 .leaflet-popup-content-wrapper {
462 color: var(--bs-link-color) !important;
466 @include color-mode(dark) {
467 .leaflet-container .leaflet-control-attribution a {
468 color: var(--bs-link-color);
471 .leaflet-control-scale-line {
472 border-color: rgba(var(--bs-light-rgb), .75) !important;
476 @mixin dark-map-color-scheme {
477 .leaflet-tile-container,
478 #mapkey .filtered-image {
479 filter: var(--dark-mode-map-filter);
482 .leaflet-tile-container .leaflet-tile {
487 body[data-map-theme="dark"] {
488 @include dark-map-color-scheme;
491 @include color-mode(dark) {
492 body:not([data-map-theme]) {
493 @include dark-map-color-scheme;
497 /* Rules for attribution text under the main map shown on printouts */
499 .donate-attr { color: darken($green, 10%) !important; }
501 /* Temporary label size override until we remove site-wide font customisation */
512 /* Stop bootstrap 5 from floating legends when they don't need to be */
517 /* Override the text colour for primary and secondary buttons, to match our
518 bootstrap 4 colours. Note this has accessibility issues, which is why
519 bootstrap 5 calculates black as the appropriate colour, and we should
520 reconsider our colours at some point with that in mind. */
523 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
527 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
530 .btn-outline-secondary {
531 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
534 /* Rules for the search and direction forms */
536 header .search_forms,
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 /* Rules for the browse sidebar */
612 padding-bottom: $spacer;
613 margin-bottom: $spacer;
614 border-bottom: 1px solid $grey;
617 word-wrap: break-word;
621 .browse-section:last-of-type {
627 white-space: pre-wrap;
628 word-wrap: break-word;
629 word-break: break-word;
631 tr:last-child th, tr:last-child td {
641 /* Force LTR/RTL alignment for placeholder text */
643 .form-control::placeholder {
647 /* Rules for export sidebar */
650 .export_area_inputs {
663 /* Rules for edit pages */
674 /* Rules for non-map content pages */
678 padding: $lineheight;
681 /* Rules for login and signup pages */
683 .sessions-new, .users-new, .users-create {
684 #content .content-inner {
689 .header-illustration {
690 background-position: right;
691 background-repeat: no-repeat;
699 background-image: image-url("sign-up-illustration.svg");
700 background-position-x: 70px;
704 background-image: image-url("confirm-illustration.svg");
708 background-image: image-url("terms-illustration.svg");
712 [dir=rtl] .header-illustration {
713 transform: scaleX(-1);
716 transform: scaleX(-1);
720 transform: scaleX(-1);
724 /* Rules for small maps in content areas */
728 margin-bottom: $lineheight;
731 @include media-breakpoint-up(md) {
737 /* Rules for the user map */
739 .content_map .leaflet-popup-content {
743 /* Rules for user popups on maps */
747 margin: 0 0 5px 0 !important;
752 /* Rules for the diary entry page */
759 .diary-comment .col-auto {
762 .diary-comment .col {
767 /* Rules for the issues page */
769 .issues.issues-index {
775 /* Rules for the account confirmation page */
777 .accounts-terms-show {
779 padding: $lineheight;
780 margin-bottom: $lineheight;
789 list-style-type: lower-alpha;
794 /* Rules for user images */
806 img.user_thumbnail_tiny {
812 /* General styles for action lists / subnavs */
814 nav.secondary-actions {
827 border-left: 1px solid $grey;
828 padding-left: $lineheight * 0.5;
829 margin-right: $lineheight * 0.5;
830 margin-bottom: $lineheight * 0.125;
835 div.secondary-actions {
840 /* Rules for rich text */
844 background: var(--bs-secondary-bg);
849 background: var(--bs-secondary-bg);
851 white-space: pre-wrap;
859 padding: $lineheight;
860 background-color: var(--bs-tertiary-bg);
867 border-left: $lineheight solid var(--bs-tertiary-bg);
868 padding-left: $lineheight;
870 color: var(--bs-secondary-color);
874 /* Rules for the "About" page */
876 .site-about #content {
886 color: $vibrant-green;
892 background-position: 0 50%;
893 background-repeat: no-repeat;
894 background-image: image-url('about/osm.png');
895 background-size: cover;
896 background-color: $vibrant-green;
900 background: $vibrant-green;
904 display: inline-block;
911 /* Rules for tables with usernames */
913 .messages-table .username,
914 #block_list .username {
918 /* Rules for navigation tabs */
920 .nav-tabs .username {
924 .bg-body-secondary .nav-tabs {
925 --bs-border-color: var(--bs-secondary-border-subtle);
926 --bs-secondary-bg: var(--bs-secondary-border-subtle);
930 /* Rules for traces */
933 mix-blend-mode: darken;
936 @include color-mode(dark) {
939 mix-blend-mode: lighten;
943 /* Rules for map sidebar icons */
945 .browse-section .browse-element-list {
946 line-height: 1.25rem;
952 .d-flex > .browse-icon {
953 height: max(20px, 1.25rem);
956 @include color-mode(dark) {
957 .browse-icon-invertible {
958 filter: invert(.8) hue-rotate(180deg);
963 /* Rules for the social links */
965 @include color-mode(dark) {
971 /* Rules for the heatmap */
974 grid-template-columns: auto;
975 grid-auto-columns: minmax(1em, 1fr);
976 grid-template-rows: auto;
977 grid-auto-rows: minmax(1em, 1fr);
981 [data-date], [data-date] span {
988 background-color: #ededed;
990 background-color: #14432a;
993 background-color: #4dd05a;
996 box-shadow: 0px 0px 0px 1px #8884;
1001 @include color-mode(dark) {
1004 background-color: #2d333b;
1006 background-color: #4dd05a;
1009 background-color: #14432a;
1016 --bs-tooltip-max-width: none;