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;
22 display: inline-block;
26 background: transparent image-url("sprite.svg") no-repeat 0 0;
31 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
32 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
33 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
34 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
35 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
36 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
37 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
38 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
39 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
40 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
41 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
42 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
43 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
44 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
45 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
46 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
47 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
49 /* Utility for de-emphasizing content */
51 .text-body-secondary a {
55 /* Bootstrap contextual table classes overrides in dark mode */
57 @include color-mode(dark) {
59 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
62 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
65 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
67 .table-primary, .table-secondary, .table-success {
68 --bs-table-color: initial;
69 border-color: inherit;
73 /* Utility for delayed loading spinner */
76 animation: 300ms linear forwards delayed-fade-in;
79 @keyframes delayed-fade-in {
85 /* Bootstrap close button overrides for nested light/dark themes */
87 [data-bs-theme="dark"],
88 [data-bs-theme] [data-bs-theme="dark"] {
89 --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
92 [data-bs-theme="light"],
93 [data-bs-theme] [data-bs-theme="light"] {
94 --bs-btn-close-filter: none;
97 /* Rules for the header */
104 background: image-url("menu-icon.svg") no-repeat;
105 background-size: 30px 30px;
108 margin: 14px 10px 0 0;
112 @include color-mode(dark) {
119 height: $headerHeight;
124 padding: $lineheight * 0.5;
128 height: $headerHeight;
142 #edit_tab .btn-outline-primary {
143 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
147 .btn-outline-primary {
152 border-top-color: $grey;
156 background-color: lighten($green, 30%);
161 // Small tweaks to the toggle to stop the primary colour showing through
162 // when the menu is shown
163 .show > .btn-outline-primary.dropdown-toggle {
164 background-color: $green;
165 border-color: $green;
168 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
183 nav.primary, nav.secondary {
186 background-color: $green;
192 #compact-secondary-nav {
202 flex-direction: column;
204 min-height: $headerHeight;
207 display: none !important;
219 #sidebar .search_forms {
234 flex-direction: column;
238 justify-content: center;
241 .user-menu, .login-menu {
246 #compact-secondary-nav {
251 display: inline-block;
254 .overlay-sidebar #sidebar .welcome {
258 .overlay-sidebar #sidebar #banner {
263 /* Utility for styling notification numbers */
266 background: transparentize(lighten($green, 25%), .25);
268 font-weight: $font-weight-normal;
271 /* Rules for Leaflet maps */
273 .leaflet-top.leaflet-right,
274 .leaflet-top.leaflet-left {
278 flex-direction: column;
279 flex-wrap: wrap-reverse;
282 .leaflet-control .control-button {
286 background-color: #333;
287 background-color: rgba(0,0,0,.6);
292 background-color: black;
297 background-color: #333;
298 background-color: rgba(0,0,0,.5);
303 background-color: $vibrant-green;
307 border-start-start-radius: 4px;
311 border-end-start-radius: 4px;
320 /* Rules for the sidebar and main map area */
340 width: $sidebarWidth;
343 .overlay-sidebar #sidebar {
356 .sidebar-close-controls,
372 width: $sidebarWidth;
388 .leaflet-marker-draggable {
393 animation: 1500ms forwards query-marker-fade;
395 @keyframes query-marker-fade {
411 @include media-breakpoint-down(md) {
426 .overlay-sidebar.overlay-right-sidebar {
446 box-sizing: content-box;
447 top: - map.get($border-widths, 4);
448 left: - map.get($border-widths, 4);
449 --bs-btn-border-color: var(--bs-body-bg);
452 --bs-btn-border-color: var(--bs-primary-border-subtle);
457 li.disabled { color: $darkgrey; }
468 top: 10px !important;
470 margin-right: 0px !important;
471 margin-top: 0px !important;
475 .leaflet-popup-scrolled {
476 padding-right: $lineheight;
477 border-bottom: 0px !important;
478 border-top: 0px !important;
481 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
482 .leaflet-contextmenu, .leaflet-contextmenu-item,
483 .leaflet-control-attribution, .leaflet-control-scale-line {
484 @extend .bg-body, .text-body;
487 .leaflet-control-attribution, .leaflet-control-scale-line {
488 @extend .bg-opacity-75;
489 text-shadow: none !important;
492 .leaflet-contextmenu-item.over {
493 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
496 .leaflet-popup-content-wrapper {
500 color: var(--bs-link-color) !important;
504 @include color-mode(dark) {
505 .leaflet-container .leaflet-control-attribution a {
506 color: var(--bs-link-color);
509 .leaflet-control-scale-line {
510 border-color: rgba(var(--bs-light-rgb), .75) !important;
514 @mixin dark-map-color-scheme {
515 .leaflet-tile-container,
516 .mapkey-table-entry td:first-child > * {
517 filter: var(--dark-mode-map-filter);
520 .leaflet-tile-container .leaflet-tile {
525 body[data-map-theme="dark"] {
526 @include dark-map-color-scheme;
529 @include color-mode(dark) {
530 body:not([data-map-theme]) {
531 @include dark-map-color-scheme;
535 /* Rules for attribution text under the main map shown on printouts */
537 .donate-attr { color: darken($green, 10%) !important; }
539 /* Temporary label size override until we remove site-wide font customisation */
550 /* Stop bootstrap 5 from floating legends when they don't need to be */
555 /* Override the text colour for primary and secondary buttons, to match our
556 bootstrap 4 colours. Note this has accessibility issues, which is why
557 bootstrap 5 calculates black as the appropriate colour, and we should
558 reconsider our colours at some point with that in mind. */
561 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
565 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
568 .btn-outline-secondary {
569 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
572 /* Rules for the search and direction forms */
574 header .search_forms,
585 /* Rules for routing */
594 .routing_marker_column {
596 margin-right: .35rem;
604 /* Rules for the history sidebar */
606 .changeset-above-sidebar-viewport {
607 --changeset-border-color: #CC6655;
608 --changeset-fill-color: #DDBBBB;
609 --changeset-outline-color: #FFF4F4;
611 .changeset-in-sidebar-viewport {
612 --changeset-border-color: #FF9500;
613 &.changeset-highlighted {
614 --changeset-border-color: #FF6600;
616 --changeset-fill-color: #FFFFAF;
617 --changeset-outline-color: #FFFFFF;
619 .changeset-below-sidebar-viewport {
620 --changeset-border-color: #8888AA;
621 --changeset-fill-color: #CCCCDD;
622 --changeset-outline-color: #F4F4FF;
625 #sidebar .changesets {
626 .changeset-color-hint-bar {
628 background: var(--changeset-border-color);
636 a.stretched-link > span, a:not(.stretched-link), [title] {
638 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
643 /* Rules for the browse sidebar */
647 padding-bottom: $spacer;
648 margin-bottom: $spacer;
649 border-bottom: 1px solid $grey;
652 word-wrap: break-word;
656 .browse-section:last-of-type {
662 white-space: pre-wrap;
663 word-wrap: break-word;
664 word-break: break-word;
666 tr:last-child th, tr:last-child td {
676 /* Force LTR/RTL alignment for placeholder text */
678 .form-control::placeholder {
682 /* Rules for export sidebar */
685 .export_area_inputs {
698 /* Rules for edit pages */
709 /* Rules for non-map content pages */
713 padding: $lineheight;
716 /* Rules for login and signup pages */
718 .sessions-new, .users-new, .users-create {
719 #content .content-inner {
724 .header-illustration {
725 background-position: right;
726 background-repeat: no-repeat;
734 background-image: image-url("sign-up-illustration.svg");
735 background-position-x: 70px;
739 background-image: image-url("confirm-illustration.svg");
743 background-image: image-url("terms-illustration.svg");
747 [dir=rtl] .header-illustration {
748 transform: scaleX(-1);
751 transform: scaleX(-1);
755 transform: scaleX(-1);
759 /* Rules for small maps in content areas */
763 margin-bottom: $lineheight;
766 @include media-breakpoint-up(md) {
772 /* Rules for the user map */
774 .content_map .leaflet-popup-content {
779 /* Rules for user popups on maps */
789 /* Rules for the diary entry page */
796 .diary-comment .col-auto {
799 .diary-comment .col {
804 /* Rules for the issues page */
806 .issues.issues-index {
812 /* Rules for the account confirmation page */
814 .accounts-terms-show {
816 padding: $lineheight;
817 margin-bottom: $lineheight;
826 list-style-type: lower-alpha;
831 /* Rules for user images */
843 img.user_thumbnail_tiny {
849 /* General styles for action lists / subnavs */
851 nav.secondary-actions {
864 border-left: 1px solid $grey;
865 padding-left: $lineheight * 0.5;
866 margin-right: $lineheight * 0.5;
867 margin-bottom: $lineheight * 0.125;
872 div.secondary-actions {
877 /* Rules for rich text */
881 background: var(--bs-secondary-bg);
886 background: var(--bs-secondary-bg);
888 white-space: pre-wrap;
896 padding: $lineheight;
897 background-color: var(--bs-tertiary-bg);
904 border-left: $lineheight solid var(--bs-tertiary-bg);
905 padding-left: $lineheight;
907 color: var(--bs-secondary-color);
911 /* Rules for the "About" page */
913 .site-about #content {
923 color: $vibrant-green;
929 background-position: 0 50%;
930 background-repeat: no-repeat;
931 background-image: image-url('about/osm.png');
932 background-size: cover;
933 background-color: $vibrant-green;
937 background: $vibrant-green;
941 display: inline-block;
948 /* Rules for tables with usernames */
950 .messages-table .username,
951 #block_list .username {
955 /* Rules for navigation tabs */
957 .nav-tabs .username {
961 .bg-body-secondary .nav-tabs {
962 --bs-border-color: var(--bs-secondary-border-subtle);
963 --bs-secondary-bg: var(--bs-secondary-border-subtle);
967 /* Rules for traces */
970 mix-blend-mode: darken;
973 @include color-mode(dark) {
976 mix-blend-mode: lighten;
980 /* Rules for map sidebar icons */
982 .browse-section .browse-element-list {
983 line-height: 1.25rem;
989 .d-flex > .browse-icon {
990 height: max(20px, 1.25rem);
993 @include color-mode(dark) {
994 .browse-icon-invertible {
995 filter: invert(.8) hue-rotate(180deg);