5 @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;
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 /* Rules for the header */
92 background: image-url("menu-icon.svg") no-repeat;
93 background-size: 30px 30px;
96 margin: 14px 10px 0 0;
100 @include color-mode(dark) {
107 height: $headerHeight;
112 padding: $lineheight * 0.5;
116 height: $headerHeight;
134 #edit_tab .btn-outline-primary {
135 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
139 .btn-outline-primary {
144 border-top-color: $grey;
148 background-color: lighten($green, 30%);
153 // Small tweaks to the toggle to stop the primary colour showing through
154 // when the menu is shown
155 .show > .btn-outline-primary.dropdown-toggle {
156 background-color: $green;
157 border-color: $green;
160 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
171 nav.primary, nav.secondary {
174 background-color: $green;
180 #compact-secondary-nav {
185 #compact-secondary-nav {
186 display: inline-block;
199 flex-direction: column;
201 min-height: $headerHeight;
204 display: none !important;
212 #sidebar .search_forms {
227 flex-direction: column;
229 .user-menu, .login-menu {
234 #compact-secondary-nav {
239 display: inline-block;
242 .overlay-sidebar #sidebar .welcome {
246 .overlay-sidebar #sidebar #banner {
251 /* Utility for styling notification numbers */
254 background: transparentize(lighten($green, 25%), .25);
256 font-weight: $font-weight-normal;
259 /* Rules for Leaflet maps */
261 .leaflet-top.leaflet-right,
262 .leaflet-top.leaflet-left {
266 flex-direction: column;
267 flex-wrap: wrap-reverse;
270 .leaflet-control .control-button {
274 background-color: #333;
275 background-color: rgba(0,0,0,.6);
280 background-color: black;
285 background-color: #333;
286 background-color: rgba(0,0,0,.5);
291 background-color: $vibrant-green;
295 border-start-start-radius: 4px;
299 border-end-start-radius: 4px;
308 /* Rules for the sidebar and main map area */
328 width: $sidebarWidth;
335 .overlay-sidebar #sidebar {
362 width: $sidebarWidth;
378 .leaflet-marker-draggable {
383 animation: 1500ms forwards query-marker-fade;
385 @keyframes query-marker-fade {
401 @include media-breakpoint-down(md) {
416 .overlay-sidebar.overlay-right-sidebar {
436 box-sizing: content-box;
437 top: - map.get($border-widths, 4);
438 left: - map.get($border-widths, 4);
439 --bs-btn-border-color: var(--bs-body-bg);
442 --bs-btn-border-color: var(--bs-primary-border-subtle);
447 li.disabled { color: $darkgrey; }
458 top: 10px !important;
460 margin-right: 0px !important;
461 margin-top: 0px !important;
465 .leaflet-popup-scrolled {
466 padding-right: $lineheight;
467 border-bottom: 0px !important;
468 border-top: 0px !important;
471 .leaflet-popup-content-wrapper, .leaflet-popup-tip,
472 .leaflet-contextmenu, .leaflet-contextmenu-item,
473 .leaflet-control-attribution, .leaflet-control-scale-line {
474 @extend .bg-body, .text-body;
477 .leaflet-control-attribution, .leaflet-control-scale-line {
478 @extend .bg-opacity-75;
479 text-shadow: none !important;
482 .leaflet-contextmenu-item.over {
483 @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
486 .leaflet-popup-content-wrapper {
490 color: var(--bs-link-color) !important;
494 @include color-mode(dark) {
495 .leaflet-tile-container,
496 .mapkey-table-entry td:first-child > * {
497 filter: brightness(.8);
500 .leaflet-control-attribution a {
501 color: var(--bs-link-color);
504 .leaflet-control-scale-line {
505 @extend .border-light, .border-opacity-75;
509 /* Rules for attribution text under the main map shown on printouts */
511 .donate-attr { color: darken($green, 10%) !important; }
513 /* Temporary label size override until we remove site-wide font customisation */
524 /* Stop bootstrap 5 from floating legends when they don't need to be */
529 /* Override the text colour for primary and secondary buttons, to match our
530 bootstrap 4 colours. Note this has accessibility issues, which is why
531 bootstrap 5 calculates black as the appropriate colour, and we should
532 reconsider our colours at some point with that in mind. */
535 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
539 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
542 .btn-outline-secondary {
543 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
546 /* Rules for the search and direction forms */
548 header .search_forms,
559 /* Rules for search sidebar */
561 #sidebar .search_results_entry {
562 .search_more .loader {
567 /* Rules for routing */
570 background-image: image-url('routing-sprite.svg');
573 background-repeat: no-repeat;
575 @for $i from 0 through 25 {
576 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
579 @include color-mode(dark) {
592 .routing_marker_column {
600 /* Rules for the history sidebar */
602 #sidebar .changesets {
608 a.stretched-link > span, a:not(.stretched-link), [title] {
610 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
614 .changeset_more .loader {
620 /* Rules for the browse sidebar */
624 padding-bottom: $spacer;
625 margin-bottom: $spacer;
626 border-bottom: 1px solid $grey;
629 word-wrap: break-word;
633 .browse-section:last-of-type {
639 white-space: pre-wrap;
640 word-wrap: break-word;
641 word-break: break-word;
643 tr:last-child th, tr:last-child td {
653 /* Force LTR/RTL alignment for placeholder text */
655 .form-control::placeholder {
659 /* Rules for export sidebar */
662 .export_area_inputs {
673 /*rtl:ignore*/ float: left;
676 /*rtl:ignore*/ float: right;
681 /* Rules for edit pages */
692 /* Rules for non-map content pages */
698 padding: $lineheight;
701 /* Rules for login and signup pages */
703 .sessions-new, .users-new, .users-create {
704 #content .content-inner {
709 .header-illustration {
710 background-position: right;
711 background-repeat: no-repeat;
719 background-image: image-url("sign-up-illustration.svg");
720 background-position-x: 70px;
724 background-image: image-url("confirm-illustration.svg");
728 background-image: image-url("terms-illustration.svg");
732 [dir=rtl] .header-illustration {
733 transform: scaleX(-1);
736 transform: scaleX(-1);
740 transform: scaleX(-1);
744 /* Rules for small maps in content areas */
748 margin-bottom: $lineheight;
751 @include media-breakpoint-up(md) {
757 /* Rules for the user map */
759 .content_map .leaflet-popup-content {
764 /* Rules for user popups on maps */
774 /* Rules for the diary entry page */
781 .diary-comment .col-auto {
784 .diary-comment .col {
789 /* Rules for the account confirmation page */
793 padding: $lineheight;
794 margin-bottom: $lineheight;
803 list-style-type: lower-alpha;
808 /* Rules for user images */
820 img.user_thumbnail_tiny {
826 /* General styles for action lists / subnavs */
828 nav.secondary-actions {
841 border-left: 1px solid $grey;
842 padding-left: $lineheight * 0.5;
843 margin-right: $lineheight * 0.5;
844 margin-bottom: $lineheight * 0.125;
849 div.secondary-actions {
854 /* Rules for rich text */
858 background: var(--bs-secondary-bg);
863 background: var(--bs-secondary-bg);
865 white-space: pre-wrap;
873 padding: $lineheight;
874 background-color: var(--bs-tertiary-bg);
881 border-left: $lineheight solid var(--bs-tertiary-bg);
882 padding-left: $lineheight;
884 color: var(--bs-secondary-color);
888 /* Rules for the "About" page */
890 .site-about #content {
900 color: $vibrant-green;
906 background-position: 0 50%;
907 background-repeat: no-repeat;
908 background-image: image-url('about/osm.png');
909 background-size: cover;
910 background-color: $vibrant-green;
914 background: $vibrant-green;
918 display: inline-block;
925 /* Rules for block pages */
927 #block_list .username {
931 /* Rules for tabs inside secondary background sections */
933 .bg-body-secondary .nav-tabs {
934 --bs-border-color: var(--bs-secondary-border-subtle);
935 --bs-secondary-bg: var(--bs-secondary-border-subtle);
939 /* Rules for traces */
942 mix-blend-mode: darken;
945 @include color-mode(dark) {
948 mix-blend-mode: lighten;
952 /* Rules for map sidebar icons */
958 display: inline-block;
963 .node, .way, .relation {
968 @each $class, $item in $map-sidebar-icons {
969 .browse-section #{$class}::before {
970 content: image-url('browse/#{map.get($item, "filename")}');
973 @if map.get($item, "invert") {
974 @include color-mode(dark) {
975 .browse-section #{$class}::before {
976 filter: invert(.8) hue-rotate(180deg);