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;
76 border-color: $lightgrey !important;
79 /* Rules for the header */
86 background: image-url("menu-icon.png") no-repeat;
87 background-size: 30px 30px;
90 margin: 14px 10px 0 0;
95 height: $headerHeight;
100 h1, nav, nav > ul, nav > ul > li {
101 display: inline-block;
106 padding: $lineheight * 0.5;
129 & > .btn-group .btn-outline-primary {
130 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
134 .btn-outline-primary {
139 border-top-color: $grey;
143 background-color: lighten($green, 30%);
148 // Small tweaks to the toggle to stop the primary colour showing through
149 // when the menu is shown
150 .show > .btn-outline-primary.dropdown-toggle {
151 background-color: $green;
152 border-color: $green;
155 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
167 color: darken($darkgrey, 25%);
171 background-color: lighten($grey, 10%);
175 nav.primary, nav.secondary {
178 background-color: $green;
184 #compact-secondary-nav {
189 #compact-secondary-nav {
190 display: inline-block;
203 flex-direction: column;
205 min-height: $headerHeight;
217 #sidebar .search_forms,
234 .user-menu, .login-menu {
239 #compact-secondary-nav {
244 display: inline-block;
247 .overlay-sidebar #sidebar .welcome {
251 .overlay-sidebar #sidebar #banner {
256 /* Utility for styling notification numbers */
259 background: lighten($green, 30%);
261 font-weight: $font-weight-normal;
264 /* Rules for Leaflet maps */
266 .leaflet-top.leaflet-right,
267 .leaflet-top.leaflet-left {
271 flex-direction: column;
272 flex-wrap: wrap-reverse;
275 .leaflet-control .control-button {
279 background-color: #333;
280 background-color: rgba(0,0,0,.6);
285 background-color: black;
290 background-color: #333;
291 background-color: rgba(0,0,0,.5);
296 background-color: $vibrant-green;
300 border-start-start-radius: 4px;
304 border-end-start-radius: 4px;
313 /* Rules for the sidebar and main map area */
333 width: $sidebarWidth;
341 .overlay-sidebar #sidebar {
369 width: $sidebarWidth;
385 .leaflet-marker-draggable {
400 border-bottom: 1px solid $grey;
406 @include media-breakpoint-down(md) {
448 border: 2px solid #fff;
451 transition: border-color 0.08s ease-in;
458 border-bottom-right-radius: 3px;
462 text-stroke: 2px #fff;
463 background: rgba(255,255,255,.9);
465 input[type="radio"] {
470 &.active { border-color: darken($green, 10%); }
473 &.active { border-color: darken($green, 20%); }
483 li.disabled { color: $darkgrey; }
494 top: 10px !important;
496 margin-right: 0px !important;
497 margin-top: 0px !important;
501 .leaflet-popup-scrolled {
502 padding-right: $lineheight;
503 border-bottom: 0px !important;
504 border-top: 0px !important;
507 .leaflet-popup-content-wrapper {
508 border-radius: 4px !important;
511 /* Rules for attribution text under the main map shown on printouts */
513 .donate-attr { color: darken($green, 10%) !important; }
515 /* Rules for the sidebar */
525 /* Temporary label size override until we remove site-wide font customisation */
536 /* Stop bootstrap 5 from floating legends when they don't need to be */
541 /* Override the text colour for primary and secondary buttons, to match our
542 bootstrap 4 colours. Note this has accessibility issues, which is why
543 bootstrap 5 calculates black as the appropriate colour, and we should
544 reconsider our colours at some point with that in mind. */
547 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
551 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
554 .btn-outline-secondary {
555 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
558 /* Rules for the search and direction forms */
560 header .search_forms,
565 /* Rules for search sidebar */
567 #sidebar .search_results_entry {
569 background: $list-highlight;
572 .search_more .loader {
577 /* Rules for routing */
580 background-image: image-url('routing-sprite.png');
583 background-repeat: no-repeat;
585 @for $i from 0 through 25 {
586 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
596 background: $list-highlight;
599 .routing_marker { width: 15px; cursor: move; }
605 /* Rules for the history sidebar */
607 #sidebar .changesets {
609 &.selected { background: $list-highlight; }
610 /* color is derived from changeset bbox fillColor in history.js */
612 a.stretched-link > span, a:not(.stretched-link), [title] {
614 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
618 .changeset_more .loader {
624 /* Rules for the browse sidebar */
628 padding-bottom: $spacer;
629 margin-bottom: $spacer;
630 border-bottom: 1px solid $grey;
633 word-wrap: break-word;
637 .browse-section:last-of-type {
643 white-space: pre-wrap;
645 tr:last-child th, tr:last-child td {
650 span.action-button:hover {
652 text-decoration: underline;
657 margin: 0 0 10px 10px;
670 background: $list-highlight;
677 /* Bootstrap buttons don't have any vertical margin, so
678 they touch when adjacent buttons wrap onto a new line
679 e.g. wide form buttons on a narrow sidebar */
683 margin-bottom: $spacer * 0.25;
687 /* Force LTR/RTL alignment for placeholder text */
689 .form-control::placeholder {
693 /* Rules for export sidebar */
701 .export_area_inputs {
702 margin-bottom: $spacer;
710 background: $lightgrey;
712 #maxlat { margin-top: -1px; }
715 /*rtl:ignore*/ margin-left: -1px;
719 /*rtl:ignore*/ margin-right: -1px;
721 #minlat { margin-bottom: -1px; }
725 /* Rules for edit pages */
736 /* Rules for non-map content pages */
739 background: $lightgrey;
746 padding: $lineheight;
749 /* Overrides for pages that use new layout conventions */
751 .header-illustration {
752 background-position: 0 0;
753 background-repeat: no-repeat;
761 background-image: image-url("sign-up-illustration.png");
765 background-image: image-url("confirm-illustration.png");
769 background-image: image-url("terms-illustration.png");
777 background-image: image-url("sign-up-illustration-arm.png");
780 pointer-events: none;
784 [dir=rtl] .header-illustration {
785 transform: scaleX(-1);
788 transform: scaleX(-1);
792 /* Rules for small maps in content areas */
796 margin-bottom: $lineheight;
799 @include media-breakpoint-up(md) {
805 /* Rules for the user map */
807 .content_map .leaflet-popup-content {
812 /* Rules for user popups on maps */
823 /* Rules for the diary entry page */
834 border-top: 1px dashed $grey;
836 border-top: 1px solid $grey;
841 /* Rules for the account confirmation page */
845 padding: $lineheight;
846 margin-bottom: $lineheight;
855 list-style-type: lower-alpha;
860 /* Rules for messages pages */
864 background: $offwhite;
867 .inbox-row-unread td {
873 background-color: $lightgrey;
885 background-color: $lightgrey;
888 /* Rules for user images */
900 img.user_thumbnail_tiny {
906 /* General styles for action lists / subnavs */
908 nav.secondary-actions {
921 border-left: 1px solid $grey;
922 padding-left: $lineheight * 0.5;
923 margin-right: $lineheight * 0.5;
924 margin-bottom: $lineheight * 0.125;
929 div.secondary-actions {
934 /* Rules for rich text */
939 background: $lightgrey;
944 background: $lightgrey;
946 white-space: pre-wrap;
954 padding: $lineheight;
955 background-color: $offwhite;
962 border-left: $lineheight solid $offwhite;
963 padding-left: $lineheight;
969 /* Rules for the "Welcome" page */
970 .site-welcome, .site-fixthemap {
972 background-image: image-url("welcome-sprite.png");
973 background-size: 500px 250px;
983 /*rtl:ignore*/ background-position: -50px 0;
988 vertical-align: middle;
992 /*rtl:ignore*/ background-position: -100px 0;
996 /*rtl:ignore*/ background-position: -150px 0;
1000 /*rtl:ignore*/ background-position: -200px 0;
1004 /*rtl:ignore*/ background-position: -250px 0;
1008 /*rtl:ignore*/ background-position: -300px 0;
1012 /*rtl:ignore*/ background-position: -350px 0;
1016 background-color: #333;
1021 .site-about #content {
1022 background-color: $lightgrey;
1033 color: $vibrant-green;
1039 background-position: 0 50%;
1040 background-repeat: no-repeat;
1041 background-image: image-url('about/osm.png');
1042 background-size: cover;
1043 background-color: $vibrant-green;
1047 background: $vibrant-green;
1051 display: inline-block;
1060 background: 40px 40px image-url('about/sprite.png') no-repeat;
1064 background-position: 0px 0px;
1068 background-position: 0px -40px;
1072 background-position: 0px -80px;
1076 background-position: 0px -120px;
1080 background-position: 0px -160px;
1084 background-position: -45px -160px;