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;
19 #container { position: relative; }
24 display: inline-block;
28 background: transparent image-url("sprite.svg") no-repeat 0 0;
33 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
34 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
35 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
36 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
37 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
38 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
39 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
40 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
41 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
42 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
43 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
44 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
45 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
46 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
47 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
48 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
49 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
51 /* Utility for de-emphasizing content */
53 .text-body-secondary a {
57 /* Bootstrap contextual table classes overrides in dark mode */
59 @include color-mode(dark) {
61 --bs-table-bg: rgb(var(--bs-primary-rgb), .25);
64 --bs-table-bg: rgb(var(--bs-secondary-rgb), .25);
67 --bs-table-bg: rgb(var(--bs-success-rgb), .25);
69 .table-primary, .table-secondary, .table-success {
70 --bs-table-color: initial;
71 border-color: inherit;
75 /* Rules for the header */
82 background: image-url("menu-icon.svg") no-repeat;
83 background-size: 30px 30px;
86 margin: 14px 10px 0 0;
90 @include color-mode(dark) {
97 height: $headerHeight;
101 h1, nav, nav > ul, nav > ul > li {
102 display: inline-block;
106 padding: $lineheight * 0.5;
110 height: $headerHeight;
124 & > .btn-group .btn-outline-primary {
125 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
129 .btn-outline-primary {
134 border-top-color: $grey;
138 background-color: lighten($green, 30%);
143 // Small tweaks to the toggle to stop the primary colour showing through
144 // when the menu is shown
145 .show > .btn-outline-primary.dropdown-toggle {
146 background-color: $green;
147 border-color: $green;
150 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
161 nav.primary, nav.secondary {
164 background-color: $green;
170 #compact-secondary-nav {
175 #compact-secondary-nav {
176 display: inline-block;
189 flex-direction: column;
191 min-height: $headerHeight;
202 #sidebar .search_forms,
219 .user-menu, .login-menu {
224 #compact-secondary-nav {
229 display: inline-block;
232 .overlay-sidebar #sidebar .welcome {
236 .overlay-sidebar #sidebar #banner {
241 /* Utility for styling notification numbers */
244 background: transparentize(lighten($green, 25%), .25);
246 font-weight: $font-weight-normal;
249 /* Rules for Leaflet maps */
251 .leaflet-top.leaflet-right,
252 .leaflet-top.leaflet-left {
256 flex-direction: column;
257 flex-wrap: wrap-reverse;
260 .leaflet-control .control-button {
264 background-color: #333;
265 background-color: rgba(0,0,0,.6);
270 background-color: black;
275 background-color: #333;
276 background-color: rgba(0,0,0,.5);
281 background-color: $vibrant-green;
285 border-start-start-radius: 4px;
289 border-end-start-radius: 4px;
298 /* Rules for the sidebar and main map area */
318 width: $sidebarWidth;
325 .overlay-sidebar #sidebar {
352 width: $sidebarWidth;
368 .leaflet-marker-draggable {
383 @include media-breakpoint-down(md) {
418 --bs-btn-border-color: var(--bs-body-bg);
421 --bs-btn-border-color: var(--bs-primary-border-subtle);
426 li.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-tile-container,
475 .mapkey-table-entry td:first-child > * {
476 filter: brightness(.8);
479 .leaflet-control-attribution a {
480 color: var(--bs-link-color);
483 .leaflet-control-scale-line {
484 @extend .border-light, .border-opacity-75;
488 /* Rules for attribution text under the main map shown on printouts */
490 .donate-attr { color: darken($green, 10%) !important; }
492 /* Rules for the sidebar */
502 /* Temporary label size override until we remove site-wide font customisation */
513 /* Stop bootstrap 5 from floating legends when they don't need to be */
518 /* Override the text colour for primary and secondary buttons, to match our
519 bootstrap 4 colours. Note this has accessibility issues, which is why
520 bootstrap 5 calculates black as the appropriate colour, and we should
521 reconsider our colours at some point with that in mind. */
524 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
528 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
531 .btn-outline-secondary {
532 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
535 /* Rules for the search and direction forms */
537 header .search_forms,
548 /* Rules for search sidebar */
550 #sidebar .search_results_entry {
551 .search_more .loader {
556 /* Rules for routing */
559 background-image: image-url('routing-sprite.svg');
562 background-repeat: no-repeat;
564 @for $i from 0 through 25 {
565 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
568 @include color-mode(dark) {
581 .routing_marker { width: 15px; cursor: move; }
587 /* Rules for the history sidebar */
589 #sidebar .changesets {
595 a.stretched-link > span, a:not(.stretched-link), [title] {
597 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
601 .changeset_more .loader {
607 /* Rules for the browse sidebar */
611 padding-bottom: $spacer;
612 margin-bottom: $spacer;
613 border-bottom: 1px solid $grey;
616 word-wrap: break-word;
620 .browse-section:last-of-type {
626 white-space: pre-wrap;
627 word-wrap: break-word;
628 word-break: break-word;
630 tr:last-child th, tr:last-child td {
640 /* Bootstrap buttons don't have any vertical margin, so
641 they touch when adjacent buttons wrap onto a new line
642 e.g. wide form buttons on a narrow sidebar */
646 margin-bottom: $spacer * 0.25;
650 /* Force LTR/RTL alignment for placeholder text */
652 .form-control::placeholder {
656 /* Rules for export sidebar */
659 .export_area_inputs {
670 /*rtl:ignore*/ float: left;
673 /*rtl:ignore*/ float: right;
678 /* Rules for edit pages */
689 /* Rules for non-map content pages */
695 padding: $lineheight;
698 /* Overrides for pages that use new layout conventions */
700 .header-illustration {
701 background-position: 0 0;
702 background-repeat: no-repeat;
710 background-image: image-url("sign-up-illustration.png");
711 background-position-x: 50px;
715 background-image: image-url("confirm-illustration.png");
719 background-image: image-url("terms-illustration.png");
723 [dir=rtl] .header-illustration {
724 transform: scaleX(-1);
727 transform: scaleX(-1);
731 transform: scaleX(-1);
735 /* Rules for small maps in content areas */
739 margin-bottom: $lineheight;
742 @include media-breakpoint-up(md) {
748 /* Rules for the user map */
750 .content_map .leaflet-popup-content {
755 /* Rules for user popups on maps */
765 /* Rules for the diary entry page */
772 .diary-comment .col-auto {
775 .diary-comment .col {
780 /* Rules for the account confirmation page */
784 padding: $lineheight;
785 margin-bottom: $lineheight;
794 list-style-type: lower-alpha;
799 /* Rules for user images */
811 img.user_thumbnail_tiny {
817 /* General styles for action lists / subnavs */
819 nav.secondary-actions {
832 border-left: 1px solid $grey;
833 padding-left: $lineheight * 0.5;
834 margin-right: $lineheight * 0.5;
835 margin-bottom: $lineheight * 0.125;
840 div.secondary-actions {
845 /* Rules for rich text */
849 background: var(--bs-secondary-bg);
854 background: var(--bs-secondary-bg);
856 white-space: pre-wrap;
864 padding: $lineheight;
865 background-color: var(--bs-tertiary-bg);
872 border-left: $lineheight solid var(--bs-tertiary-bg);
873 padding-left: $lineheight;
875 color: var(--bs-secondary-color);
879 /* Rules for the "Welcome" and "Fix the map" pages */
881 .site-welcome, .site-fixthemap {
885 background-image: image-url("welcome-sprite.svg");
886 background-size: 500px 250px;
890 /*rtl:ignore*/ background-position: -50px 0;
894 /*rtl:ignore*/ background-position: -100px 0;
898 /*rtl:ignore*/ background-position: -150px 0;
902 /*rtl:ignore*/ background-position: -200px 0;
906 /*rtl:ignore*/ background-position: -250px 0;
910 /*rtl:ignore*/ background-position: -300px 0;
914 /*rtl:ignore*/ background-position: -350px 0;
918 /* Rules for the "About" page */
920 .site-about #content {
930 color: $vibrant-green;
936 background-position: 0 50%;
937 background-repeat: no-repeat;
938 background-image: image-url('about/osm.png');
939 background-size: cover;
940 background-color: $vibrant-green;
944 background: $vibrant-green;
948 display: inline-block;
957 background: 40px 40px image-url('about/sprite.png') no-repeat;
961 background-position: 0px 0px;
965 background-position: 0px -40px;
969 background-position: 0px -80px;
973 background-position: 0px -120px;
977 background-position: 0px -160px;
981 background-position: -45px -160px;
990 /* Rules for tabs inside secondary background sections */
992 .bg-body-secondary .nav-tabs {
993 --bs-border-color: var(--bs-secondary-border-subtle);
994 --bs-secondary-bg: var(--bs-secondary-border-subtle);
998 /* Rules for traces */
1001 mix-blend-mode: darken;
1004 @include color-mode(dark) {
1007 mix-blend-mode: lighten;
1011 /* Rules for map sidebar icons */
1017 display: inline-block;
1022 .node, .way, .relation {
1027 @each $class, $item in $map-sidebar-icons {
1028 .browse-section #{$class}::before {
1029 content: image-url('browse/#{map.get($item, "filename")}');
1032 @if map.get($item, "invert") {
1033 @include color-mode(dark) {
1034 .browse-section #{$class}::before {
1035 filter: invert(.8) hue-rotate(180deg);