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;
22 #container { position: relative; }
25 vertical-align: middle;
26 margin-right: $lineheight * 0.25;
29 [dir=rtl] { /* no-r2 */ text-align: right; }
31 [dir=ltr] { /* no-r2 */ text-align: left; }
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 { /* no-r2 */ background-position: 0 0; }
47 .icon.donate { /* no-r2 */ background-position: -20px 0; }
48 .icon.zoomin { /* no-r2 */ background-position: -40px 0; }
49 .icon.zoomout { /* no-r2 */ background-position: -60px 0; }
50 .icon.geolocate { /* no-r2 */ background-position: -80px 0; }
51 .active .icon.geolocate { /* no-r2 */ background-position: -80px -20px; }
52 .icon.layers { /* no-r2 */ background-position: -100px 0; }
53 .icon.key { /* no-r2 */ background-position: -120px 0; }
54 .icon.share { /* no-r2 */ background-position: -140px 0; }
55 .icon.clipboard { /* no-r2 */ background-position: -160px 0; }
56 .icon.link { /* no-r2 */ background-position: -180px 0; }
57 .icon.close { /* no-r2 */ background-position: -200px 0; }
58 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
59 .icon.check { /* no-r2 */ background-position: -220px 0; }
60 .icon.note { /* no-r2 */ background-position: -240px 0; }
61 .icon.note.grey { /* no-r2 */ background-position: -240px -20px; }
62 .icon.query { /* no-r2 */ 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 */
85 background: image-url("menu-icon.png") no-repeat;
86 background-size: 30px 30px;
89 margin: 14px 10px 0 0;
94 height: $headerHeight;
99 h1, nav, nav > ul, nav > ul > li {
100 display: inline-block;
105 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);
170 color: darken($darkgrey, 25%);
174 .btn-outline-secondary {
175 @include button-outline-variant($darkgrey, $color-hover: $white, $active-color: $white);
180 .btn-outline-secondary {
181 @include button-outline-variant($darkgrey, $color-hover: $darkgrey, $active-background: white, $active-border: $darkgrey);
190 background-color: lighten($grey, 10%);
194 nav.primary, nav.secondary {
197 background-color: $green;
203 #compact-secondary-nav {
208 #compact-secondary-nav {
209 display: inline-block;
223 float: none !important;
231 min-height: $headerHeight;
243 #sidebar .search_forms,
259 border-top: 1px solid #eee;
261 border-bottom: 1px solid #eee;
279 .user-menu, .login-menu {
284 #compact-secondary-nav {
289 display: inline-block;
292 .overlay-sidebar #sidebar .welcome {
296 .overlay-sidebar #sidebar #banner {
301 /* Utility for styling notification numbers */
304 background: lighten($green, 30%);
306 font-weight: $font-weight-normal;
309 /* Rules for the message shown in place of the map when javascript is disabled */
317 /* Rules for Leaflet maps */
319 .leaflet-top.leaflet-right,
320 .leaflet-top.leaflet-left {
324 flex-direction: column;
325 flex-wrap: wrap-reverse;
328 .leaflet-control .control-button {
332 background-color: #333;
333 background-color: rgba(0,0,0,.6);
338 background-color: black;
343 background-color: #333;
344 background-color: rgba(0,0,0,.5);
349 background-color: $vibrant-green;
353 border-start-start-radius: 4px;
357 border-end-start-radius: 4px;
366 /* Rules for the sidebar and main map area */
386 width: $sidebarWidth;
402 .overlay-sidebar #sidebar {
435 width: $sidebarWidth;
439 background-color: rgba(255, 255, 255, 0.5);
456 .leaflet-marker-draggable {
471 border-bottom: 1px solid $grey;
477 @include media-breakpoint-down(md) {
519 border: 2px solid #fff;
522 transition: border-color 0.08s ease-in;
529 border-bottom-right-radius: 3px;
533 text-stroke: 2px #fff;
534 background: rgba(255,255,255,.9);
536 input[type="radio"] {
541 &.active { border-color: darken($green, 10%); }
544 &.active { border-color: darken($green, 20%); }
554 li.disabled { color: $darkgrey; }
565 top: 10px !important;
567 margin-right: 0px !important;
568 margin-top: 0px !important;
572 .leaflet-popup-scrolled {
573 padding-right: $lineheight;
574 border-bottom: 0px !important;
575 border-top: 0px !important;
578 .leaflet-popup-content-wrapper {
579 border-radius: 4px !important;
582 /* Rules for attribution text under the main map shown on printouts */
588 .donate-attr { color: darken($green, 10%) !important; }
590 /* Rules for the sidebar */
604 /* Temporary label size override until we remove site-wide font customisation */
615 /* Stop bootstrap 5 from floating legends when they don't need to be */
620 /* Override the text colour for primary and secondary buttons, to match our
621 bootstrap 4 colours. Note this has accessibility issues, which is why
622 bootstrap 5 calculates black as the appropriate colour, and we should
623 reconsider our colours at some point with that in mind. */
626 @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
630 @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
633 .btn-outline-secondary {
634 @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
637 /* Rules for the search and direction forms */
639 header .search_forms,
644 /* Rules for the map key which appears in the popout sidebar */
647 .mapkey-table-key img {
654 /* Rules for search sidebar */
656 #sidebar .search_results_entry {
659 &.selected { background: $list-highlight; }
662 .search_more .loader {
667 .search_results_error {
672 /* Rules for routing */
675 background-image: image-url('routing-sprite.png');
678 background-repeat: no-repeat;
680 @for $i from 0 through 25 {
681 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
693 background: $list-highlight;
696 .routing_marker { width: 15px; cursor: move; }
702 /* Rules for the history sidebar */
704 #sidebar .changesets {
706 &.selected { background: $list-highlight; }
707 /* color is derived from changeset bbox fillColor in history.js */
709 a.stretched-link > span, a:not(.stretched-link), [title] {
711 z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
715 .changeset_more .loader {
721 /* Rules for the browse sidebar */
725 padding-bottom: $spacer;
726 margin-bottom: $spacer;
727 border-bottom: 1px solid $grey;
730 word-wrap: break-word;
734 .browse-section:last-of-type {
739 background-color: $offwhite;
741 border-collapse: separate;
744 margin-bottom: $spacer;
747 border-bottom: 1px solid $grey;
750 tr:last-child th, tr:last-child td {
758 word-wrap: break-word;
759 white-space: pre-wrap;
764 background-color: $offwhite;
768 border-left: 1px solid $grey;
769 background-color: #fff;
772 .colour-preview-box {
777 border: 1px solid rgba(0, 0, 0, .1);
778 // add color via inline css on element: background-color: <tag value>;
782 .subscribe-buttons input {
788 span.action-button:hover {
790 text-decoration: underline;
795 margin: 0 0 10px 10px;
808 background: $list-highlight;
815 /* Bootstrap buttons don't have any vertical margin, so
816 they touch when adjacent buttons wrap onto a new line
817 e.g. wide form buttons on a narrow sidebar */
821 margin-bottom: $spacer * 0.25;
825 /* Rules for export sidebar */
833 .export_area_inputs {
834 margin-bottom: $spacer;
842 background: $lightgrey;
844 #maxlat { margin-top: -1px; }
847 /* no-r2 */ margin-left: -1px;
851 /* no-r2 */ margin-right: -1px;
853 #minlat { margin-bottom: -1px; }
857 /* Rules for edit pages */
873 /* Rules for non-map content pages */
876 background: $lightgrey;
883 padding: $lineheight;
886 /* Overrides for pages that use new layout conventions */
888 .header-illustration {
889 background-position: 0 0;
890 background-repeat: no-repeat;
898 background-image: image-url("sign-up-illustration.png");
902 background-image: image-url("confirm-illustration.png");
906 background-image: image-url("terms-illustration.png");
914 background-image: image-url("sign-up-illustration-arm.png");
917 pointer-events: none;
921 [dir=rtl] .header-illustration {
922 transform: scaleX(-1);
925 transform: scaleX(-1);
938 /* Rules for small maps in content areas */
942 margin-bottom: $lineheight;
945 @include media-breakpoint-up(md) {
951 /* Rules for the user map */
953 .content_map .leaflet-popup-content {
958 /* Rules for user popups on maps */
969 /* Rules for the user list */
975 /* Rules for the diary entry page */
986 border-top: 1px dashed $grey;
988 border-top: 1px solid $grey;
993 /* Rules for the account confirmation page */
997 padding: $lineheight;
998 margin-bottom: $lineheight;
1003 list-style: inherit;
1007 list-style-type: lower-alpha;
1012 /* Rules for the oauth authorization page */
1014 .oauth-authorize ul {
1018 /* Rules for messages pages */
1022 background: $offwhite;
1026 background: #CBEEA7;
1031 background-color: $lightgrey;
1037 .describe_location {
1043 background-color: $lightgrey;
1046 /* Rules for user images */
1053 img.user_thumbnail {
1058 img.user_thumbnail_tiny {
1065 /* General styles for action lists / subnavs */
1067 nav.secondary-actions {
1072 flex-direction: row;
1080 border-left: 1px solid $grey;
1081 padding-left: $lineheight * 0.5;
1082 margin-right: $lineheight * 0.5;
1083 margin-bottom: $lineheight * 0.125;
1088 div.secondary-actions {
1093 /* Rules for rich text */
1098 background: $lightgrey;
1103 background: $lightgrey;
1105 white-space: pre-wrap;
1113 padding: $lineheight;
1114 background-color: $offwhite;
1121 border-left: $lineheight solid $offwhite;
1122 padding-left: $lineheight;
1128 /* Rules for the iD editor */
1135 /* Rules for the "Welcome" page */
1136 .site-welcome, .site-fixthemap {
1138 background-image: image-url("welcome-sprite.png");
1139 background-size: 500px 250px;
1149 /* no-r2 */ background-position: -50px 0;
1154 vertical-align: middle;
1158 /* no-r2 */ background-position: -100px 0;
1162 /* no-r2 */ background-position: -150px 0;
1166 /* no-r2 */ background-position: -200px 0;
1170 /* no-r2 */ background-position: -250px 0;
1174 /* no-r2 */ background-position: -300px 0;
1178 /* no-r2 */ background-position: -350px 0;
1182 background-color: #333;
1187 .site-about #content {
1188 background-color: $lightgrey;
1199 color: $vibrant-green;
1205 background-position: 0 50%;
1206 background-repeat: no-repeat;
1207 background-image: image-url('about/osm.png');
1208 background-size: cover;
1209 background-color: $vibrant-green;
1213 background: $vibrant-green;
1217 display: inline-block;
1226 background: 40px 40px image-url('about/sprite.png') no-repeat;
1230 background-position: 0px 0px;
1234 background-position: 0px -40px;
1238 background-position: 0px -80px;
1242 background-position: 0px -120px;
1246 background-position: 0px -160px;
1250 background-position: -45px -160px;