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 fill: var(--bs-emphasis-color);
76 stroke: var(--bs-body-bg);
81 height: $headerHeight;
86 padding: $lineheight * 0.5;
90 height: $headerHeight;
92 gap: $lineheight * 0.5;
105 #edit_tab .btn-outline-primary {
106 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
110 .btn-outline-primary {
115 background-color: lighten($green, 30%);
120 // Small tweaks to the toggle to stop the primary colour showing through
121 // when the menu is shown
122 .show > .btn-outline-primary.dropdown-toggle {
123 background-color: $green;
124 border-color: $green;
127 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
142 nav.primary, nav.secondary {
145 background-color: $green;
151 #compact-secondary-nav {
161 flex-direction: column;
163 min-height: $headerHeight;
166 display: none !important;
178 #sidebar .search_forms {
193 flex-direction: column;
197 justify-content: center;
200 .user-menu, .login-menu {
205 #compact-secondary-nav {
210 display: inline-block;
213 .overlay-sidebar #sidebar .welcome {
217 .overlay-sidebar #sidebar #banner {
222 /* Rules for language selector */
224 .select_language_list {
232 /* Utility for styling notification numbers */
235 background: transparentize(lighten($green, 25%), .25);
237 font-weight: $font-weight-normal;
240 /* Rules for Leaflet maps */
242 .leaflet-top.leaflet-right,
243 .leaflet-top.leaflet-left {
247 flex-direction: column;
248 flex-wrap: wrap-reverse;
251 .leaflet-control .control-button {
257 background-color: rgba(0,0,0,.6);
262 background-color: black;
267 background-color: rgba(0,0,0,.5);
272 border-start-start-radius: 4px;
276 border-end-start-radius: 4px;
281 .leaflet-control.active .control-button {
282 background-color: $vibrant-green;
285 /* Rules for the sidebar and main map area */
305 width: $sidebarWidth;
308 .overlay-sidebar #sidebar {
321 .sidebar-close-controls,
337 width: $sidebarWidth;
353 .leaflet-marker-draggable {
358 animation: 1500ms forwards query-marker-fade;
360 @keyframes query-marker-fade {
376 @include media-breakpoint-down(md) {
391 .overlay-sidebar.overlay-right-sidebar {
411 box-sizing: content-box;
412 top: - map.get($border-widths, 4);
413 left: - map.get($border-widths, 4);
414 --bs-btn-border-color: var(--bs-body-bg);
417 --bs-btn-border-color: var(--bs-primary-border-subtle);
422 .form-check.disabled { color: $darkgrey; }
433 top: 10px !important;
435 margin-right: 0px !important;
436 margin-top: 0px !important;
440 .leaflet-popup-scrolled {
441 padding-right: $lineheight;
442 border-bottom: 0px !important;
443 border-top: 0px !important;
446 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
447 .leaflet-contextmenu, .leaflet-contextmenu-item,
448 .leaflet-control-attribution, .leaflet-control-scale-line {
449 @extend .bg-body, .text-body;
452 .leaflet-control-attribution, .leaflet-control-scale-line {
453 @extend .bg-opacity-75;
454 text-shadow: none !important;
457 .leaflet-contextmenu-item.over {
458 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
461 .leaflet-popup-content-wrapper {
465 color: var(--bs-link-color) !important;
469 @include color-mode(dark) {
470 .leaflet-container .leaflet-control-attribution a {
471 color: var(--bs-link-color);
474 .leaflet-control-scale-line {
475 border-color: rgba(var(--bs-light-rgb), .75) !important;
479 @mixin dark-map-color-scheme {
480 .leaflet-tile-container,
481 #legend .filtered-image {
482 filter: var(--dark-mode-map-filter);
485 .leaflet-tile-container .leaflet-tile {
490 body[data-map-theme="dark"] {
491 @include dark-map-color-scheme;
494 @include color-mode(dark) {
495 body:not([data-map-theme]) {
496 @include dark-map-color-scheme;
500 /* Rules for attribution text under the main map shown on printouts */
502 .donate-attr { color: darken($green, 10%) !important; }
504 /* Temporary label size override until we remove site-wide font customisation */
515 /* Stop bootstrap 5 from floating legends when they don't need to be */
520 /* Override the text colour for primary and secondary buttons, to match our
521 bootstrap 4 colours. Note this has accessibility issues, which is why
522 bootstrap 5 calculates black as the appropriate colour, and we should
523 reconsider our colours at some point with that in mind. */
526 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
530 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
533 .btn-outline-secondary {
534 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
537 /* Rules for the search and direction forms */
539 header .search_forms,
549 input:not(:placeholder-shown) + .input-group-text .describe_location {
554 /* Rules for search results */
556 .search_results_entry li.list-group-item {
557 border-right: 1em solid var(--marker-color);
560 .leaflet-marker-icon:is(.active, :hover) > svg {
561 transform: scale(1.5);
562 transform-origin: bottom;
565 /* Rules for routing */
574 .routing_marker_column {
576 margin-right: .35rem;
584 /* Rules for the history sidebar */
586 .changeset-above-sidebar-viewport {
587 --changeset-border-color: #CC6655;
588 --changeset-fill-color: #DDBBBB;
589 --changeset-outline-color: #FFF4F4;
591 .changeset-in-sidebar-viewport {
592 --changeset-border-color: #FF9500;
593 --changeset-fill-color: #FFFFAF;
594 --changeset-outline-color: #FFFFFF;
595 &.changeset-highlight-outline {
596 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
599 .changeset-below-sidebar-viewport {
600 --changeset-border-color: #8888AA;
601 --changeset-fill-color: #CCCCDD;
602 --changeset-outline-color: #F4F4FF;
604 .changeset-highlight-outline {
605 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
608 #sidebar .changesets {
609 .changeset-color-hint-bar {
611 background: var(--changeset-border-color);
619 a.stretched-link > bdi, a:not(.stretched-link), [title] {
621 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
626 #sidebar .changeset_line .changeset_num_comments {
630 /* Rules for the browse sidebar */
636 tr > *:not([colspan]) {
637 white-space: pre-wrap;
638 word-wrap: break-word;
639 word-break: break-word;
647 .browse-element-list {
648 line-height: 1.25rem;
654 .d-flex > .browse-icon {
655 height: max(20px, 1.25rem);
664 @include color-mode(dark) {
665 #sidebar_content .browse-element-list .browse-icon-invertible {
666 filter: invert(.8) hue-rotate(180deg);
670 /* Force LTR/RTL alignment for placeholder text */
672 .form-control::placeholder {
676 /* Rules for export sidebar */
679 .export_area_inputs {
692 /* Rules for edit pages */
703 /* Rules for non-map content pages */
707 padding: $lineheight;
710 /* Rules for login and signup pages */
712 .sessions-new, .users-new, .users-create {
713 #content .content-inner {
718 .header-illustration {
719 background-position: right;
720 background-repeat: no-repeat;
728 background-image: image-url("sign-up-illustration.svg");
729 background-position-x: 70px;
733 background-image: image-url("confirm-illustration.svg");
737 background-image: image-url("terms-illustration.svg");
741 [dir=rtl] .header-illustration {
742 transform: scaleX(-1);
745 transform: scaleX(-1);
749 transform: scaleX(-1);
753 /* Rules for small maps in content areas */
757 margin-bottom: $lineheight;
760 @include media-breakpoint-up(md) {
766 /* Rules for the user map */
768 .content_map .leaflet-popup-content {
772 /* Rules for user popups on maps */
776 margin: 0 0 5px 0 !important;
781 /* Rules for the diary entry page */
788 .diary-comment .col-auto {
791 .diary-comment .col {
796 /* Rules for the issues page */
798 .issues.issues-index {
804 /* Rules for the account confirmation page */
806 .accounts-terms-show {
808 padding: $lineheight;
809 margin-bottom: $lineheight;
818 list-style-type: lower-alpha;
823 /* Rules for user images */
835 img.user_thumbnail_tiny {
841 /* General styles for action lists / subnavs */
843 nav.secondary-actions {
856 border-left: 1px solid $grey;
857 padding-left: $lineheight * 0.5;
858 margin-right: $lineheight * 0.5;
859 margin-bottom: $lineheight * 0.125;
864 div.secondary-actions {
869 /* Rules for rich text */
873 background: var(--bs-secondary-bg);
878 background: var(--bs-secondary-bg);
880 white-space: pre-wrap;
888 padding: $lineheight;
889 background-color: var(--bs-tertiary-bg);
896 border-left: $lineheight solid var(--bs-tertiary-bg);
897 padding-left: $lineheight;
899 color: var(--bs-secondary-color);
903 /* Rules for the "About" page */
905 .site-about #content {
915 color: $vibrant-green;
921 background-position: 0 50%;
922 background-repeat: no-repeat;
923 background-image: image-url('about/osm.png');
924 background-size: cover;
925 background-color: $vibrant-green;
929 background: $vibrant-green;
933 display: inline-block;
940 /* Rules for tables with usernames */
942 .messages-table .username,
943 #block_list .username {
947 /* Rules for navigation tabs */
949 .nav-tabs .username {
953 .bg-body-secondary .nav-tabs {
954 --bs-border-color: var(--bs-secondary-border-subtle);
955 --bs-secondary-bg: var(--bs-secondary-border-subtle);
959 /* Rules for traces */
962 mix-blend-mode: darken;
965 @include color-mode(dark) {
968 mix-blend-mode: lighten;
972 /* Rules for the heatmap */
975 grid-template-columns: auto;
976 grid-auto-columns: minmax(1em, 1fr);
977 grid-template-rows: auto;
978 grid-auto-rows: minmax(1em, 1fr);
982 [data-date], [data-date] span {
989 background-color: #ededed;
991 background-color: #14432a;
994 background-color: #4dd05a;
997 box-shadow: 0px 0px 0px 1px #8884;
1002 @include color-mode(dark) {
1005 background-color: #2d333b;
1007 background-color: #4dd05a;
1010 background-color: #14432a;
1017 --bs-tooltip-max-width: none;