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 the map key which appears in the popout sidebar */
568 .mapkey-table-key img {
575 /* Rules for search sidebar */
577 #sidebar .search_results_entry {
579 background: $list-highlight;
582 .search_more .loader {
587 /* Rules for routing */
590 background-image: image-url('routing-sprite.png');
593 background-repeat: no-repeat;
595 @for $i from 0 through 25 {
596 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
606 background: $list-highlight;
609 .routing_marker { width: 15px; cursor: move; }
615 /* Rules for the history sidebar */
617 #sidebar .changesets {
619 &.selected { background: $list-highlight; }
620 /* color is derived from changeset bbox fillColor in history.js */
622 a.stretched-link > span, a:not(.stretched-link), [title] {
624 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
628 .changeset_more .loader {
634 /* Rules for the browse sidebar */
638 padding-bottom: $spacer;
639 margin-bottom: $spacer;
640 border-bottom: 1px solid $grey;
643 word-wrap: break-word;
647 .browse-section:last-of-type {
653 white-space: pre-wrap;
655 tr:last-child th, tr:last-child td {
659 .colour-preview-box {
662 // add color via inline css on element: background-color: <tag value>;
666 span.action-button:hover {
668 text-decoration: underline;
673 margin: 0 0 10px 10px;
686 background: $list-highlight;
693 /* Bootstrap buttons don't have any vertical margin, so
694 they touch when adjacent buttons wrap onto a new line
695 e.g. wide form buttons on a narrow sidebar */
699 margin-bottom: $spacer * 0.25;
703 /* Force LTR/RTL alignment for placeholder text */
705 .form-control::placeholder {
709 /* Rules for export sidebar */
717 .export_area_inputs {
718 margin-bottom: $spacer;
726 background: $lightgrey;
728 #maxlat { margin-top: -1px; }
731 /*rtl:ignore*/ margin-left: -1px;
735 /*rtl:ignore*/ margin-right: -1px;
737 #minlat { margin-bottom: -1px; }
741 /* Rules for edit pages */
752 /* Rules for non-map content pages */
755 background: $lightgrey;
762 padding: $lineheight;
765 /* Overrides for pages that use new layout conventions */
767 .header-illustration {
768 background-position: 0 0;
769 background-repeat: no-repeat;
777 background-image: image-url("sign-up-illustration.png");
781 background-image: image-url("confirm-illustration.png");
785 background-image: image-url("terms-illustration.png");
793 background-image: image-url("sign-up-illustration-arm.png");
796 pointer-events: none;
800 [dir=rtl] .header-illustration {
801 transform: scaleX(-1);
804 transform: scaleX(-1);
808 /* Rules for small maps in content areas */
812 margin-bottom: $lineheight;
815 @include media-breakpoint-up(md) {
821 /* Rules for the user map */
823 .content_map .leaflet-popup-content {
828 /* Rules for user popups on maps */
839 /* Rules for the diary entry page */
850 border-top: 1px dashed $grey;
852 border-top: 1px solid $grey;
857 /* Rules for the account confirmation page */
861 padding: $lineheight;
862 margin-bottom: $lineheight;
871 list-style-type: lower-alpha;
876 /* Rules for messages pages */
880 background: $offwhite;
883 .inbox-row-unread td {
889 background-color: $lightgrey;
901 background-color: $lightgrey;
904 /* Rules for user images */
916 img.user_thumbnail_tiny {
922 /* General styles for action lists / subnavs */
924 nav.secondary-actions {
937 border-left: 1px solid $grey;
938 padding-left: $lineheight * 0.5;
939 margin-right: $lineheight * 0.5;
940 margin-bottom: $lineheight * 0.125;
945 div.secondary-actions {
950 /* Rules for rich text */
955 background: $lightgrey;
960 background: $lightgrey;
962 white-space: pre-wrap;
970 padding: $lineheight;
971 background-color: $offwhite;
978 border-left: $lineheight solid $offwhite;
979 padding-left: $lineheight;
985 /* Rules for the "Welcome" page */
986 .site-welcome, .site-fixthemap {
988 background-image: image-url("welcome-sprite.png");
989 background-size: 500px 250px;
999 /*rtl:ignore*/ background-position: -50px 0;
1004 vertical-align: middle;
1008 /*rtl:ignore*/ background-position: -100px 0;
1012 /*rtl:ignore*/ background-position: -150px 0;
1016 /*rtl:ignore*/ background-position: -200px 0;
1020 /*rtl:ignore*/ background-position: -250px 0;
1024 /*rtl:ignore*/ background-position: -300px 0;
1028 /*rtl:ignore*/ background-position: -350px 0;
1032 background-color: #333;
1037 .site-about #content {
1038 background-color: $lightgrey;
1049 color: $vibrant-green;
1055 background-position: 0 50%;
1056 background-repeat: no-repeat;
1057 background-image: image-url('about/osm.png');
1058 background-size: cover;
1059 background-color: $vibrant-green;
1063 background: $vibrant-green;
1067 display: inline-block;
1076 background: 40px 40px image-url('about/sprite.png') no-repeat;
1080 background-position: 0px 0px;
1084 background-position: 0px -40px;
1088 background-position: 0px -80px;
1092 background-position: 0px -120px;
1096 background-position: 0px -160px;
1100 background-position: -45px -160px;