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 {
649 .colour-preview-box {
652 // add color via inline css on element: background-color: <tag value>;
656 span.action-button:hover {
658 text-decoration: underline;
663 margin: 0 0 10px 10px;
676 background: $list-highlight;
683 /* Bootstrap buttons don't have any vertical margin, so
684 they touch when adjacent buttons wrap onto a new line
685 e.g. wide form buttons on a narrow sidebar */
689 margin-bottom: $spacer * 0.25;
693 /* Force LTR/RTL alignment for placeholder text */
695 .form-control::placeholder {
699 /* Rules for export sidebar */
707 .export_area_inputs {
708 margin-bottom: $spacer;
716 background: $lightgrey;
718 #maxlat { margin-top: -1px; }
721 /*rtl:ignore*/ margin-left: -1px;
725 /*rtl:ignore*/ margin-right: -1px;
727 #minlat { margin-bottom: -1px; }
731 /* Rules for edit pages */
742 /* Rules for non-map content pages */
745 background: $lightgrey;
752 padding: $lineheight;
755 /* Overrides for pages that use new layout conventions */
757 .header-illustration {
758 background-position: 0 0;
759 background-repeat: no-repeat;
767 background-image: image-url("sign-up-illustration.png");
771 background-image: image-url("confirm-illustration.png");
775 background-image: image-url("terms-illustration.png");
783 background-image: image-url("sign-up-illustration-arm.png");
786 pointer-events: none;
790 [dir=rtl] .header-illustration {
791 transform: scaleX(-1);
794 transform: scaleX(-1);
798 /* Rules for small maps in content areas */
802 margin-bottom: $lineheight;
805 @include media-breakpoint-up(md) {
811 /* Rules for the user map */
813 .content_map .leaflet-popup-content {
818 /* Rules for user popups on maps */
829 /* Rules for the diary entry page */
840 border-top: 1px dashed $grey;
842 border-top: 1px solid $grey;
847 /* Rules for the account confirmation page */
851 padding: $lineheight;
852 margin-bottom: $lineheight;
861 list-style-type: lower-alpha;
866 /* Rules for messages pages */
870 background: $offwhite;
873 .inbox-row-unread td {
879 background-color: $lightgrey;
891 background-color: $lightgrey;
894 /* Rules for user images */
906 img.user_thumbnail_tiny {
912 /* General styles for action lists / subnavs */
914 nav.secondary-actions {
927 border-left: 1px solid $grey;
928 padding-left: $lineheight * 0.5;
929 margin-right: $lineheight * 0.5;
930 margin-bottom: $lineheight * 0.125;
935 div.secondary-actions {
940 /* Rules for rich text */
945 background: $lightgrey;
950 background: $lightgrey;
952 white-space: pre-wrap;
960 padding: $lineheight;
961 background-color: $offwhite;
968 border-left: $lineheight solid $offwhite;
969 padding-left: $lineheight;
975 /* Rules for the "Welcome" page */
976 .site-welcome, .site-fixthemap {
978 background-image: image-url("welcome-sprite.png");
979 background-size: 500px 250px;
989 /*rtl:ignore*/ background-position: -50px 0;
994 vertical-align: middle;
998 /*rtl:ignore*/ background-position: -100px 0;
1002 /*rtl:ignore*/ background-position: -150px 0;
1006 /*rtl:ignore*/ background-position: -200px 0;
1010 /*rtl:ignore*/ background-position: -250px 0;
1014 /*rtl:ignore*/ background-position: -300px 0;
1018 /*rtl:ignore*/ background-position: -350px 0;
1022 background-color: #333;
1027 .site-about #content {
1028 background-color: $lightgrey;
1039 color: $vibrant-green;
1045 background-position: 0 50%;
1046 background-repeat: no-repeat;
1047 background-image: image-url('about/osm.png');
1048 background-size: cover;
1049 background-color: $vibrant-green;
1053 background: $vibrant-green;
1057 display: inline-block;
1066 background: 40px 40px image-url('about/sprite.png') no-repeat;
1070 background-position: 0px 0px;
1074 background-position: 0px -40px;
1078 background-position: 0px -80px;
1082 background-position: 0px -120px;
1086 background-position: 0px -160px;
1090 background-position: -45px -160px;