3 @import "rails_bootstrap_forms";
5 /* Styles common to large and small screens */
7 /* Default rules for the body of every page */
10 font-size: $typeheight;
14 text-decoration: underline dotted;
17 #container { position: relative; }
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 */
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 /* Rules for the header */
80 background: image-url("menu-icon.png") no-repeat;
81 background-size: 30px 30px;
84 margin: 14px 10px 0 0;
88 @include color-mode(dark) {
95 height: $headerHeight;
99 h1, nav, nav > ul, nav > ul > li {
100 display: inline-block;
105 padding: $lineheight * 0.5;
128 & > .btn-group .btn-outline-primary {
129 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
133 .btn-outline-primary {
138 border-top-color: $grey;
142 background-color: lighten($green, 30%);
147 // Small tweaks to the toggle to stop the primary colour showing through
148 // when the menu is shown
149 .show > .btn-outline-primary.dropdown-toggle {
150 background-color: $green;
151 border-color: $green;
154 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
165 background-color: lighten($grey, 10%);
169 nav.primary, nav.secondary {
172 background-color: $green;
178 #compact-secondary-nav {
183 #compact-secondary-nav {
184 display: inline-block;
197 flex-direction: column;
199 min-height: $headerHeight;
210 #sidebar .search_forms,
227 .user-menu, .login-menu {
232 #compact-secondary-nav {
237 display: inline-block;
240 .overlay-sidebar #sidebar .welcome {
244 .overlay-sidebar #sidebar #banner {
249 /* Utility for styling notification numbers */
252 background: transparentize(lighten($green, 25%), .25);
254 font-weight: $font-weight-normal;
257 /* Rules for Leaflet maps */
259 .leaflet-top.leaflet-right,
260 .leaflet-top.leaflet-left {
264 flex-direction: column;
265 flex-wrap: wrap-reverse;
268 .leaflet-control .control-button {
272 background-color: #333;
273 background-color: rgba(0,0,0,.6);
278 background-color: black;
283 background-color: #333;
284 background-color: rgba(0,0,0,.5);
289 background-color: $vibrant-green;
293 border-start-start-radius: 4px;
297 border-end-start-radius: 4px;
306 /* Rules for the sidebar and main map area */
326 width: $sidebarWidth;
333 .overlay-sidebar #sidebar {
360 width: $sidebarWidth;
376 .leaflet-marker-draggable {
391 @include media-breakpoint-down(md) {
426 --bs-btn-border-color: var(--bs-body-bg);
429 --bs-btn-border-color: var(--bs-primary-border-subtle);
438 li.disabled { color: $darkgrey; }
449 top: 10px !important;
451 margin-right: 0px !important;
452 margin-top: 0px !important;
456 .leaflet-popup-scrolled {
457 padding-right: $lineheight;
458 border-bottom: 0px !important;
459 border-top: 0px !important;
462 .leaflet-popup-content-wrapper,
464 @extend .bg-body, .text-body;
467 .leaflet-popup-content-wrapper {
471 color: var(--bs-link-color) !important;
475 /* Rules for attribution text under the main map shown on printouts */
477 .donate-attr { color: darken($green, 10%) !important; }
479 /* Rules for the sidebar */
489 /* Temporary label size override until we remove site-wide font customisation */
500 /* Stop bootstrap 5 from floating legends when they don't need to be */
505 /* Override the text colour for primary and secondary buttons, to match our
506 bootstrap 4 colours. Note this has accessibility issues, which is why
507 bootstrap 5 calculates black as the appropriate colour, and we should
508 reconsider our colours at some point with that in mind. */
511 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
515 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
518 .btn-outline-secondary {
519 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
522 /* Rules for the search and direction forms */
524 header .search_forms,
535 /* Rules for search sidebar */
537 #sidebar .search_results_entry {
538 .search_more .loader {
543 /* Rules for routing */
546 background-image: image-url('routing-sprite.png');
549 background-repeat: no-repeat;
551 @for $i from 0 through 25 {
552 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
555 @include color-mode(dark) {
568 .routing_marker { width: 15px; cursor: move; }
574 /* Rules for the history sidebar */
576 #sidebar .changesets {
582 a.stretched-link > span, a:not(.stretched-link), [title] {
584 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
588 .changeset_more .loader {
594 /* Rules for the browse sidebar */
598 padding-bottom: $spacer;
599 margin-bottom: $spacer;
600 border-bottom: 1px solid $grey;
603 word-wrap: break-word;
607 .browse-section:last-of-type {
613 white-space: pre-wrap;
614 word-wrap: break-word;
615 word-break: break-word;
617 tr:last-child th, tr:last-child td {
624 margin: 0 0 10px 10px;
632 /* Bootstrap buttons don't have any vertical margin, so
633 they touch when adjacent buttons wrap onto a new line
634 e.g. wide form buttons on a narrow sidebar */
638 margin-bottom: $spacer * 0.25;
642 /* Force LTR/RTL alignment for placeholder text */
644 .form-control::placeholder {
648 /* Rules for export sidebar */
651 .export_area_inputs {
662 /*rtl:ignore*/ float: left;
665 /*rtl:ignore*/ float: right;
670 /* Rules for edit pages */
681 /* Rules for non-map content pages */
687 padding: $lineheight;
690 /* Overrides for pages that use new layout conventions */
692 .header-illustration {
693 background-position: 0 0;
694 background-repeat: no-repeat;
702 background-image: image-url("sign-up-illustration.png");
706 background-image: image-url("confirm-illustration.png");
710 background-image: image-url("terms-illustration.png");
718 background-image: image-url("sign-up-illustration-arm.png");
721 pointer-events: none;
725 [dir=rtl] .header-illustration {
726 transform: scaleX(-1);
729 transform: scaleX(-1);
733 /* Rules for small maps in content areas */
737 margin-bottom: $lineheight;
740 @include media-breakpoint-up(md) {
746 /* Rules for the user map */
748 .content_map .leaflet-popup-content {
753 /* Rules for user popups on maps */
763 /* Rules for the diary entry page */
770 .diary-comment .col-auto {
773 .diary-comment .col {
778 /* Rules for the account confirmation page */
782 padding: $lineheight;
783 margin-bottom: $lineheight;
792 list-style-type: lower-alpha;
797 /* Rules for user images */
809 img.user_thumbnail_tiny {
815 /* General styles for action lists / subnavs */
817 nav.secondary-actions {
830 border-left: 1px solid $grey;
831 padding-left: $lineheight * 0.5;
832 margin-right: $lineheight * 0.5;
833 margin-bottom: $lineheight * 0.125;
838 div.secondary-actions {
843 /* Rules for rich text */
847 background: var(--bs-secondary-bg);
852 background: var(--bs-secondary-bg);
854 white-space: pre-wrap;
862 padding: $lineheight;
863 background-color: var(--bs-tertiary-bg);
870 border-left: $lineheight solid var(--bs-tertiary-bg);
871 padding-left: $lineheight;
873 color: var(--bs-secondary-color);
877 /* Rules for the "Welcome" page */
878 .site-welcome, .site-fixthemap {
880 background-image: image-url("welcome-sprite.png");
881 background-size: 500px 250px;
891 /*rtl:ignore*/ background-position: -50px 0;
896 vertical-align: middle;
900 /*rtl:ignore*/ background-position: -100px 0;
904 /*rtl:ignore*/ background-position: -150px 0;
908 /*rtl:ignore*/ background-position: -200px 0;
912 /*rtl:ignore*/ background-position: -250px 0;
916 /*rtl:ignore*/ background-position: -300px 0;
920 /*rtl:ignore*/ background-position: -350px 0;
924 .site-about #content {
934 color: $vibrant-green;
940 background-position: 0 50%;
941 background-repeat: no-repeat;
942 background-image: image-url('about/osm.png');
943 background-size: cover;
944 background-color: $vibrant-green;
948 background: $vibrant-green;
952 display: inline-block;
961 background: 40px 40px image-url('about/sprite.png') no-repeat;
965 background-position: 0px 0px;
969 background-position: 0px -40px;
973 background-position: 0px -80px;
977 background-position: 0px -120px;
981 background-position: 0px -160px;
985 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;