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 {
652 margin: 0 0 10px 10px;
665 background: $list-highlight;
672 /* Bootstrap buttons don't have any vertical margin, so
673 they touch when adjacent buttons wrap onto a new line
674 e.g. wide form buttons on a narrow sidebar */
678 margin-bottom: $spacer * 0.25;
682 /* Force LTR/RTL alignment for placeholder text */
684 .form-control::placeholder {
688 /* Rules for export sidebar */
696 .export_area_inputs {
697 margin-bottom: $spacer;
705 background: $lightgrey;
707 #maxlat { margin-top: -1px; }
710 /*rtl:ignore*/ margin-left: -1px;
714 /*rtl:ignore*/ margin-right: -1px;
716 #minlat { margin-bottom: -1px; }
720 /* Rules for edit pages */
731 /* Rules for non-map content pages */
734 background: $lightgrey;
741 padding: $lineheight;
744 /* Overrides for pages that use new layout conventions */
746 .header-illustration {
747 background-position: 0 0;
748 background-repeat: no-repeat;
756 background-image: image-url("sign-up-illustration.png");
760 background-image: image-url("confirm-illustration.png");
764 background-image: image-url("terms-illustration.png");
772 background-image: image-url("sign-up-illustration-arm.png");
775 pointer-events: none;
779 [dir=rtl] .header-illustration {
780 transform: scaleX(-1);
783 transform: scaleX(-1);
787 /* Rules for small maps in content areas */
791 margin-bottom: $lineheight;
794 @include media-breakpoint-up(md) {
800 /* Rules for the user map */
802 .content_map .leaflet-popup-content {
807 /* Rules for user popups on maps */
818 /* Rules for the diary entry page */
825 .diary-comment .col-auto {
828 .diary-comment .col {
833 /* Rules for the account confirmation page */
837 padding: $lineheight;
838 margin-bottom: $lineheight;
847 list-style-type: lower-alpha;
852 /* Rules for messages pages */
856 background: $offwhite;
859 .inbox-row-unread td {
865 background-color: $lightgrey;
877 background-color: $lightgrey;
880 /* Rules for user images */
892 img.user_thumbnail_tiny {
898 /* General styles for action lists / subnavs */
900 nav.secondary-actions {
913 border-left: 1px solid $grey;
914 padding-left: $lineheight * 0.5;
915 margin-right: $lineheight * 0.5;
916 margin-bottom: $lineheight * 0.125;
921 div.secondary-actions {
926 /* Rules for rich text */
931 background: $lightgrey;
936 background: $lightgrey;
938 white-space: pre-wrap;
946 padding: $lineheight;
947 background-color: $offwhite;
954 border-left: $lineheight solid $offwhite;
955 padding-left: $lineheight;
961 /* Rules for the "Welcome" page */
962 .site-welcome, .site-fixthemap {
964 background-image: image-url("welcome-sprite.png");
965 background-size: 500px 250px;
975 /*rtl:ignore*/ background-position: -50px 0;
980 vertical-align: middle;
984 /*rtl:ignore*/ background-position: -100px 0;
988 /*rtl:ignore*/ background-position: -150px 0;
992 /*rtl:ignore*/ background-position: -200px 0;
996 /*rtl:ignore*/ background-position: -250px 0;
1000 /*rtl:ignore*/ background-position: -300px 0;
1004 /*rtl:ignore*/ background-position: -350px 0;
1008 background-color: #333;
1013 .site-about #content {
1014 background-color: $lightgrey;
1025 color: $vibrant-green;
1031 background-position: 0 50%;
1032 background-repeat: no-repeat;
1033 background-image: image-url('about/osm.png');
1034 background-size: cover;
1035 background-color: $vibrant-green;
1039 background: $vibrant-green;
1043 display: inline-block;
1052 background: 40px 40px image-url('about/sprite.png') no-repeat;
1056 background-position: 0px 0px;
1060 background-position: 0px -40px;
1064 background-position: 0px -80px;
1068 background-position: 0px -120px;
1072 background-position: 0px -160px;
1076 background-position: -45px -160px;