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 border-top-color: $grey;
126 background-color: lighten($green, 30%);
131 // Small tweaks to the toggle to stop the primary colour showing through
132 // when the menu is shown
133 .show > .btn-outline-primary.dropdown-toggle {
134 background-color: $green;
135 border-color: $green;
138 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
153 nav.primary, nav.secondary {
156 background-color: $green;
162 #compact-secondary-nav {
172 flex-direction: column;
174 min-height: $headerHeight;
177 display: none !important;
189 #sidebar .search_forms {
204 flex-direction: column;
208 justify-content: center;
211 .user-menu, .login-menu {
216 #compact-secondary-nav {
221 display: inline-block;
224 .overlay-sidebar #sidebar .welcome {
228 .overlay-sidebar #sidebar #banner {
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 li.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 .mapkey-table-entry td:first-child > * {
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,
551 /* Rules for routing */
560 .routing_marker_column {
562 margin-right: .35rem;
570 /* Rules for the history sidebar */
572 .changeset-above-sidebar-viewport {
573 --changeset-border-color: #CC6655;
574 --changeset-fill-color: #DDBBBB;
575 --changeset-outline-color: #FFF4F4;
577 .changeset-in-sidebar-viewport {
578 --changeset-border-color: #FF9500;
579 --changeset-fill-color: #FFFFAF;
580 --changeset-outline-color: #FFFFFF;
581 &.changeset-highlight-outline {
582 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
585 .changeset-below-sidebar-viewport {
586 --changeset-border-color: #8888AA;
587 --changeset-fill-color: #CCCCDD;
588 --changeset-outline-color: #F4F4FF;
590 .changeset-highlight-outline {
591 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
594 #sidebar .changesets {
595 .changeset-color-hint-bar {
597 background: var(--changeset-border-color);
605 a.stretched-link > span, a:not(.stretched-link), [title] {
607 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
612 /* Rules for the browse sidebar */
616 padding-bottom: $spacer;
617 margin-bottom: $spacer;
618 border-bottom: 1px solid $grey;
621 word-wrap: break-word;
625 .browse-section:last-of-type {
631 white-space: pre-wrap;
632 word-wrap: break-word;
633 word-break: break-word;
635 tr:last-child th, tr:last-child td {
645 /* Force LTR/RTL alignment for placeholder text */
647 .form-control::placeholder {
651 /* Rules for export sidebar */
654 .export_area_inputs {
667 /* Rules for edit pages */
678 /* Rules for non-map content pages */
682 padding: $lineheight;
685 /* Rules for login and signup pages */
687 .sessions-new, .users-new, .users-create {
688 #content .content-inner {
693 .header-illustration {
694 background-position: right;
695 background-repeat: no-repeat;
703 background-image: image-url("sign-up-illustration.svg");
704 background-position-x: 70px;
708 background-image: image-url("confirm-illustration.svg");
712 background-image: image-url("terms-illustration.svg");
716 [dir=rtl] .header-illustration {
717 transform: scaleX(-1);
720 transform: scaleX(-1);
724 transform: scaleX(-1);
728 /* Rules for small maps in content areas */
732 margin-bottom: $lineheight;
735 @include media-breakpoint-up(md) {
741 /* Rules for the user map */
743 .content_map .leaflet-popup-content {
748 /* Rules for user popups on maps */
758 /* Rules for the diary entry page */
765 .diary-comment .col-auto {
768 .diary-comment .col {
773 /* Rules for the issues page */
775 .issues.issues-index {
781 /* Rules for the account confirmation page */
783 .accounts-terms-show {
785 padding: $lineheight;
786 margin-bottom: $lineheight;
795 list-style-type: lower-alpha;
800 /* Rules for user images */
812 img.user_thumbnail_tiny {
818 /* General styles for action lists / subnavs */
820 nav.secondary-actions {
833 border-left: 1px solid $grey;
834 padding-left: $lineheight * 0.5;
835 margin-right: $lineheight * 0.5;
836 margin-bottom: $lineheight * 0.125;
841 div.secondary-actions {
846 /* Rules for rich text */
850 background: var(--bs-secondary-bg);
855 background: var(--bs-secondary-bg);
857 white-space: pre-wrap;
865 padding: $lineheight;
866 background-color: var(--bs-tertiary-bg);
873 border-left: $lineheight solid var(--bs-tertiary-bg);
874 padding-left: $lineheight;
876 color: var(--bs-secondary-color);
880 /* Rules for the "About" page */
882 .site-about #content {
892 color: $vibrant-green;
898 background-position: 0 50%;
899 background-repeat: no-repeat;
900 background-image: image-url('about/osm.png');
901 background-size: cover;
902 background-color: $vibrant-green;
906 background: $vibrant-green;
910 display: inline-block;
917 /* Rules for tables with usernames */
919 .messages-table .username,
920 #block_list .username {
924 /* Rules for navigation tabs */
926 .nav-tabs .username {
930 .bg-body-secondary .nav-tabs {
931 --bs-border-color: var(--bs-secondary-border-subtle);
932 --bs-secondary-bg: var(--bs-secondary-border-subtle);
936 /* Rules for traces */
939 mix-blend-mode: darken;
942 @include color-mode(dark) {
945 mix-blend-mode: lighten;
949 /* Rules for map sidebar icons */
951 .browse-section .browse-element-list {
952 line-height: 1.25rem;
958 .d-flex > .browse-icon {
959 height: max(20px, 1.25rem);
962 @include color-mode(dark) {
963 .browse-icon-invertible {
964 filter: invert(.8) hue-rotate(180deg);