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;
13 --marker-red: #f6110a;
14 --marker-green: #9cef11;
15 --marker-blue: #0b8ef1;
19 text-decoration: underline dotted;
22 /* Utility for de-emphasizing content */
24 .text-body-secondary a {
28 /* Bootstrap contextual table classes overrides in dark mode */
30 @include color-mode(dark) {
32 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
35 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
38 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
40 .table-primary, .table-secondary, .table-success {
41 --bs-table-color: initial;
42 border-color: inherit;
46 /* Utility for delayed loading spinner */
49 animation: 300ms linear forwards delayed-fade-in;
52 @keyframes delayed-fade-in {
58 /* Bootstrap close button overrides for nested light/dark themes */
60 [data-bs-theme="dark"],
61 [data-bs-theme] [data-bs-theme="dark"] {
62 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
65 [data-bs-theme="light"],
66 [data-bs-theme] [data-bs-theme="light"] {
67 --bs-btn-close-filter: none;
70 /* Rules for the header */
77 background: image-url("menu-icon.svg") no-repeat;
78 background-size: 30px 30px;
81 margin: 14px 10px 0 0;
85 @include color-mode(dark) {
92 height: $headerHeight;
97 padding: $lineheight * 0.5;
101 height: $headerHeight;
115 #edit_tab .btn-outline-primary {
116 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
120 .btn-outline-primary {
125 background-color: lighten($green, 30%);
130 // Small tweaks to the toggle to stop the primary colour showing through
131 // when the menu is shown
132 .show > .btn-outline-primary.dropdown-toggle {
133 background-color: $green;
134 border-color: $green;
137 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
152 nav.primary, nav.secondary {
155 background-color: $green;
161 #compact-secondary-nav {
171 flex-direction: column;
173 min-height: $headerHeight;
176 display: none !important;
188 #sidebar .search_forms {
203 flex-direction: column;
207 justify-content: center;
210 .user-menu, .login-menu {
215 #compact-secondary-nav {
220 display: inline-block;
223 .overlay-sidebar #sidebar .welcome {
227 .overlay-sidebar #sidebar #banner {
232 /* Rules for language selector */
234 button.d-md-none[data-bs-target="#select_language_dialog"] {
239 .select_language_list {
247 /* Utility for styling notification numbers */
250 background: transparentize(lighten($green, 25%), .25);
252 font-weight: $font-weight-normal;
255 /* Rules for Leaflet maps */
257 .leaflet-top.leaflet-right,
258 .leaflet-top.leaflet-left {
262 flex-direction: column;
263 flex-wrap: wrap-reverse;
266 .leaflet-control .control-button {
272 background-color: rgba(0,0,0,.6);
277 background-color: black;
282 background-color: rgba(0,0,0,.5);
287 border-start-start-radius: 4px;
291 border-end-start-radius: 4px;
296 .leaflet-control.active .control-button {
297 background-color: $vibrant-green;
300 /* Rules for the sidebar and main map area */
320 width: $sidebarWidth;
323 .overlay-sidebar #sidebar {
336 .sidebar-close-controls,
352 width: $sidebarWidth;
368 .leaflet-marker-draggable {
373 animation: 1500ms forwards query-marker-fade;
375 @keyframes query-marker-fade {
391 @include media-breakpoint-down(md) {
406 .overlay-sidebar.overlay-right-sidebar {
426 box-sizing: content-box;
427 top: - map.get($border-widths, 4);
428 left: - map.get($border-widths, 4);
429 --bs-btn-border-color: var(--bs-body-bg);
432 --bs-btn-border-color: var(--bs-primary-border-subtle);
437 .form-check.disabled { color: $darkgrey; }
448 top: 10px !important;
450 margin-right: 0px !important;
451 margin-top: 0px !important;
455 .leaflet-popup-scrolled {
456 padding-right: $lineheight;
457 border-bottom: 0px !important;
458 border-top: 0px !important;
461 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
462 .leaflet-contextmenu, .leaflet-contextmenu-item,
463 .leaflet-control-attribution, .leaflet-control-scale-line {
464 @extend .bg-body, .text-body;
467 .leaflet-control-attribution, .leaflet-control-scale-line {
468 @extend .bg-opacity-75;
469 text-shadow: none !important;
472 .leaflet-contextmenu-item.over {
473 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
476 .leaflet-popup-content-wrapper {
480 color: var(--bs-link-color) !important;
484 @include color-mode(dark) {
485 .leaflet-container .leaflet-control-attribution a {
486 color: var(--bs-link-color);
489 .leaflet-control-scale-line {
490 border-color: rgba(var(--bs-light-rgb), .75) !important;
494 @mixin dark-map-color-scheme {
495 .leaflet-tile-container,
496 #legend .filtered-image {
497 filter: var(--dark-mode-map-filter);
500 .leaflet-tile-container .leaflet-tile {
505 body[data-map-theme="dark"] {
506 @include dark-map-color-scheme;
509 @include color-mode(dark) {
510 body:not([data-map-theme]) {
511 @include dark-map-color-scheme;
515 /* Rules for attribution text under the main map shown on printouts */
517 .donate-attr { color: darken($green, 10%) !important; }
519 /* Temporary label size override until we remove site-wide font customisation */
530 /* Stop bootstrap 5 from floating legends when they don't need to be */
535 /* Override the text colour for primary and secondary buttons, to match our
536 bootstrap 4 colours. Note this has accessibility issues, which is why
537 bootstrap 5 calculates black as the appropriate colour, and we should
538 reconsider our colours at some point with that in mind. */
541 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
545 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
548 .btn-outline-secondary {
549 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
552 /* Rules for the search and direction forms */
554 header .search_forms,
564 input:not(:placeholder-shown) + .input-group-text .describe_location {
569 /* Rules for routing */
578 .routing_marker_column {
580 margin-right: .35rem;
588 /* Rules for the history sidebar */
590 .changeset-above-sidebar-viewport {
591 --changeset-border-color: #CC6655;
592 --changeset-fill-color: #DDBBBB;
593 --changeset-outline-color: #FFF4F4;
595 .changeset-in-sidebar-viewport {
596 --changeset-border-color: #FF9500;
597 --changeset-fill-color: #FFFFAF;
598 --changeset-outline-color: #FFFFFF;
599 &.changeset-highlight-outline {
600 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
603 .changeset-below-sidebar-viewport {
604 --changeset-border-color: #8888AA;
605 --changeset-fill-color: #CCCCDD;
606 --changeset-outline-color: #F4F4FF;
608 .changeset-highlight-outline {
609 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
612 #sidebar .changesets {
613 .changeset-color-hint-bar {
615 background: var(--changeset-border-color);
623 a.stretched-link > bdi, a:not(.stretched-link), [title] {
625 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
630 #sidebar .changeset_line .changeset_num_comments {
634 /* Rules for the browse sidebar */
640 tr > *:not([colspan]) {
641 white-space: pre-wrap;
642 word-wrap: break-word;
643 word-break: break-word;
651 .browse-element-list {
652 line-height: 1.25rem;
658 .d-flex > .browse-icon {
659 height: max(20px, 1.25rem);
668 @include color-mode(dark) {
669 #sidebar_content .browse-element-list .browse-icon-invertible {
670 filter: invert(.8) hue-rotate(180deg);
674 /* Force LTR/RTL alignment for placeholder text */
676 .form-control::placeholder {
680 /* Rules for export sidebar */
683 .export_area_inputs {
696 /* Rules for edit pages */
707 /* Rules for non-map content pages */
711 padding: $lineheight;
714 /* Rules for login and signup pages */
716 .sessions-new, .users-new, .users-create {
717 #content .content-inner {
722 .header-illustration {
723 background-position: right;
724 background-repeat: no-repeat;
732 background-image: image-url("sign-up-illustration.svg");
733 background-position-x: 70px;
737 background-image: image-url("confirm-illustration.svg");
741 background-image: image-url("terms-illustration.svg");
745 [dir=rtl] .header-illustration {
746 transform: scaleX(-1);
749 transform: scaleX(-1);
753 transform: scaleX(-1);
757 /* Rules for small maps in content areas */
761 margin-bottom: $lineheight;
764 @include media-breakpoint-up(md) {
770 /* Rules for the user map */
772 .content_map .leaflet-popup-content {
776 /* Rules for user popups on maps */
780 margin: 0 0 5px 0 !important;
785 /* Rules for the diary entry page */
792 .diary-comment .col-auto {
795 .diary-comment .col {
800 /* Rules for the issues page */
802 .issues.issues-index {
808 /* Rules for the account confirmation page */
810 .accounts-terms-show {
812 padding: $lineheight;
813 margin-bottom: $lineheight;
822 list-style-type: lower-alpha;
827 /* Rules for user images */
839 img.user_thumbnail_tiny {
845 /* General styles for action lists / subnavs */
847 nav.secondary-actions {
860 border-left: 1px solid $grey;
861 padding-left: $lineheight * 0.5;
862 margin-right: $lineheight * 0.5;
863 margin-bottom: $lineheight * 0.125;
868 div.secondary-actions {
873 /* Rules for rich text */
877 background: var(--bs-secondary-bg);
882 background: var(--bs-secondary-bg);
884 white-space: pre-wrap;
892 padding: $lineheight;
893 background-color: var(--bs-tertiary-bg);
900 border-left: $lineheight solid var(--bs-tertiary-bg);
901 padding-left: $lineheight;
903 color: var(--bs-secondary-color);
907 /* Rules for the "About" page */
909 .site-about #content {
919 color: $vibrant-green;
925 background-position: 0 50%;
926 background-repeat: no-repeat;
927 background-image: image-url('about/osm.png');
928 background-size: cover;
929 background-color: $vibrant-green;
933 background: $vibrant-green;
937 display: inline-block;
944 /* Rules for tables with usernames */
946 .messages-table .username,
947 #block_list .username {
951 /* Rules for navigation tabs */
953 .nav-tabs .username {
957 .bg-body-secondary .nav-tabs {
958 --bs-border-color: var(--bs-secondary-border-subtle);
959 --bs-secondary-bg: var(--bs-secondary-border-subtle);
963 /* Rules for traces */
966 mix-blend-mode: darken;
969 @include color-mode(dark) {
972 mix-blend-mode: lighten;
976 /* Rules for the heatmap */
979 grid-template-columns: auto;
980 grid-auto-columns: minmax(1em, 1fr);
981 grid-template-rows: auto;
982 grid-auto-rows: minmax(1em, 1fr);
986 [data-date], [data-date] span {
993 background-color: #ededed;
995 background-color: #14432a;
998 background-color: #4dd05a;
1001 box-shadow: 0px 0px 0px 1px #8884;
1006 @include color-mode(dark) {
1009 background-color: #2d333b;
1011 background-color: #4dd05a;
1014 background-color: #14432a;
1021 --bs-tooltip-max-width: none;