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;
85 height: $headerHeight;
90 h1, nav, nav > ul, nav > ul > li {
91 display: inline-block;
96 padding: $lineheight * 0.5;
119 & > .btn-group .btn-outline-primary {
120 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
124 .btn-outline-primary {
129 border-top-color: $grey;
133 background-color: lighten($green, 30%);
138 // Small tweaks to the toggle to stop the primary colour showing through
139 // when the menu is shown
140 .show > .btn-outline-primary.dropdown-toggle {
141 background-color: $green;
142 border-color: $green;
145 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
156 background-color: lighten($grey, 10%);
160 nav.primary, nav.secondary {
163 background-color: $green;
169 #compact-secondary-nav {
174 #compact-secondary-nav {
175 display: inline-block;
188 flex-direction: column;
190 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: lighten($green, 30%);
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 {
353 width: $sidebarWidth;
369 .leaflet-marker-draggable {
383 border-bottom: 1px solid $grey;
389 @include media-breakpoint-down(md) {
425 --bs-btn-border-color: var(--bs-body-bg);
428 --bs-btn-border-color: var(--bs-primary-border-subtle);
437 li.disabled { color: $darkgrey; }
448 top: 10px !important;
450 margin-right: 0px !important;
451 margin-top: 0px !important;
455 .leaflet-popup-scrolled {
456 padding-right: $lineheight;
457 border-bottom: 0px !important;
458 border-top: 0px !important;
461 .leaflet-popup-content-wrapper {
462 border-radius: 4px !important;
465 /* Rules for attribution text under the main map shown on printouts */
467 .donate-attr { color: darken($green, 10%) !important; }
469 /* Rules for the sidebar */
479 /* Temporary label size override until we remove site-wide font customisation */
490 /* Stop bootstrap 5 from floating legends when they don't need to be */
495 /* Override the text colour for primary and secondary buttons, to match our
496 bootstrap 4 colours. Note this has accessibility issues, which is why
497 bootstrap 5 calculates black as the appropriate colour, and we should
498 reconsider our colours at some point with that in mind. */
501 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
505 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
508 .btn-outline-secondary {
509 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
512 /* Rules for the search and direction forms */
514 header .search_forms,
519 /* Rules for search sidebar */
521 #sidebar .search_results_entry {
523 background: $list-highlight;
526 .search_more .loader {
531 /* Rules for routing */
534 background-image: image-url('routing-sprite.png');
537 background-repeat: no-repeat;
539 @for $i from 0 through 25 {
540 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
550 background: $list-highlight;
553 .routing_marker { width: 15px; cursor: move; }
559 /* Rules for the history sidebar */
561 #sidebar .changesets {
563 &.selected { background: $list-highlight; }
564 /* color is derived from changeset bbox fillColor in history.js */
566 a.stretched-link > span, a:not(.stretched-link), [title] {
568 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
572 .changeset_more .loader {
578 /* Rules for the browse sidebar */
582 padding-bottom: $spacer;
583 margin-bottom: $spacer;
584 border-bottom: 1px solid $grey;
587 word-wrap: break-word;
591 .browse-section:last-of-type {
597 white-space: pre-wrap;
599 tr:last-child th, tr:last-child td {
606 margin: 0 0 10px 10px;
619 background: $list-highlight;
626 /* Bootstrap buttons don't have any vertical margin, so
627 they touch when adjacent buttons wrap onto a new line
628 e.g. wide form buttons on a narrow sidebar */
632 margin-bottom: $spacer * 0.25;
636 /* Force LTR/RTL alignment for placeholder text */
638 .form-control::placeholder {
642 /* Rules for export sidebar */
650 .export_area_inputs {
651 margin-bottom: $spacer;
663 /*rtl:ignore*/ float: left;
666 /*rtl:ignore*/ float: right;
671 /* Rules for edit pages */
682 /* Rules for non-map content pages */
688 padding: $lineheight;
691 /* Overrides for pages that use new layout conventions */
693 .header-illustration {
694 background-position: 0 0;
695 background-repeat: no-repeat;
703 background-image: image-url("sign-up-illustration.png");
707 background-image: image-url("confirm-illustration.png");
711 background-image: image-url("terms-illustration.png");
719 background-image: image-url("sign-up-illustration-arm.png");
722 pointer-events: none;
726 [dir=rtl] .header-illustration {
727 transform: scaleX(-1);
730 transform: scaleX(-1);
734 /* Rules for small maps in content areas */
738 margin-bottom: $lineheight;
741 @include media-breakpoint-up(md) {
747 /* Rules for the user map */
749 .content_map .leaflet-popup-content {
754 /* 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 messages pages */
803 background: $offwhite;
806 .inbox-row-unread td {
821 /* Rules for user images */
833 img.user_thumbnail_tiny {
839 /* General styles for action lists / subnavs */
841 nav.secondary-actions {
854 border-left: 1px solid $grey;
855 padding-left: $lineheight * 0.5;
856 margin-right: $lineheight * 0.5;
857 margin-bottom: $lineheight * 0.125;
862 div.secondary-actions {
867 /* Rules for rich text */
872 background: var(--bs-secondary-bg);
877 background: var(--bs-secondary-bg);
879 white-space: pre-wrap;
887 padding: $lineheight;
888 background-color: var(--bs-tertiary-bg);
895 border-left: $lineheight solid var(--bs-tertiary-bg);
896 padding-left: $lineheight;
898 color: var(--bs-secondary-color);
902 /* Rules for the "Welcome" page */
903 .site-welcome, .site-fixthemap {
905 background-image: image-url("welcome-sprite.png");
906 background-size: 500px 250px;
916 /*rtl:ignore*/ background-position: -50px 0;
921 vertical-align: middle;
925 /*rtl:ignore*/ background-position: -100px 0;
929 /*rtl:ignore*/ background-position: -150px 0;
933 /*rtl:ignore*/ background-position: -200px 0;
937 /*rtl:ignore*/ background-position: -250px 0;
941 /*rtl:ignore*/ background-position: -300px 0;
945 /*rtl:ignore*/ background-position: -350px 0;
949 background-color: #333;
954 .site-about #content {
955 background-color: $lightgrey;
966 color: $vibrant-green;
972 background-position: 0 50%;
973 background-repeat: no-repeat;
974 background-image: image-url('about/osm.png');
975 background-size: cover;
976 background-color: $vibrant-green;
980 background: $vibrant-green;
984 display: inline-block;
993 background: 40px 40px image-url('about/sprite.png') no-repeat;
997 background-position: 0px 0px;
1001 background-position: 0px -40px;
1005 background-position: 0px -80px;
1009 background-position: 0px -120px;
1013 background-position: 0px -160px;
1017 background-position: -45px -160px;
1022 /* Rules for tabs inside secondary background sections */
1024 .bg-body-secondary .nav-tabs {
1025 --bs-border-color: var(--bs-secondary-border-subtle);
1026 --bs-secondary-bg: var(--bs-secondary-border-subtle);
1027 margin-bottom: -1px;