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 */
75 @include color-mode(dark) {
82 height: $headerHeight;
87 padding: $lineheight * 0.5;
91 height: $headerHeight;
93 gap: $lineheight * 0.5;
106 #edit_tab .btn-outline-primary {
107 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
111 .btn-outline-primary {
116 background-color: lighten($green, 30%);
121 // Small tweaks to the toggle to stop the primary colour showing through
122 // when the menu is shown
123 .show > .btn-outline-primary.dropdown-toggle {
124 background-color: $green;
125 border-color: $green;
128 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
143 nav.primary, nav.secondary {
146 background-color: $green;
152 #compact-secondary-nav {
162 flex-direction: column;
164 min-height: $headerHeight;
167 display: none !important;
179 #sidebar .search_forms {
194 flex-direction: column;
198 justify-content: center;
201 .user-menu, .login-menu {
206 #compact-secondary-nav {
211 display: inline-block;
214 .overlay-sidebar #sidebar .welcome {
218 .overlay-sidebar #sidebar #banner {
223 /* Rules for language selector */
225 .select_language_list {
233 /* Utility for styling notification numbers */
236 background: transparentize(lighten($green, 25%), .25);
238 font-weight: $font-weight-normal;
241 /* Rules for Leaflet maps */
243 .leaflet-top.leaflet-right,
244 .leaflet-top.leaflet-left {
248 flex-direction: column;
249 flex-wrap: wrap-reverse;
252 .leaflet-control .control-button {
258 background-color: rgba(0,0,0,.6);
263 background-color: black;
268 background-color: rgba(0,0,0,.5);
273 border-start-start-radius: 4px;
277 border-end-start-radius: 4px;
282 .leaflet-control.active .control-button {
283 background-color: $vibrant-green;
286 /* Rules for the sidebar and main map area */
306 width: $sidebarWidth;
309 .overlay-sidebar #sidebar {
322 .sidebar-close-controls,
338 width: $sidebarWidth;
354 .leaflet-marker-draggable {
359 animation: 1500ms forwards query-marker-fade;
361 @keyframes query-marker-fade {
377 @include media-breakpoint-down(md) {
392 .overlay-sidebar.overlay-right-sidebar {
412 box-sizing: content-box;
413 top: - map.get($border-widths, 4);
414 left: - map.get($border-widths, 4);
415 --bs-btn-border-color: var(--bs-body-bg);
418 --bs-btn-border-color: var(--bs-primary-border-subtle);
423 .form-check.disabled { color: $darkgrey; }
434 top: 10px !important;
436 margin-right: 0px !important;
437 margin-top: 0px !important;
441 .leaflet-popup-scrolled {
442 padding-right: $lineheight;
443 border-bottom: 0px !important;
444 border-top: 0px !important;
447 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
448 .leaflet-contextmenu, .leaflet-contextmenu-item,
449 .leaflet-control-attribution, .leaflet-control-scale-line {
450 @extend .bg-body, .text-body;
453 .leaflet-control-attribution, .leaflet-control-scale-line {
454 @extend .bg-opacity-75;
455 text-shadow: none !important;
458 .leaflet-contextmenu-item.over {
459 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
462 .leaflet-popup-content-wrapper {
466 color: var(--bs-link-color) !important;
470 @include color-mode(dark) {
471 .leaflet-container .leaflet-control-attribution a {
472 color: var(--bs-link-color);
475 .leaflet-control-scale-line {
476 border-color: rgba(var(--bs-light-rgb), .75) !important;
480 @mixin dark-map-color-scheme {
481 .leaflet-tile-container,
482 #legend .filtered-image {
483 filter: var(--dark-mode-map-filter);
486 .leaflet-tile-container .leaflet-tile {
491 body[data-map-theme="dark"] {
492 @include dark-map-color-scheme;
495 @include color-mode(dark) {
496 body:not([data-map-theme]) {
497 @include dark-map-color-scheme;
501 /* Rules for attribution text under the main map shown on printouts */
503 .donate-attr { color: darken($green, 10%) !important; }
505 /* Temporary label size override until we remove site-wide font customisation */
516 /* Stop bootstrap 5 from floating legends when they don't need to be */
521 /* Override the text colour for primary and secondary buttons, to match our
522 bootstrap 4 colours. Note this has accessibility issues, which is why
523 bootstrap 5 calculates black as the appropriate colour, and we should
524 reconsider our colours at some point with that in mind. */
527 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
531 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
534 .btn-outline-secondary {
535 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
538 /* Rules for the search and direction forms */
540 header .search_forms,
550 input:not(:placeholder-shown) + .input-group-text .describe_location {
555 /* Rules for search results */
557 .search_results_entry li.list-group-item {
558 border-right: 1em solid var(--marker-color);
561 .leaflet-marker-icon:is(.active, :hover) > svg {
562 transform: scale(1.5);
563 transform-origin: bottom;
566 /* Rules for routing */
575 .routing_marker_column {
577 margin-right: .35rem;
585 /* Rules for the history sidebar */
587 .changeset-above-sidebar-viewport {
588 --changeset-border-color: #CC6655;
589 --changeset-fill-color: #DDBBBB;
590 --changeset-outline-color: #FFF4F4;
592 .changeset-in-sidebar-viewport {
593 --changeset-border-color: #FF9500;
594 --changeset-fill-color: #FFFFAF;
595 --changeset-outline-color: #FFFFFF;
596 &.changeset-highlight-outline {
597 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
600 .changeset-below-sidebar-viewport {
601 --changeset-border-color: #8888AA;
602 --changeset-fill-color: #CCCCDD;
603 --changeset-outline-color: #F4F4FF;
605 .changeset-highlight-outline {
606 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
609 #sidebar .changesets {
610 .changeset-color-hint-bar {
612 background: var(--changeset-border-color);
620 a.stretched-link > bdi, a:not(.stretched-link), [title] {
622 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
627 #sidebar .changeset_line .changeset_num_comments {
631 /* Rules for the browse sidebar */
637 tr > *:not([colspan]) {
638 white-space: pre-wrap;
639 word-wrap: break-word;
640 word-break: break-word;
648 .browse-element-list {
649 line-height: 1.25rem;
655 .d-flex > .browse-icon {
656 height: max(20px, 1.25rem);
665 @include color-mode(dark) {
666 #sidebar_content .browse-element-list .browse-icon-invertible {
667 filter: invert(.8) hue-rotate(180deg);
671 /* Force LTR/RTL alignment for placeholder text */
673 .form-control::placeholder {
677 /* Rules for export sidebar */
680 .export_area_inputs {
693 /* Rules for edit pages */
704 /* Rules for non-map content pages */
708 padding: $lineheight;
711 /* Rules for login and signup pages */
713 .sessions-new, .users-new, .users-create {
714 #content .content-inner {
719 .header-illustration {
720 background-position: right;
721 background-repeat: no-repeat;
729 background-image: image-url("sign-up-illustration.svg");
730 background-position-x: 70px;
734 background-image: image-url("confirm-illustration.svg");
738 background-image: image-url("terms-illustration.svg");
742 [dir=rtl] .header-illustration {
743 transform: scaleX(-1);
746 transform: scaleX(-1);
750 transform: scaleX(-1);
754 /* Rules for small maps in content areas */
758 margin-bottom: $lineheight;
761 @include media-breakpoint-up(md) {
767 /* Rules for the user map */
769 .content_map .leaflet-popup-content {
773 /* Rules for user popups on maps */
777 margin: 0 0 5px 0 !important;
782 /* Rules for the diary entry page */
789 .diary-comment .col-auto {
792 .diary-comment .col {
797 /* Rules for the issues page */
799 .issues.issues-index {
805 /* Rules for the account confirmation page */
807 .accounts-terms-show {
809 padding: $lineheight;
810 margin-bottom: $lineheight;
819 list-style-type: lower-alpha;
824 /* Rules for user images */
836 img.user_thumbnail_tiny {
842 /* General styles for action lists / subnavs */
844 nav.secondary-actions {
857 border-left: 1px solid $grey;
858 padding-left: $lineheight * 0.5;
859 margin-right: $lineheight * 0.5;
860 margin-bottom: $lineheight * 0.125;
865 div.secondary-actions {
870 /* Rules for rich text */
874 background: var(--bs-secondary-bg);
879 background: var(--bs-secondary-bg);
881 white-space: pre-wrap;
889 padding: $lineheight;
890 background-color: var(--bs-tertiary-bg);
897 border-left: $lineheight solid var(--bs-tertiary-bg);
898 padding-left: $lineheight;
900 color: var(--bs-secondary-color);
904 /* Rules for the "About" page */
906 .site-about #content {
916 color: $vibrant-green;
922 background-position: 0 50%;
923 background-repeat: no-repeat;
924 background-image: image-url('about/osm.png');
925 background-size: cover;
926 background-color: $vibrant-green;
930 background: $vibrant-green;
934 display: inline-block;
941 /* Rules for tables with usernames */
943 .messages-table .username,
944 #block_list .username {
948 /* Rules for navigation tabs */
950 .nav-tabs .username {
954 .bg-body-secondary .nav-tabs {
955 --bs-border-color: var(--bs-secondary-border-subtle);
956 --bs-secondary-bg: var(--bs-secondary-border-subtle);
960 /* Rules for traces */
963 mix-blend-mode: darken;
966 @include color-mode(dark) {
969 mix-blend-mode: lighten;
973 /* Rules for the heatmap */
976 grid-template-columns: auto;
977 grid-auto-columns: minmax(1em, 1fr);
978 grid-template-rows: auto;
979 grid-auto-rows: minmax(1em, 1fr);
983 [data-date], [data-date] span {
990 background-color: #ededed;
992 background-color: #14432a;
995 background-color: #4dd05a;
998 box-shadow: 0px 0px 0px 1px #8884;
1003 @include color-mode(dark) {
1006 background-color: #2d333b;
1008 background-color: #4dd05a;
1011 background-color: #14432a;
1018 --bs-tooltip-max-width: none;