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 {
207 /* Utility for styling notification numbers */
210 background: transparentize(lighten($green, 25%), .25);
212 font-weight: $font-weight-normal;
215 /* Rules for Leaflet maps */
217 .leaflet-top.leaflet-right,
218 .leaflet-top.leaflet-left {
222 flex-direction: column;
223 flex-wrap: wrap-reverse;
226 .leaflet-control .control-button {
232 background-color: rgba(0,0,0,.6);
237 background-color: black;
242 background-color: rgba(0,0,0,.5);
247 border-start-start-radius: 4px;
251 border-end-start-radius: 4px;
256 .leaflet-control.active .control-button {
257 background-color: $vibrant-green;
260 /* Rules for the sidebar and main map area */
280 width: $sidebarWidth;
283 .overlay-sidebar #sidebar {
293 .sidebar-close-controls,
307 width: $sidebarWidth;
322 .leaflet-marker-draggable {
327 animation: 1500ms forwards query-marker-fade;
329 @keyframes query-marker-fade {
345 @include media-breakpoint-down(md) {
360 .overlay-sidebar.overlay-right-sidebar {
380 box-sizing: content-box;
381 top: - map.get($border-widths, 4);
382 left: - map.get($border-widths, 4);
383 --bs-btn-border-color: var(--bs-body-bg);
386 --bs-btn-border-color: var(--bs-primary-border-subtle);
391 .form-check.disabled { color: $darkgrey; }
402 top: 10px !important;
404 margin-right: 0px !important;
405 margin-top: 0px !important;
409 .leaflet-popup-scrolled {
410 padding-right: $lineheight;
411 border-bottom: 0px !important;
412 border-top: 0px !important;
415 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
416 .leaflet-contextmenu, .leaflet-contextmenu-item,
417 .leaflet-control-attribution, .leaflet-control-scale-line {
418 @extend .bg-body, .text-body;
421 .leaflet-control-attribution, .leaflet-control-scale-line {
422 @extend .bg-opacity-75;
423 text-shadow: none !important;
426 .leaflet-contextmenu-item.over {
427 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
430 .leaflet-popup-content-wrapper {
434 color: var(--bs-link-color) !important;
438 @include color-mode(dark) {
439 .leaflet-container .leaflet-control-attribution a {
440 color: var(--bs-link-color);
443 .leaflet-control-scale-line {
444 border-color: rgba(var(--bs-light-rgb), .75) !important;
448 @mixin dark-map-color-scheme {
449 .leaflet-tile-container,
450 #legend .filtered-image {
451 filter: var(--dark-mode-map-filter);
454 .leaflet-tile-container .leaflet-tile {
459 body[data-map-theme="dark"] {
460 @include dark-map-color-scheme;
463 @include color-mode(dark) {
464 body:not([data-map-theme]) {
465 @include dark-map-color-scheme;
469 /* Rules for attribution text under the main map shown on printouts */
471 .donate-attr { color: darken($green, 10%) !important; }
473 /* Temporary label size override until we remove site-wide font customisation */
484 /* Stop bootstrap 5 from floating legends when they don't need to be */
489 /* Override the text colour for primary and secondary buttons, to match our
490 bootstrap 4 colours. Note this has accessibility issues, which is why
491 bootstrap 5 calculates black as the appropriate colour, and we should
492 reconsider our colours at some point with that in mind. */
495 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
499 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
502 .btn-outline-secondary {
503 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
506 /* Rules for the search and direction forms */
517 input:not(:placeholder-shown) + .input-group-text .describe_location {
522 /* Rules for search results */
524 .search_results_entry li.list-group-item {
525 border-right: 1em solid var(--marker-color);
528 .leaflet-marker-icon.activatable:is(.active, :hover) > svg {
529 transform: scale(1.5);
530 transform-origin: bottom;
533 /* Rules for routing */
542 .routing_marker_column {
544 margin-right: .35rem;
552 /* Rules for the history sidebar */
554 .changeset-above-sidebar-viewport {
555 --changeset-border-color: #CC6655;
556 --changeset-fill-color: #DDBBBB;
557 --changeset-outline-color: #FFF4F4;
559 .changeset-in-sidebar-viewport {
560 --changeset-border-color: #FF9500;
561 --changeset-fill-color: #FFFFAF;
562 --changeset-outline-color: #FFFFFF;
563 &.changeset-highlight-outline {
564 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
567 .changeset-below-sidebar-viewport {
568 --changeset-border-color: #8888AA;
569 --changeset-fill-color: #CCCCDD;
570 --changeset-outline-color: #F4F4FF;
572 .changeset-highlight-outline {
573 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
576 #sidebar .changesets {
577 .changeset-color-hint-bar {
579 background: var(--changeset-border-color);
587 a.stretched-link > bdi, a:not(.stretched-link), [title] {
589 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
594 #sidebar .changeset_line .changeset_num_comments {
598 /* Rules for the browse sidebar */
604 tr > *:not([colspan]) {
605 white-space: pre-wrap;
606 word-wrap: break-word;
607 word-break: break-word;
615 .browse-element-list {
616 line-height: 1.25rem;
622 .d-flex > .browse-icon {
623 height: max(20px, 1.25rem);
632 @include color-mode(dark) {
633 #sidebar_content .browse-element-list .browse-icon-invertible {
634 filter: invert(.8) hue-rotate(180deg);
638 /* Force LTR/RTL alignment for placeholder text */
640 .form-control::placeholder {
644 /* Rules for export sidebar */
647 .export_area_inputs {
660 /* Rules for edit pages */
671 /* Rules for non-map content pages */
675 padding: $lineheight;
678 /* Rules for login and signup pages */
680 .sessions-new, .users-new, .users-create {
681 #content .content-inner {
686 .header-illustration {
687 background-position: right;
688 background-repeat: no-repeat;
696 background-image: image-url("sign-up-illustration.svg");
697 background-position-x: 70px;
701 background-image: image-url("confirm-illustration.svg");
705 background-image: image-url("terms-illustration.svg");
709 [dir=rtl] .header-illustration {
710 transform: scaleX(-1);
713 transform: scaleX(-1);
717 transform: scaleX(-1);
721 /* Rules for small maps in content areas */
725 margin-bottom: $lineheight;
728 @include media-breakpoint-up(md) {
734 /* Rules for the user map */
736 .content_map .leaflet-popup-content {
740 /* Rules for user popups on maps */
744 margin: 0 0 5px 0 !important;
749 /* Rules for the diary entry page */
756 .diary-comment .col-auto {
759 .diary-comment .col {
764 /* Rules for the issues page */
766 .issues.issues-index {
772 /* Rules for the account confirmation page */
774 .accounts-terms-show {
776 padding: $lineheight;
777 margin-bottom: $lineheight;
786 list-style-type: lower-alpha;
791 /* Rules for user images */
803 img.user_thumbnail_tiny {
809 /* General styles for action lists / subnavs */
811 nav.secondary-actions {
824 border-left: 1px solid $grey;
825 padding-left: $lineheight * 0.5;
826 margin-right: $lineheight * 0.5;
827 margin-bottom: $lineheight * 0.125;
832 div.secondary-actions {
837 /* Rules for rich text */
841 background: var(--bs-secondary-bg);
846 background: var(--bs-secondary-bg);
848 white-space: pre-wrap;
856 padding: $lineheight;
857 background-color: var(--bs-tertiary-bg);
864 border-left: $lineheight solid var(--bs-tertiary-bg);
865 padding-left: $lineheight;
867 color: var(--bs-secondary-color);
871 /* Rules for the "About" page */
873 .site-about #content {
883 color: $vibrant-green;
889 background-position: 0 50%;
890 background-repeat: no-repeat;
891 background-image: image-url('about/osm.png');
892 background-size: cover;
893 background-color: $vibrant-green;
897 background: $vibrant-green;
901 display: inline-block;
908 /* Rules for tables with usernames */
910 .messages-table .username,
911 #block_list .username {
915 /* Rules for navigation tabs */
917 .nav-tabs .username {
921 .bg-body-secondary .nav-tabs {
922 --bs-border-color: var(--bs-secondary-border-subtle);
923 --bs-secondary-bg: var(--bs-secondary-border-subtle);
927 /* Rules for traces */
930 mix-blend-mode: darken;
933 @include color-mode(dark) {
936 mix-blend-mode: lighten;
940 /* Rules for the heatmap */
943 grid-template-columns: auto;
944 grid-auto-columns: minmax(1em, 1fr);
945 grid-template-rows: auto;
946 grid-auto-rows: minmax(1em, 1fr);
950 [data-date], [data-date] span {
957 background-color: #ededed;
959 background-color: #14432a;
962 background-color: #4dd05a;
965 box-shadow: 0px 0px 0px 1px #8884;
970 @include color-mode(dark) {
973 background-color: #2d333b;
975 background-color: #4dd05a;
978 background-color: #14432a;
985 --bs-tooltip-max-width: none;