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.png") no-repeat 0 0;
41 background-image: image-url("sprite.svg");
46 .icon.search { /*rtl:ignore*/ background-position: 0 0; }
47 .icon.donate { /*rtl:ignore*/ background-position: -20px 0; }
48 .icon.zoomin { /*rtl:ignore*/ background-position: -40px 0; }
49 .icon.zoomout { /*rtl:ignore*/ background-position: -60px 0; }
50 .icon.geolocate { /*rtl:ignore*/ background-position: -80px 0; }
51 .active .icon.geolocate { /*rtl:ignore*/ background-position: -80px -20px; }
52 .icon.layers { /*rtl:ignore*/ background-position: -100px 0; }
53 .icon.key { /*rtl:ignore*/ background-position: -120px 0; }
54 .icon.share { /*rtl:ignore*/ background-position: -140px 0; }
55 .icon.clipboard { /*rtl:ignore*/ background-position: -160px 0; }
56 .icon.link { /*rtl:ignore*/ background-position: -180px 0; }
57 .icon.close { /*rtl:ignore*/ background-position: -200px 0; }
58 .icon.close:hover { /*rtl:ignore*/ background-position: -200px -20px; }
59 .icon.check { /*rtl:ignore*/ background-position: -220px 0; }
60 .icon.note { /*rtl:ignore*/ background-position: -240px 0; }
61 .icon.note.grey { /*rtl:ignore*/ background-position: -240px -20px; }
62 .icon.query { /*rtl:ignore*/ background-position: -260px 0; }
64 /* Utility for de-emphasizing content */
70 /* Rules for borders */
71 /* These add additional colours to those provided by bootstrap */
73 border-color: $grey !important;
77 border-color: $lightgrey !important;
80 /* Rules for the header */
87 background: image-url("menu-icon.png") no-repeat;
88 background-size: 30px 30px;
91 margin: 14px 10px 0 0;
96 height: $headerHeight;
101 h1, nav, nav > ul, nav > ul > li {
102 display: inline-block;
107 padding: $lineheight * 0.5;
130 & > .btn-group .btn-outline-primary {
131 @include button-outline-variant($green, $color-hover: $white, $active-color: $white);
135 .btn-outline-primary {
140 border-top-color: $grey;
144 background-color: lighten($green, 30%);
149 // Small tweaks to the toggle to stop the primary colour showing through
150 // when the menu is shown
151 .show > .btn-outline-primary.dropdown-toggle {
152 background-color: $green;
153 border-color: $green;
156 box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
168 color: darken($darkgrey, 25%);
172 background-color: lighten($grey, 10%);
176 nav.primary, nav.secondary {
179 background-color: $green;
185 #compact-secondary-nav {
190 #compact-secondary-nav {
191 display: inline-block;
204 flex-direction: column;
206 min-height: $headerHeight;
218 #sidebar .search_forms,
235 .user-menu, .login-menu {
240 #compact-secondary-nav {
245 display: inline-block;
248 .overlay-sidebar #sidebar .welcome {
252 .overlay-sidebar #sidebar #banner {
257 /* Utility for styling notification numbers */
260 background: lighten($green, 30%);
262 font-weight: $font-weight-normal;
265 /* Rules for Leaflet maps */
267 .leaflet-top.leaflet-right,
268 .leaflet-top.leaflet-left {
272 flex-direction: column;
273 flex-wrap: wrap-reverse;
276 .leaflet-control .control-button {
280 background-color: #333;
281 background-color: rgba(0,0,0,.6);
286 background-color: black;
291 background-color: #333;
292 background-color: rgba(0,0,0,.5);
297 background-color: $vibrant-green;
301 border-start-start-radius: 4px;
305 border-end-start-radius: 4px;
314 /* Rules for the sidebar and main map area */
334 width: $sidebarWidth;
342 .overlay-sidebar #sidebar {
370 width: $sidebarWidth;
386 .leaflet-marker-draggable {
401 border-bottom: 1px solid $grey;
407 @include media-breakpoint-down(md) {
449 border: 2px solid #fff;
452 transition: border-color 0.08s ease-in;
459 border-bottom-right-radius: 3px;
463 text-stroke: 2px #fff;
464 background: rgba(255,255,255,.9);
466 input[type="radio"] {
471 &.active { border-color: darken($green, 10%); }
474 &.active { border-color: darken($green, 20%); }
484 li.disabled { color: $darkgrey; }
495 top: 10px !important;
497 margin-right: 0px !important;
498 margin-top: 0px !important;
502 .leaflet-popup-scrolled {
503 padding-right: $lineheight;
504 border-bottom: 0px !important;
505 border-top: 0px !important;
508 .leaflet-popup-content-wrapper {
509 border-radius: 4px !important;
512 /* Rules for attribution text under the main map shown on printouts */
514 .donate-attr { color: darken($green, 10%) !important; }
516 /* Rules for the sidebar */
526 /* Temporary label size override until we remove site-wide font customisation */
537 /* Stop bootstrap 5 from floating legends when they don't need to be */
542 /* Override the text colour for primary and secondary buttons, to match our
543 bootstrap 4 colours. Note this has accessibility issues, which is why
544 bootstrap 5 calculates black as the appropriate colour, and we should
545 reconsider our colours at some point with that in mind. */
548 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
552 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
555 .btn-outline-secondary {
556 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
559 /* Rules for the search and direction forms */
561 header .search_forms,
566 /* Rules for the map key which appears in the popout sidebar */
569 .mapkey-table-key img {
576 /* Rules for search sidebar */
578 #sidebar .search_results_entry {
580 background: $list-highlight;
583 .search_more .loader {
588 /* Rules for routing */
591 background-image: image-url('routing-sprite.png');
594 background-repeat: no-repeat;
596 @for $i from 0 through 25 {
597 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
607 background: $list-highlight;
610 .routing_marker { width: 15px; cursor: move; }
616 /* Rules for the history sidebar */
618 #sidebar .changesets {
620 &.selected { background: $list-highlight; }
621 /* color is derived from changeset bbox fillColor in history.js */
623 a.stretched-link > span, a:not(.stretched-link), [title] {
625 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
629 .changeset_more .loader {
635 /* Rules for the browse sidebar */
639 padding-bottom: $spacer;
640 margin-bottom: $spacer;
641 border-bottom: 1px solid $grey;
644 word-wrap: break-word;
648 .browse-section:last-of-type {
654 white-space: pre-wrap;
656 tr:last-child th, tr:last-child td {
660 .colour-preview-box {
663 // add color via inline css on element: background-color: <tag value>;
667 span.action-button:hover {
669 text-decoration: underline;
674 margin: 0 0 10px 10px;
687 background: $list-highlight;
694 /* Bootstrap buttons don't have any vertical margin, so
695 they touch when adjacent buttons wrap onto a new line
696 e.g. wide form buttons on a narrow sidebar */
700 margin-bottom: $spacer * 0.25;
704 /* Force LTR/RTL alignment for placeholder text */
706 .form-control::placeholder {
710 /* Rules for export sidebar */
718 .export_area_inputs {
719 margin-bottom: $spacer;
727 background: $lightgrey;
729 #maxlat { margin-top: -1px; }
732 /*rtl:ignore*/ margin-left: -1px;
736 /*rtl:ignore*/ margin-right: -1px;
738 #minlat { margin-bottom: -1px; }
742 /* Rules for edit pages */
753 /* Rules for non-map content pages */
756 background: $lightgrey;
763 padding: $lineheight;
766 /* Overrides for pages that use new layout conventions */
768 .header-illustration {
769 background-position: 0 0;
770 background-repeat: no-repeat;
778 background-image: image-url("sign-up-illustration.png");
782 background-image: image-url("confirm-illustration.png");
786 background-image: image-url("terms-illustration.png");
794 background-image: image-url("sign-up-illustration-arm.png");
797 pointer-events: none;
801 [dir=rtl] .header-illustration {
802 transform: scaleX(-1);
805 transform: scaleX(-1);
809 /* Rules for small maps in content areas */
813 margin-bottom: $lineheight;
816 @include media-breakpoint-up(md) {
822 /* Rules for the user map */
824 .content_map .leaflet-popup-content {
829 /* Rules for user popups on maps */
840 /* Rules for the diary entry page */
851 border-top: 1px dashed $grey;
853 border-top: 1px solid $grey;
858 /* Rules for the account confirmation page */
862 padding: $lineheight;
863 margin-bottom: $lineheight;
872 list-style-type: lower-alpha;
877 /* Rules for messages pages */
881 background: $offwhite;
884 .inbox-row-unread td {
890 background-color: $lightgrey;
902 background-color: $lightgrey;
905 /* Rules for user images */
917 img.user_thumbnail_tiny {
923 /* General styles for action lists / subnavs */
925 nav.secondary-actions {
938 border-left: 1px solid $grey;
939 padding-left: $lineheight * 0.5;
940 margin-right: $lineheight * 0.5;
941 margin-bottom: $lineheight * 0.125;
946 div.secondary-actions {
951 /* Rules for rich text */
956 background: $lightgrey;
961 background: $lightgrey;
963 white-space: pre-wrap;
971 padding: $lineheight;
972 background-color: $offwhite;
979 border-left: $lineheight solid $offwhite;
980 padding-left: $lineheight;
986 /* Rules for the "Welcome" page */
987 .site-welcome, .site-fixthemap {
989 background-image: image-url("welcome-sprite.png");
990 background-size: 500px 250px;
1000 /*rtl:ignore*/ background-position: -50px 0;
1005 vertical-align: middle;
1009 /*rtl:ignore*/ background-position: -100px 0;
1013 /*rtl:ignore*/ background-position: -150px 0;
1017 /*rtl:ignore*/ background-position: -200px 0;
1021 /*rtl:ignore*/ background-position: -250px 0;
1025 /*rtl:ignore*/ background-position: -300px 0;
1029 /*rtl:ignore*/ background-position: -350px 0;
1033 background-color: #333;
1038 .site-about #content {
1039 background-color: $lightgrey;
1050 color: $vibrant-green;
1056 background-position: 0 50%;
1057 background-repeat: no-repeat;
1058 background-image: image-url('about/osm.png');
1059 background-size: cover;
1060 background-color: $vibrant-green;
1064 background: $vibrant-green;
1068 display: inline-block;
1077 background: 40px 40px image-url('about/sprite.png') no-repeat;
1081 background-position: 0px 0px;
1085 background-position: 0px -40px;
1089 background-position: 0px -80px;
1093 background-position: 0px -120px;
1097 background-position: 0px -160px;
1101 background-position: -45px -160px;