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 background-color: lighten($green, 30%);
127 // Small tweaks to the toggle to stop the primary colour showing through
128 // when the menu is shown
129 .show > .btn-outline-primary.dropdown-toggle {
130 background-color: $green;
131 border-color: $green;
134 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
149 nav.primary, nav.secondary {
152 background-color: $green;
158 #compact-secondary-nav {
168 flex-direction: column;
170 min-height: $headerHeight;
173 display: none !important;
185 #sidebar .search_forms {
200 flex-direction: column;
204 justify-content: center;
207 .user-menu, .login-menu {
212 #compact-secondary-nav {
217 display: inline-block;
220 .overlay-sidebar #sidebar .welcome {
224 .overlay-sidebar #sidebar #banner {
229 /* Rules for language selector */
231 button.d-md-none[data-bs-target="#select_language_dialog"] {
236 /* Utility for styling notification numbers */
239 background: transparentize(lighten($green, 25%), .25);
241 font-weight: $font-weight-normal;
244 /* Rules for Leaflet maps */
246 .leaflet-top.leaflet-right,
247 .leaflet-top.leaflet-left {
251 flex-direction: column;
252 flex-wrap: wrap-reverse;
255 .leaflet-control .control-button {
261 background-color: rgba(0,0,0,.6);
266 background-color: black;
271 background-color: rgba(0,0,0,.5);
276 border-start-start-radius: 4px;
280 border-end-start-radius: 4px;
285 .leaflet-control.active .control-button {
286 background-color: $vibrant-green;
289 /* Rules for the sidebar and main map area */
309 width: $sidebarWidth;
312 .overlay-sidebar #sidebar {
325 .sidebar-close-controls,
341 width: $sidebarWidth;
357 .leaflet-marker-draggable {
362 animation: 1500ms forwards query-marker-fade;
364 @keyframes query-marker-fade {
380 @include media-breakpoint-down(md) {
395 .overlay-sidebar.overlay-right-sidebar {
415 box-sizing: content-box;
416 top: - map.get($border-widths, 4);
417 left: - map.get($border-widths, 4);
418 --bs-btn-border-color: var(--bs-body-bg);
421 --bs-btn-border-color: var(--bs-primary-border-subtle);
426 .form-check.disabled { color: $darkgrey; }
437 top: 10px !important;
439 margin-right: 0px !important;
440 margin-top: 0px !important;
444 .leaflet-popup-scrolled {
445 padding-right: $lineheight;
446 border-bottom: 0px !important;
447 border-top: 0px !important;
450 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
451 .leaflet-contextmenu, .leaflet-contextmenu-item,
452 .leaflet-control-attribution, .leaflet-control-scale-line {
453 @extend .bg-body, .text-body;
456 .leaflet-control-attribution, .leaflet-control-scale-line {
457 @extend .bg-opacity-75;
458 text-shadow: none !important;
461 .leaflet-contextmenu-item.over {
462 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
465 .leaflet-popup-content-wrapper {
469 color: var(--bs-link-color) !important;
473 @include color-mode(dark) {
474 .leaflet-container .leaflet-control-attribution a {
475 color: var(--bs-link-color);
478 .leaflet-control-scale-line {
479 border-color: rgba(var(--bs-light-rgb), .75) !important;
483 @mixin dark-map-color-scheme {
484 .leaflet-tile-container,
485 #legend .filtered-image {
486 filter: var(--dark-mode-map-filter);
489 .leaflet-tile-container .leaflet-tile {
494 body[data-map-theme="dark"] {
495 @include dark-map-color-scheme;
498 @include color-mode(dark) {
499 body:not([data-map-theme]) {
500 @include dark-map-color-scheme;
504 /* Rules for attribution text under the main map shown on printouts */
506 .donate-attr { color: darken($green, 10%) !important; }
508 /* Temporary label size override until we remove site-wide font customisation */
519 /* Stop bootstrap 5 from floating legends when they don't need to be */
524 /* Override the text colour for primary and secondary buttons, to match our
525 bootstrap 4 colours. Note this has accessibility issues, which is why
526 bootstrap 5 calculates black as the appropriate colour, and we should
527 reconsider our colours at some point with that in mind. */
530 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
534 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
537 .btn-outline-secondary {
538 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
541 /* Rules for the search and direction forms */
543 header .search_forms,
554 /* Rules for routing */
563 .routing_marker_column {
565 margin-right: .35rem;
573 /* Rules for the history sidebar */
575 .changeset-above-sidebar-viewport {
576 --changeset-border-color: #CC6655;
577 --changeset-fill-color: #DDBBBB;
578 --changeset-outline-color: #FFF4F4;
580 .changeset-in-sidebar-viewport {
581 --changeset-border-color: #FF9500;
582 --changeset-fill-color: #FFFFAF;
583 --changeset-outline-color: #FFFFFF;
584 &.changeset-highlight-outline {
585 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .75));
588 .changeset-below-sidebar-viewport {
589 --changeset-border-color: #8888AA;
590 --changeset-fill-color: #CCCCDD;
591 --changeset-outline-color: #F4F4FF;
593 .changeset-highlight-outline {
594 filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .25));
597 #sidebar .changesets {
598 .changeset-color-hint-bar {
600 background: var(--changeset-border-color);
608 a.stretched-link > bdi, a:not(.stretched-link), [title] {
610 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
615 /* Rules for the browse sidebar */
619 padding-bottom: $spacer;
620 margin-bottom: $spacer;
621 border-bottom: 1px solid $grey;
624 word-wrap: break-word;
628 .browse-section:last-of-type {
634 white-space: pre-wrap;
635 word-wrap: break-word;
636 word-break: break-word;
638 tr:last-child th, tr:last-child td {
648 /* Force LTR/RTL alignment for placeholder text */
650 .form-control::placeholder {
654 /* Rules for export sidebar */
657 .export_area_inputs {
670 /* Rules for edit pages */
681 /* Rules for non-map content pages */
685 padding: $lineheight;
688 /* Rules for login and signup pages */
690 .sessions-new, .users-new, .users-create {
691 #content .content-inner {
696 .header-illustration {
697 background-position: right;
698 background-repeat: no-repeat;
706 background-image: image-url("sign-up-illustration.svg");
707 background-position-x: 70px;
711 background-image: image-url("confirm-illustration.svg");
715 background-image: image-url("terms-illustration.svg");
719 [dir=rtl] .header-illustration {
720 transform: scaleX(-1);
723 transform: scaleX(-1);
727 transform: scaleX(-1);
731 /* Rules for small maps in content areas */
735 margin-bottom: $lineheight;
738 @include media-breakpoint-up(md) {
744 /* Rules for the user map */
746 .content_map .leaflet-popup-content {
750 /* Rules for user popups on maps */
754 margin: 0 0 5px 0 !important;
759 /* Rules for the diary entry page */
766 .diary-comment .col-auto {
769 .diary-comment .col {
774 /* Rules for the issues page */
776 .issues.issues-index {
782 /* Rules for the account confirmation page */
784 .accounts-terms-show {
786 padding: $lineheight;
787 margin-bottom: $lineheight;
796 list-style-type: lower-alpha;
801 /* Rules for user images */
813 img.user_thumbnail_tiny {
819 /* General styles for action lists / subnavs */
821 nav.secondary-actions {
834 border-left: 1px solid $grey;
835 padding-left: $lineheight * 0.5;
836 margin-right: $lineheight * 0.5;
837 margin-bottom: $lineheight * 0.125;
842 div.secondary-actions {
847 /* Rules for rich text */
851 background: var(--bs-secondary-bg);
856 background: var(--bs-secondary-bg);
858 white-space: pre-wrap;
866 padding: $lineheight;
867 background-color: var(--bs-tertiary-bg);
874 border-left: $lineheight solid var(--bs-tertiary-bg);
875 padding-left: $lineheight;
877 color: var(--bs-secondary-color);
881 /* Rules for the "About" page */
883 .site-about #content {
893 color: $vibrant-green;
899 background-position: 0 50%;
900 background-repeat: no-repeat;
901 background-image: image-url('about/osm.png');
902 background-size: cover;
903 background-color: $vibrant-green;
907 background: $vibrant-green;
911 display: inline-block;
918 /* Rules for tables with usernames */
920 .messages-table .username,
921 #block_list .username {
925 /* Rules for navigation tabs */
927 .nav-tabs .username {
931 .bg-body-secondary .nav-tabs {
932 --bs-border-color: var(--bs-secondary-border-subtle);
933 --bs-secondary-bg: var(--bs-secondary-border-subtle);
937 /* Rules for traces */
940 mix-blend-mode: darken;
943 @include color-mode(dark) {
946 mix-blend-mode: lighten;
950 /* Rules for map sidebar icons */
952 .browse-section .browse-element-list {
953 line-height: 1.25rem;
959 .d-flex > .browse-icon {
960 height: max(20px, 1.25rem);
963 @include color-mode(dark) {
964 .browse-icon-invertible {
965 filter: invert(.8) hue-rotate(180deg);
970 /* Rules for the social links */
972 @include color-mode(dark) {
978 /* Rules for the heatmap */
981 grid-template-columns: auto;
982 grid-auto-columns: minmax(1em, 1fr);
983 grid-template-rows: auto;
984 grid-auto-rows: minmax(1em, 1fr);
988 [data-date], [data-date] span {
995 background-color: #ededed;
997 background-color: #14432a;
1000 background-color: #4dd05a;
1003 box-shadow: 0px 0px 0px 1px #8884;
1008 @include color-mode(dark) {
1011 background-color: #2d333b;
1013 background-color: #4dd05a;
1016 background-color: #14432a;
1023 --bs-tooltip-max-width: none;