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 borders */
70 /* These add additional colours to those provided by bootstrap */
72 border-color: $grey !important;
75 /* Rules for the header */
82 background: image-url("menu-icon.png") no-repeat;
83 background-size: 30px 30px;
86 margin: 14px 10px 0 0;
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);
163 color: darken($darkgrey, 25%);
167 background-color: lighten($grey, 10%);
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;
213 #sidebar .search_forms,
230 .user-menu, .login-menu {
235 #compact-secondary-nav {
240 display: inline-block;
243 .overlay-sidebar #sidebar .welcome {
247 .overlay-sidebar #sidebar #banner {
252 /* Utility for styling notification numbers */
255 background: lighten($green, 30%);
257 font-weight: $font-weight-normal;
260 /* Rules for Leaflet maps */
262 .leaflet-top.leaflet-right,
263 .leaflet-top.leaflet-left {
267 flex-direction: column;
268 flex-wrap: wrap-reverse;
271 .leaflet-control .control-button {
275 background-color: #333;
276 background-color: rgba(0,0,0,.6);
281 background-color: black;
286 background-color: #333;
287 background-color: rgba(0,0,0,.5);
292 background-color: $vibrant-green;
296 border-start-start-radius: 4px;
300 border-end-start-radius: 4px;
309 /* Rules for the sidebar and main map area */
329 width: $sidebarWidth;
336 .overlay-sidebar #sidebar {
364 width: $sidebarWidth;
380 .leaflet-marker-draggable {
395 border-bottom: 1px solid $grey;
401 @include media-breakpoint-down(md) {
443 border: 2px solid #fff;
446 transition: border-color 0.08s ease-in;
453 border-bottom-right-radius: 3px;
457 text-stroke: 2px #fff;
458 background: rgba(255,255,255,.9);
460 input[type="radio"] {
465 &.active { border-color: darken($green, 10%); }
468 &.active { border-color: darken($green, 20%); }
478 li.disabled { color: $darkgrey; }
489 top: 10px !important;
491 margin-right: 0px !important;
492 margin-top: 0px !important;
496 .leaflet-popup-scrolled {
497 padding-right: $lineheight;
498 border-bottom: 0px !important;
499 border-top: 0px !important;
502 .leaflet-popup-content-wrapper {
503 border-radius: 4px !important;
506 /* Rules for attribution text under the main map shown on printouts */
508 .donate-attr { color: darken($green, 10%) !important; }
510 /* Rules for the sidebar */
520 /* Temporary label size override until we remove site-wide font customisation */
531 /* Stop bootstrap 5 from floating legends when they don't need to be */
536 /* Override the text colour for primary and secondary buttons, to match our
537 bootstrap 4 colours. Note this has accessibility issues, which is why
538 bootstrap 5 calculates black as the appropriate colour, and we should
539 reconsider our colours at some point with that in mind. */
542 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
546 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
549 .btn-outline-secondary {
550 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
553 /* Rules for the search and direction forms */
555 header .search_forms,
560 /* Rules for search sidebar */
562 #sidebar .search_results_entry {
564 background: $list-highlight;
567 .search_more .loader {
572 /* Rules for routing */
575 background-image: image-url('routing-sprite.png');
578 background-repeat: no-repeat;
580 @for $i from 0 through 25 {
581 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
591 background: $list-highlight;
594 .routing_marker { width: 15px; cursor: move; }
600 /* Rules for the history sidebar */
602 #sidebar .changesets {
604 &.selected { background: $list-highlight; }
605 /* color is derived from changeset bbox fillColor in history.js */
607 a.stretched-link > span, a:not(.stretched-link), [title] {
609 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
613 .changeset_more .loader {
619 /* Rules for the browse sidebar */
623 padding-bottom: $spacer;
624 margin-bottom: $spacer;
625 border-bottom: 1px solid $grey;
628 word-wrap: break-word;
632 .browse-section:last-of-type {
638 white-space: pre-wrap;
640 tr:last-child th, tr:last-child td {
647 margin: 0 0 10px 10px;
660 background: $list-highlight;
667 /* Bootstrap buttons don't have any vertical margin, so
668 they touch when adjacent buttons wrap onto a new line
669 e.g. wide form buttons on a narrow sidebar */
673 margin-bottom: $spacer * 0.25;
677 /* Force LTR/RTL alignment for placeholder text */
679 .form-control::placeholder {
683 /* Rules for export sidebar */
691 .export_area_inputs {
692 margin-bottom: $spacer;
700 background: $lightgrey;
702 #maxlat { margin-top: -1px; }
705 /*rtl:ignore*/ margin-left: -1px;
709 /*rtl:ignore*/ margin-right: -1px;
711 #minlat { margin-bottom: -1px; }
715 /* Rules for edit pages */
726 /* Rules for non-map content pages */
729 background: $lightgrey;
736 padding: $lineheight;
739 /* Overrides for pages that use new layout conventions */
741 .header-illustration {
742 background-position: 0 0;
743 background-repeat: no-repeat;
751 background-image: image-url("sign-up-illustration.png");
755 background-image: image-url("confirm-illustration.png");
759 background-image: image-url("terms-illustration.png");
767 background-image: image-url("sign-up-illustration-arm.png");
770 pointer-events: none;
774 [dir=rtl] .header-illustration {
775 transform: scaleX(-1);
778 transform: scaleX(-1);
782 /* Rules for small maps in content areas */
786 margin-bottom: $lineheight;
789 @include media-breakpoint-up(md) {
795 /* Rules for the user map */
797 .content_map .leaflet-popup-content {
802 /* Rules for user popups on maps */
813 /* Rules for the diary entry page */
820 .diary-comment .col-auto {
823 .diary-comment .col {
828 /* Rules for the account confirmation page */
832 padding: $lineheight;
833 margin-bottom: $lineheight;
842 list-style-type: lower-alpha;
847 /* Rules for messages pages */
851 background: $offwhite;
854 .inbox-row-unread td {
860 background-color: $lightgrey;
872 background-color: $lightgrey;
875 /* Rules for user images */
887 img.user_thumbnail_tiny {
893 /* General styles for action lists / subnavs */
895 nav.secondary-actions {
908 border-left: 1px solid $grey;
909 padding-left: $lineheight * 0.5;
910 margin-right: $lineheight * 0.5;
911 margin-bottom: $lineheight * 0.125;
916 div.secondary-actions {
921 /* Rules for rich text */
926 background: $lightgrey;
931 background: $lightgrey;
933 white-space: pre-wrap;
941 padding: $lineheight;
942 background-color: $offwhite;
949 border-left: $lineheight solid $offwhite;
950 padding-left: $lineheight;
956 /* Rules for the "Welcome" page */
957 .site-welcome, .site-fixthemap {
959 background-image: image-url("welcome-sprite.png");
960 background-size: 500px 250px;
970 /*rtl:ignore*/ background-position: -50px 0;
975 vertical-align: middle;
979 /*rtl:ignore*/ background-position: -100px 0;
983 /*rtl:ignore*/ background-position: -150px 0;
987 /*rtl:ignore*/ background-position: -200px 0;
991 /*rtl:ignore*/ background-position: -250px 0;
995 /*rtl:ignore*/ background-position: -300px 0;
999 /*rtl:ignore*/ background-position: -350px 0;
1003 background-color: #333;
1008 .site-about #content {
1009 background-color: $lightgrey;
1020 color: $vibrant-green;
1026 background-position: 0 50%;
1027 background-repeat: no-repeat;
1028 background-image: image-url('about/osm.png');
1029 background-size: cover;
1030 background-color: $vibrant-green;
1034 background: $vibrant-green;
1038 display: inline-block;
1047 background: 40px 40px image-url('about/sprite.png') no-repeat;
1051 background-position: 0px 0px;
1055 background-position: 0px -40px;
1059 background-position: 0px -80px;
1063 background-position: 0px -120px;
1067 background-position: 0px -160px;
1071 background-position: -45px -160px;