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;
23 text-decoration: underline dotted;
26 #container { position: relative; }
29 vertical-align: middle;
30 margin-right: $lineheight * 0.25;
36 display: inline-block;
40 background: transparent image-url("sprite.svg") no-repeat 0 0;
45 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
46 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
47 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
48 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
49 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
50 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
51 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
52 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
53 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
54 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
55 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
56 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
57 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
58 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
59 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
60 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
61 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
63 /* Utility for de-emphasizing content */
69 /* Rules for the header */
76 background: image-url("menu-icon.png") no-repeat;
77 background-size: 30px 30px;
80 margin: 14px 10px 0 0;
84 @include color-mode(dark) {
91 height: $headerHeight;
96 h1, nav, nav > ul, nav > ul > li {
97 display: inline-block;
102 padding: $lineheight * 0.5;
125 & > .btn-group .btn-outline-primary {
126 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
130 .btn-outline-primary {
135 border-top-color: $grey;
139 background-color: lighten($green, 30%);
144 // Small tweaks to the toggle to stop the primary colour showing through
145 // when the menu is shown
146 .show > .btn-outline-primary.dropdown-toggle {
147 background-color: $green;
148 border-color: $green;
151 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
162 background-color: lighten($grey, 10%);
166 nav.primary, nav.secondary {
169 background-color: $green;
175 #compact-secondary-nav {
180 #compact-secondary-nav {
181 display: inline-block;
194 flex-direction: column;
196 min-height: $headerHeight;
207 #sidebar .search_forms,
224 .user-menu, .login-menu {
229 #compact-secondary-nav {
234 display: inline-block;
237 .overlay-sidebar #sidebar .welcome {
241 .overlay-sidebar #sidebar #banner {
246 /* Utility for styling notification numbers */
249 background: lighten($green, 30%);
251 font-weight: $font-weight-normal;
254 /* Rules for Leaflet maps */
256 .leaflet-top.leaflet-right,
257 .leaflet-top.leaflet-left {
261 flex-direction: column;
262 flex-wrap: wrap-reverse;
265 .leaflet-control .control-button {
269 background-color: #333;
270 background-color: rgba(0,0,0,.6);
275 background-color: black;
280 background-color: #333;
281 background-color: rgba(0,0,0,.5);
286 background-color: $vibrant-green;
290 border-start-start-radius: 4px;
294 border-end-start-radius: 4px;
303 /* Rules for the sidebar and main map area */
323 width: $sidebarWidth;
330 .overlay-sidebar #sidebar {
358 width: $sidebarWidth;
374 .leaflet-marker-draggable {
388 border-bottom: 1px solid $grey;
394 @include media-breakpoint-down(md) {
430 --bs-btn-border-color: var(--bs-body-bg);
433 --bs-btn-border-color: var(--bs-primary-border-subtle);
442 li.disabled { color: $darkgrey; }
453 top: 10px !important;
455 margin-right: 0px !important;
456 margin-top: 0px !important;
460 .leaflet-popup-scrolled {
461 padding-right: $lineheight;
462 border-bottom: 0px !important;
463 border-top: 0px !important;
466 .leaflet-popup-content-wrapper {
467 border-radius: 4px !important;
470 /* Rules for attribution text under the main map shown on printouts */
472 .donate-attr { color: darken($green, 10%) !important; }
474 /* Rules for the sidebar */
484 /* Temporary label size override until we remove site-wide font customisation */
495 /* Stop bootstrap 5 from floating legends when they don't need to be */
500 /* Override the text colour for primary and secondary buttons, to match our
501 bootstrap 4 colours. Note this has accessibility issues, which is why
502 bootstrap 5 calculates black as the appropriate colour, and we should
503 reconsider our colours at some point with that in mind. */
506 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
510 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
513 .btn-outline-secondary {
514 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
517 /* Rules for the search and direction forms */
519 header .search_forms,
524 /* Rules for search sidebar */
526 #sidebar .search_results_entry {
528 background: $list-highlight;
531 .search_more .loader {
536 /* Rules for routing */
539 background-image: image-url('routing-sprite.png');
542 background-repeat: no-repeat;
544 @for $i from 0 through 25 {
545 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
548 @include color-mode(dark) {
561 background: $list-highlight;
564 .routing_marker { width: 15px; cursor: move; }
570 /* Rules for the history sidebar */
572 #sidebar .changesets {
574 &.selected { background: $list-highlight; }
575 /* color is derived from changeset bbox fillColor in history.js */
577 a.stretched-link > span, a:not(.stretched-link), [title] {
579 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
583 .changeset_more .loader {
589 /* Rules for the browse sidebar */
593 padding-bottom: $spacer;
594 margin-bottom: $spacer;
595 border-bottom: 1px solid $grey;
598 word-wrap: break-word;
602 .browse-section:last-of-type {
608 white-space: pre-wrap;
610 tr:last-child th, tr:last-child td {
617 margin: 0 0 10px 10px;
630 background: $list-highlight;
637 /* Bootstrap buttons don't have any vertical margin, so
638 they touch when adjacent buttons wrap onto a new line
639 e.g. wide form buttons on a narrow sidebar */
643 margin-bottom: $spacer * 0.25;
647 /* Force LTR/RTL alignment for placeholder text */
649 .form-control::placeholder {
653 /* Rules for export sidebar */
661 .export_area_inputs {
662 margin-bottom: $spacer;
674 /*rtl:ignore*/ float: left;
677 /*rtl:ignore*/ float: right;
682 /* Rules for edit pages */
693 /* Rules for non-map content pages */
699 padding: $lineheight;
702 /* Overrides for pages that use new layout conventions */
704 .header-illustration {
705 background-position: 0 0;
706 background-repeat: no-repeat;
714 background-image: image-url("sign-up-illustration.png");
718 background-image: image-url("confirm-illustration.png");
722 background-image: image-url("terms-illustration.png");
730 background-image: image-url("sign-up-illustration-arm.png");
733 pointer-events: none;
737 [dir=rtl] .header-illustration {
738 transform: scaleX(-1);
741 transform: scaleX(-1);
745 /* Rules for small maps in content areas */
749 margin-bottom: $lineheight;
752 @include media-breakpoint-up(md) {
758 /* Rules for the user map */
760 .content_map .leaflet-popup-content {
765 /* Rules for user popups on maps */
776 /* Rules for the diary entry page */
783 .diary-comment .col-auto {
786 .diary-comment .col {
791 /* Rules for the account confirmation page */
795 padding: $lineheight;
796 margin-bottom: $lineheight;
805 list-style-type: lower-alpha;
810 /* Rules for messages pages */
814 background: $offwhite;
817 .inbox-row-unread td {
832 /* Rules for user images */
844 img.user_thumbnail_tiny {
850 /* General styles for action lists / subnavs */
852 nav.secondary-actions {
865 border-left: 1px solid $grey;
866 padding-left: $lineheight * 0.5;
867 margin-right: $lineheight * 0.5;
868 margin-bottom: $lineheight * 0.125;
873 div.secondary-actions {
878 /* Rules for rich text */
883 background: var(--bs-secondary-bg);
888 background: var(--bs-secondary-bg);
890 white-space: pre-wrap;
898 padding: $lineheight;
899 background-color: var(--bs-tertiary-bg);
906 border-left: $lineheight solid var(--bs-tertiary-bg);
907 padding-left: $lineheight;
909 color: var(--bs-secondary-color);
913 /* Rules for the "Welcome" page */
914 .site-welcome, .site-fixthemap {
916 background-image: image-url("welcome-sprite.png");
917 background-size: 500px 250px;
927 /*rtl:ignore*/ background-position: -50px 0;
932 vertical-align: middle;
936 /*rtl:ignore*/ background-position: -100px 0;
940 /*rtl:ignore*/ background-position: -150px 0;
944 /*rtl:ignore*/ background-position: -200px 0;
948 /*rtl:ignore*/ background-position: -250px 0;
952 /*rtl:ignore*/ background-position: -300px 0;
956 /*rtl:ignore*/ background-position: -350px 0;
960 background-color: #333;
965 .site-about #content {
975 color: $vibrant-green;
981 background-position: 0 50%;
982 background-repeat: no-repeat;
983 background-image: image-url('about/osm.png');
984 background-size: cover;
985 background-color: $vibrant-green;
989 background: $vibrant-green;
993 display: inline-block;
1002 background: 40px 40px image-url('about/sprite.png') no-repeat;
1006 background-position: 0px 0px;
1010 background-position: 0px -40px;
1014 background-position: 0px -80px;
1018 background-position: 0px -120px;
1022 background-position: 0px -160px;
1026 background-position: -45px -160px;
1031 /* Rules for tabs inside secondary background sections */
1033 .bg-body-secondary .nav-tabs {
1034 --bs-border-color: var(--bs-secondary-border-subtle);
1035 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1036 margin-bottom: -1px;