]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Rework the routing credit to use a bootstrap class
[rails.git] / app / assets / stylesheets / common.scss
1 @import "parameters";
2 @import "bootstrap";
3 @import "rails_bootstrap_forms";
4
5 /* Styles common to large and small screens */
6
7 /* Default rules for the body of every page */
8
9 body {
10   font-family: 'Helvetica Neue',Arial,sans-serif;
11   font-size: $typeheight;
12   line-height: 1.6666;
13   color: #222;
14   background-color: #fff;
15   margin: 0px;
16   padding: 0px;
17   text-align: left;
18   height: 100%;
19 }
20
21 p > img {
22   width: auto;
23   max-width: 100%;
24 }
25
26 small, aside {
27   font-size: 12px;
28 }
29
30 #container { position: relative; }
31
32 .small_icon {
33   vertical-align: middle;
34   margin-right: $lineheight/4;
35 }
36
37 [dir=rtl] { /* no-r2 */ text-align: right; }
38
39 [dir=ltr] { /* no-r2 */ text-align: left; }
40
41 /* Rules for icons */
42
43 .icon {
44   display: inline-block;
45   vertical-align: top;
46   width: 20px;
47   height: 20px;
48   background: transparent image-url("sprite.png") no-repeat 0 0;
49   background-image: image-url("sprite.svg");
50   text-indent: -9999px;
51   overflow: hidden;
52 }
53
54 .icon.search      { /* no-r2 */ background-position: 0 0; }
55 .icon.donate      { /* no-r2 */ background-position: -20px 0; }
56 .icon.zoomin      { /* no-r2 */ background-position: -40px 0; }
57 .icon.zoomout     { /* no-r2 */ background-position: -60px 0; }
58 .icon.geolocate   { /* no-r2 */ background-position: -80px 0; }
59 .active .icon.geolocate   { /* no-r2 */ background-position: -80px -20px; }
60 .icon.layers      { /* no-r2 */ background-position: -100px 0; }
61 .icon.key         { /* no-r2 */ background-position: -120px 0; }
62 .icon.share       { /* no-r2 */ background-position: -140px 0; }
63 .icon.clipboard   { /* no-r2 */ background-position: -160px 0; }
64 .icon.link        { /* no-r2 */ background-position: -180px 0; }
65 .icon.close       { /* no-r2 */ background-position: -200px 0; }
66 .close-wrap:hover .icon.close,
67 .icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
68 .icon.check       { /* no-r2 */ background-position: -220px 0; }
69 .icon.note        { /* no-r2 */ background-position: -240px 0; }
70 .icon.note.grey   { /* no-r2 */ background-position: -240px -20px; }
71 .icon.query       { /* no-r2 */ background-position: -260px 0; }
72
73 /* Rules for links */
74
75 a {
76   color: #24d;
77   text-decoration: none;
78   outline: 0;
79   &:hover {
80     text-decoration: underline;
81   }
82 }
83
84 /* Utility for de-emphasizing content */
85
86 .text-muted a {
87   color: $blue;
88 }
89
90 /* Rules for the header */
91
92 #menu-icon {
93   display: none !important;
94   float: right;
95   background: image-url("menu-icon.png") no-repeat;
96   background-size: 30px 30px;
97   display: block;
98   width: 30px;
99   height: 30px;
100   margin: 14px 10px 0 0;
101   opacity: 0.6;
102 }
103
104 header {
105   height: $headerHeight;
106   position: relative;
107   z-index: 1001;
108   font-size: 14px;
109
110   h1, nav, nav > ul, nav > ul > li {
111     display: inline-block;
112   }
113
114   > * {
115     height: 100%;
116     padding: $lineheight/2;
117   }
118
119   h1, nav.primary {
120     float: left;
121   }
122
123   a, a:hover {
124     text-decoration: none;
125   }
126
127   img.logo {
128     width: 30px;
129     height: 30px;
130     margin-top: -2px;
131     vertical-align: middle;
132   }
133
134   h1 {
135     font-size: 18px;
136     font-weight: 600;
137     line-height: 1.2;
138     margin: 0;
139     padding-top: 15px;
140
141     a {
142       color: #000;
143     }
144
145     a:hover {
146       color: #000;
147     }
148   }
149
150   .btn {
151     font-size: 14px;
152   }
153 }
154
155
156 nav.primary {
157   .btn-outline-primary {
158     @include button-outline-variant($green, $white);
159   }
160
161   .disabled {
162     .btn-outline-primary {
163       color: $grey;
164       cursor: default;
165
166       .caret {
167         border-top-color: $grey;
168       }
169
170       &:hover {
171         background-color: lighten($green, 30%);
172       }
173     }
174   }
175
176   // Small tweaks to the toggle to stop the primary colour showing through
177   // when the menu is shown
178   .show > .btn-outline-primary.dropdown-toggle {
179     background-color: $green;
180     border-color: $green;
181
182     &:focus {
183       box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
184     }
185   }
186 }
187
188 nav.secondary {
189   position: absolute;
190   right: 0;
191
192   .nav-link {
193     padding: 0.2rem;
194     color: $darkgrey;
195   }
196
197   > ul li.current a {
198     color: darken($darkgrey, 25%);
199   }
200
201   .login-menu {
202     .btn-outline-secondary {
203       @include button-outline-variant($darkgrey);
204     }
205   }
206
207   .user-menu {
208     .btn-outline-secondary {
209       @include button-outline-variant($darkgrey, $darkgrey, white, $darkgrey);
210       border-color: $grey;
211       &:hover {
212         border-color: $grey;
213       }
214       &:focus {
215         background-color: white;
216         box-shadow: none;
217       }
218     }
219     &.show .btn-outline-secondary {
220       background-color: white;
221       &:focus {
222         box-shadow: none;
223       }
224     }
225   }
226
227   img.user_thumbnail_tiny {
228     border: 0;
229     border-radius: 3px;
230   }
231
232   #inboxanchor {
233     display: inline-block;
234     height: 25px;
235     margin: 3px 0 3px 3px;
236     background-color: lighten($grey, 10%);
237     line-height: 20px;
238     border-radius: 3;
239   }
240
241   .dropdown-menu {
242     .count-number {
243       font-size: 14px;
244     }
245   }
246 }
247
248 nav.primary, nav.secondary {
249   .dropdown-item {
250     &:hover, &:active {
251       background-color: $green;
252       color: white;
253     }
254   }
255 }
256
257 #compact-secondary-nav {
258   display: none;
259 }
260
261 body.compact-nav {
262   #compact-secondary-nav {
263     display: inline-block;
264   }
265   .compact-hide {
266     display: none;
267   }
268 }
269
270 /* Utility for styling notification numbers */
271
272 .count-number {
273   padding: 2px $lineheight/4;
274   border-radius: 2px;
275   background: lighten($green, 30%);
276   margin: 0 2px;
277   font-size: 11px;
278   color: #333;
279 }
280
281 /* Rules for the message shown in place of the map when javascript is disabled */
282
283 #noscript {
284   z-index: 20000000;
285   margin-left: 400px;
286   margin-top: 50px;
287 }
288
289 /* Rules for Leaflet maps */
290
291 .leaflet-control .control-button {
292   display: block;
293   height: 40px;
294   width: 40px;
295   background-color: #333;
296   background-color: rgba(0,0,0,.6);
297   border-radius: 4px 0 0 4px;
298   margin-bottom: 10px;
299   outline: none;
300
301   &:hover {
302     background-color: black;
303   }
304
305   &.disabled,
306   &.leaflet-disabled {
307     background-color: #333;
308     background-color: rgba(0,0,0,.5);
309     cursor: default;
310   }
311
312   &.active {
313     background-color: $vibrant-green;
314   }
315
316   .icon {
317     margin: 10px;
318   }
319 }
320
321 .leaflet-control .zoomin,
322 .control-layers .control-button {
323   margin-bottom: 0px;
324   border-radius: 4px 0 0 0;
325 }
326
327 .leaflet-control .zoomout,
328 .control-key .control-button {
329   margin-bottom: 0;
330   border-radius: 0;
331 }
332
333 .control-locate .control-button,
334 .control-share .control-button {
335   border-radius: 0 0 0 4px;
336 }
337
338 /* Rules for the sidebar and main map area */
339
340 .map-layout {
341   #content {
342     overflow: hidden;
343     position: absolute;
344     top: $headerHeight;
345     bottom: 0;
346     width: 100%;
347   }
348
349   #sidebar, #map {
350     position: relative;
351     height: 100%;
352     overflow-x: hidden;
353     overflow-y: auto;
354   }
355
356   #sidebar {
357     float: left;
358     width: $sidebarWidth;
359     background: #fff;
360
361     #sidebar_loader {
362       display: none;
363     }
364
365     > div {
366       position: relative;
367       float: left;
368       clear: both;
369       width: 100%;
370     }
371
372     h2 {
373       padding: $lineheight $lineheight $lineheight/2;
374       font-size: 1.5rem;
375     }
376
377     h3, h4 {
378       margin-top: $lineheight;
379       margin-bottom: $lineheight/2;
380       font-size: 1.25rem;
381     }
382
383     .close-wrap {
384       cursor: pointer;
385       position: absolute;
386       top: 0;
387       right: 0;
388       width: 60px;
389       height: 60px;
390
391       .icon.close {
392         pointer-events: none;
393         position: absolute;
394         right: 20px;
395         top: 20px;
396       }
397     }
398
399     .icon.close {
400       float: right;
401       cursor: pointer;
402     }
403
404     .flash {
405       padding: 15px;
406
407       picture {
408         margin-right: -25px;
409       }
410
411       div.message {
412         margin-left: 30px;
413       }
414     }
415   }
416
417   .overlay-sidebar #sidebar {
418     position: absolute;
419     z-index: 1000;
420     height: auto;
421     overflow: hidden;
422
423     #banner {
424       display: block;
425     }
426
427     .welcome {
428       display: none;
429
430       &.visible {
431         display: block;
432       }
433     }
434
435     #sidebar_content {
436       display: none;
437     }
438   }
439
440   .welcome {
441     display: none;
442
443     p {
444       font-size: 110%;
445       font-weight: 300;
446     }
447   }
448
449   #banner {
450     display: none;
451
452     img {
453       display: block;
454       width: $sidebarWidth;
455     }
456   }
457
458   #map {
459     height: 100%;
460     overflow: hidden;
461
462     &.query-active {
463       cursor: help;
464     }
465
466     &.query-disabled {
467       cursor: not-allowed;
468     }
469
470     .leaflet-marker-draggable {
471       cursor: move;
472     }
473   }
474
475   #map-ui {
476     display: none;
477     position: relative;
478     float: right;
479     width: 250px;
480     height: 100%;
481     background: white;
482     overflow: auto;
483
484     .section {
485       border-bottom: 1px solid $grey;
486       padding: 10px 20px;
487     }
488
489     a.close-button {
490       float: right;
491       padding:5px;
492       font-size:20px;
493       line-height:10px;
494       color:#222;
495       border:1px solid $grey;
496     }
497
498     .tooltip {
499       opacity: 1;
500       border: 1px solid $grey;
501       .tooltip-arrow {
502         border-top-color: $grey;
503       }
504     }
505   }
506 }
507
508 .layers-ui,
509 .share-ui {
510   li:last-child {
511     margin-bottom: 0;
512   }
513 }
514
515 .layers-ui {
516   .base-layers {
517     .leaflet-container {
518       width: 100%;
519       height: 50px;
520       cursor: pointer;
521     }
522
523     li  {
524       overflow: hidden;
525       border-radius: 3px;
526       border: 2px solid #fff;
527       margin-bottom: 8px;
528       position: relative;
529       transition: border-color 0.08s ease-in;
530
531       label {
532         position: absolute;
533         top: 0;
534         left: 0;
535         padding: 2px 6px;
536         border-bottom-right-radius: 3px;
537         cursor: pointer;
538         font-weight: 600;
539         font-size: 16px;
540         text-stroke: 2px #fff;
541         background: rgba(255,255,255,.9);
542         z-index: 1000;
543         input[type="radio"] {
544           display: none;
545         }
546       }
547
548       &.active { border-color: darken($green, 10%); }
549       &:hover {
550         border-color: $grey;
551         &.active { border-color: darken($green, 20%); }
552       }
553     }
554   }
555
556   .overlay-layers {
557     p {
558       font-size: 13px;
559       margin-bottom: 8px;
560     }
561     li.disabled { color: $darkgrey; }
562   }
563 }
564
565 .share-ui {
566   .share-tabs {
567     margin-bottom: 10px;
568
569     a {
570       color: #fff;
571       text-decoration: none;
572       background-color: $lightblue;
573       padding: 5px 10px;
574       border-right: 1px solid #fff;
575     }
576
577     a:first-child {
578       border-right: 1px solid #fff;
579       border-radius: 4px 0 0 4px;
580     }
581
582     a:last-child {
583       border-radius: 0 4px 4px 0;
584     }
585
586     a.active {
587       background-color: $blue;
588     }
589   }
590
591   .share-tab {
592     display: none;
593   }
594
595   .share-link {
596     input[type=text],
597     textarea {
598       width: 100%;
599       font-family: monospace;
600       font-size: small;
601       line-height: 1.3;
602     }
603   }
604
605   .share-image {
606     label {
607       margin-right: 10px;
608     }
609   }
610
611   #embed_html {
612     resize: vertical;
613   }
614
615   #mapnik_scale {
616     width: 100px;
617   }
618 }
619
620 .leaflet-top {
621   top: $lineheight/2 !important;
622   .leaflet-control {
623     margin-right: 0px !important;
624     margin-top: 0px !important;
625   }
626 }
627
628 .leaflet-popup-scrolled {
629   padding-right: $lineheight;
630   border-bottom: 0px !important;
631   border-top: 0px !important;
632 }
633
634 .leaflet-popup-content-wrapper {
635   border-radius: 4px !important;
636 }
637
638 /* Rules for attribution text under the main map shown on printouts */
639
640 #attribution {
641   display: none;
642
643   table {
644     width: 100%
645   }
646 }
647
648 .attribution_license,
649 .attribution_project {
650   text-align: left;
651 }
652
653 .attribution_notice {
654   text-align: center;
655 }
656
657 .donate-attr { color: darken($green, 10%) !important; }
658
659 /* Rules for the sidebar */
660
661 .sidebar_heading {
662   position: relative;
663   padding: $lineheight/2 $lineheight;
664   // background: $offwhite;
665   // border-bottom: 1px solid $grey;
666   > .close {
667     float: right;
668     margin-top: 2px;
669     cursor: pointer;
670   }
671 }
672
673 #browse_status {
674   input {
675     display: block;
676     margin-left: auto;
677     margin-right: auto;
678   }
679 }
680
681 #sidebar {
682   #sidebar_loader,
683   .search_more {
684     width: 100%;
685     margin: $lineheight auto;
686   }
687
688   .loader {
689     text-align: center;
690     margin: auto;
691     width: 40px;
692     display: block;
693   }
694 }
695
696 /* Temporary label size override until we remove site-wide font customisation */
697
698 form {
699   label {
700     font-size: 16px;
701   }
702 }
703
704 /* Rules for the search and direction forms */
705
706 header .search_forms,
707 .directions_form {
708   display: none;
709 }
710
711 /* Rules for the map key which appears in the popout sidebar */
712
713 #mapkey {
714  .mapkey-table-key img {
715     display: block;
716     margin-left: auto;
717     margin-right: auto;
718   }
719 }
720
721 /* Rules for search sidebar */
722
723 #sidebar .search_results_entry {
724   ul li {
725     cursor: pointer;
726     &.selected { background: $list-highlight; }
727   }
728
729   .search_more .loader {
730     display: none;
731     width: 100%;
732   }
733 }
734
735 .search_results_error {
736   color: #f00;
737   padding: 10px 20px;
738 }
739
740 /* Rules for routing */
741
742 #sidebar_content>table {
743     padding: 5px 20px 10px 15px;
744     width: 100%;
745     border-collapse: separate;
746     border-spacing: 0;
747 }
748
749 div.direction {
750   background-image: image-url('routing-sprite.png');
751   width: 20px;
752   height: 20px;
753   background-repeat: no-repeat;
754 }
755 @for $i from 0 through 25 {
756 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
757 }
758
759 p#routing_summary {
760     padding: 0 $lineheight $lineheight/4;
761 }
762
763 td.instruction, td.distance {
764     padding-top: $lineheight/5;
765     padding-bottom: $lineheight/5;
766     border-bottom: 1px solid $grey;
767 }
768 td.distance {
769     color: $darkgrey;
770     text-align: right;
771     font-size: x-small;
772 }
773 tr.turn {
774     cursor: pointer;
775 }
776 tr.turn:hover {
777     background: $list-highlight;
778 }
779
780 .routing_marker { width: 15px; cursor: move; }
781
782 /* Rules for entity history */
783
784 #sidebar_content {
785   .browse_details {
786     position: relative;
787     border-bottom: $keyline;
788   }
789 }
790
791 .browse_status {
792   display: none;
793 }
794
795 /* Rules for the history sidebar */
796
797 #sidebar .changesets {
798   li {
799     cursor: pointer;
800
801     &.selected { background: $list-highlight; }
802     /* color is derived from changeset bbox fillColor in history.js */
803   }
804
805   .comments {
806     float: right;
807     color: $darkgrey;
808   }
809
810   .comments-0 {
811     opacity: 0.5;
812   }
813
814   .changeset_more .loader {
815     display: none;
816     width: 100%;
817   }
818 }
819
820 /* Rules for the browse sidebar */
821
822 #sidebar_content {
823   .browse-section {
824     padding: $lineheight/2 $lineheight;
825     border-bottom: 1px solid $grey;
826
827     h4:first-child {
828       margin-top: 0;
829       word-wrap: break-word;
830     }
831   }
832
833   .browse-section:last-of-type {
834     border-bottom: none;
835   }
836
837   .paginate {
838     float: right;
839     padding: 1px 6px;
840     border: 1px solid $lightgrey;
841     border-radius: 3px;
842   }
843
844   .browse-field {
845     margin-bottom: 10px;
846
847     h4 {
848       padding: 5px 0 5px 10px;
849       font-size: 12px;
850       border: 1px solid $grey;
851       border-radius: 4px 4px 0 0;
852       background-color: $offwhite;
853     }
854
855     p {
856       padding: 7px 10px;
857       font-size: 12px;
858       background-color: #FFF;
859       border: 1px solid $grey;
860       border-top: 0;
861       border-radius: 0 0 4px 4px;
862     }
863   }
864
865   .browse-tag-list {
866     background-color: $offwhite;
867     border: 1px solid $grey;
868     border-radius: 3px;
869     table-layout: fixed;
870     border-collapse: separate;
871     border-spacing: 0;
872     width: 100%;
873
874     th, td {
875       border-bottom: 1px solid $grey;
876     }
877
878     tr:last-child th, tr:last-child td {
879       border-bottom: 0;
880     }
881
882     .browse-tag-k,
883     .browse-tag-v {
884       width: 50%;
885       padding: 6px 10px;
886       word-wrap: break-word;
887       white-space: pre-wrap;
888     }
889
890     .browse-tag-k {
891       font-weight: 500;
892       background-color: $offwhite;
893     }
894
895     .browse-tag-v {
896       border-left: 1px solid $grey;
897       background-color: #fff;
898     }
899
900     .colour-preview-box {
901       float: right;
902       width: 14px;
903       height: 14px;
904       margin: 4px 0px;
905       border: 1px solid rgba(0, 0, 0, .1);
906       // add color via inline css on element: background-color: <tag value>;
907     }
908   }
909
910   .note-comments li, .changeset-comments li {
911     margin: $lineheight/2 0;
912
913     p {
914       margin: 10px 6px 0 6px;
915       line-height: 1.5;
916     }
917   }
918
919   .comments-header {
920     float: left;
921   }
922
923   .subscribe-buttons {
924     float: left;
925     margin: 18px 10px 10px;
926     min-width: 80px;
927   }
928
929   .subscribe-buttons input {
930     font-size: 90%;
931     line-height: 15px;
932     min-height: 20px;
933   }
934
935   span.action-button:hover {
936     cursor: pointer;
937     text-decoration: underline;
938   }
939
940   .note-description {
941     overflow: hidden;
942     margin: 0 0 10px 10px;
943   }
944
945   .query-intro p {
946     padding: $lineheight $lineheight $lineheight/2;
947   }
948
949   .query-results {
950     display: none;
951     padding-bottom: $lineheight/2;
952
953     h3 {
954       padding: 0 $lineheight;
955     }
956
957     ul {
958       li {
959         &.query-result {
960           cursor: pointer;
961         }
962
963         &.selected {
964           background: $list-highlight;
965         }
966       }
967     }
968   }
969 }
970
971 /* Bootstrap buttons don't have any vertical margin, so
972    they touch when adjacent buttons wrap onto a new line
973    e.g. wide form buttons on a narrow sidebar */
974
975 .btn-wrapper {
976   > .btn {
977     margin-bottom: $spacer * 0.25;
978   }
979 }
980
981 /* Rules for export sidebar */
982
983 .export_form {
984   padding: $lineheight;
985
986   .export_area_inputs,
987   .export_button {
988     text-align: center;
989   }
990
991   .export_area_inputs {
992     margin-bottom: $lineheight/2;
993     input[type="text"] {
994       width: 100px;
995       text-align: center;
996     }
997   }
998
999   .export_boxy {
1000     background: $lightgrey;
1001     border: 1px solid $grey;
1002     border-radius: 3px;
1003
1004     #maxlat { margin-top: -1px; }
1005     #minlon {
1006       float: left;
1007       /* no-r2 */ margin-left: -1px;
1008     }
1009     #maxlon {
1010       float: right;
1011       /* no-r2 */ margin-right: -1px;
1012     }
1013     #minlat { margin-bottom: -1px; }
1014   }
1015
1016   .export_bound {
1017     margin: $lineheight/4;
1018   }
1019
1020   dl {
1021     padding-left: $lineheight/2;
1022     dd {
1023       margin-left: 0;
1024       margin-bottom: 10px;
1025     }
1026   }
1027 }
1028
1029 /* Rules for edit pages */
1030
1031 .site-edit {
1032   #content {
1033     position: absolute;
1034     top: $headerHeight;
1035     bottom: 0;
1036     width: 100%;
1037   }
1038
1039   #map {
1040     height: 100%;
1041     overflow: hidden;
1042   }
1043 }
1044
1045 /* Rules for non-map content pages */
1046
1047 .content-heading {
1048   background: $lightgrey;
1049 }
1050
1051 .content-inner {
1052   position: relative;
1053   max-width: 900px;
1054   margin: auto;
1055   padding: $lineheight;
1056 }
1057
1058 /* Overrides for pages that use new layout conventions */
1059
1060 .users-new,
1061 .users-create,
1062 .users-terms,
1063 .users-confirm {
1064   .content-heading .content-inner {
1065     height: 200px;
1066   }
1067 }
1068
1069 .header-illustration {
1070   background-position: 0 0;
1071   background-repeat: no-repeat;
1072   position: absolute;
1073   height: 200px;
1074   width: 100%;
1075   left: 0;
1076   bottom: 0;
1077
1078   &.new-user-main {
1079     background-image: image-url("sign-up-illustration.png");
1080   }
1081
1082   &.confirm-main {
1083     background-image: image-url("confirm-illustration.png");
1084   }
1085
1086   &.new-user-terms {
1087     background-image: image-url("terms-illustration.png");
1088   }
1089
1090   &.new-user-arm {
1091     height: 110px;
1092     width: 130px;
1093     left: 260px;
1094     top: 160px;
1095     background-image: image-url("sign-up-illustration-arm.png");
1096     z-index: 100;
1097   }
1098 }
1099
1100 [dir=rtl] .header-illustration {
1101   transform: scaleX(-1);
1102 }
1103
1104 #content.maximised {
1105   top: 0;
1106   left: 0;
1107   right: 0;
1108   bottom: 0;
1109   border: 0;
1110   z-index: 2000;
1111 }
1112
1113 /* Rules for small maps in content areas */
1114
1115 .content_map {
1116   height: 200px;
1117   border: 1px solid $grey;
1118   margin-bottom: $lineheight;
1119 }
1120
1121 @include media-breakpoint-up(md) {
1122   .content_map {
1123     height: 400px;
1124   }
1125 }
1126
1127 /* Rules for the user profile page */
1128
1129 #userinformation {
1130   min-height: 100px;
1131   .userinformation-inner {
1132     float: left;
1133   }
1134   .user-description {
1135     width: 100%;
1136     clear: both;
1137   }
1138 }
1139
1140 .admin-user-info small {
1141   margin-bottom: $lineheight/2;
1142   display: inline;
1143   margin-right: $lineheight;
1144 }
1145
1146 .contact-activity {
1147   margin-top: $lineheight;
1148   width: 100%;
1149 }
1150
1151 .activity-details p {
1152   margin-left: 70px;
1153   margin-bottom: 0;
1154 }
1155
1156 .users-show {
1157   // Silly exception; remove when user page is redesigned.
1158   .content-inner {
1159     max-width: none;
1160   }
1161   p#no_home_location {
1162     margin: $lineheight;
1163   }
1164   .user_thumbnail {
1165     margin-top: $lineheight/4;
1166     float: left;
1167   }
1168 }
1169
1170 /* Rules for the user map */
1171
1172 .content_map .leaflet-popup-content {
1173   margin: $lineheight/2;
1174   min-height: 50px;
1175 }
1176
1177 /* Rules for user popups on maps */
1178
1179 .user_popup {
1180   min-width: 200px;
1181   p {
1182     padding: 0 0 5px 0;
1183     margin-top: 0 0 0 60px;
1184     font-size: 12px;
1185   }
1186   img.user_thumbnail {
1187     float: left;
1188     margin: 0 $lineheight/2 0 0;
1189   }
1190 }
1191
1192 /* Rules for the user list */
1193
1194 #user_list {
1195   width: 100%;
1196
1197   tr {
1198     vertical-align: middle;
1199   }
1200
1201   p {
1202     margin-top: 0px;
1203     margin-bottom: 0px;
1204   }
1205 }
1206
1207 #user_list_actions {
1208   float: right;
1209   margin-top: $lineheight/2;
1210 }
1211
1212 /* Rules for the diary list page */
1213
1214 .diary_post {
1215   position: relative;
1216   padding-top: $lineheight;
1217   padding-bottom: $lineheight/2;
1218   border-top: 1px solid $grey;
1219
1220   &:first-of-type {
1221     margin-top: $lineheight/2;
1222   }
1223
1224   &.deleted {
1225     background-color: #fee;
1226   }
1227
1228   .post_heading {
1229     margin-bottom: $lineheight;
1230
1231     h2 {
1232       margin-top: 0;
1233       margin-bottom: $lineheight/2;
1234     }
1235   }
1236
1237   img.user_thumbnail {
1238     float: left;
1239   }
1240 }
1241
1242 /* Rules for the diary entry page */
1243
1244 .diary_entries {
1245   #map {
1246     height: 400px;
1247     border: 1px solid $grey;
1248     display: none;
1249     margin-bottom: $lineheight;
1250   }
1251   .comments {
1252     max-width: 740px;
1253   }
1254   .diary-comment {
1255     border-top: 1px dashed $grey;
1256     padding-top: $lineheight/2;
1257     padding-bottom: $lineheight/2;
1258     &:first-child {
1259       margin-top: $lineheight/2;
1260       padding-top: $lineheight;
1261       border-top: 1px solid $grey;
1262     }
1263     &.deleted {
1264       background-color: #fee;
1265     }
1266     p {
1267       margin-bottom: $lineheight/2;
1268     }
1269     .comment-heading {
1270       margin-bottom: 0;
1271       margin-top: 0;
1272     }
1273   }
1274 }
1275
1276 .diary_entries-show img.user_thumbnail {
1277   float: left;
1278 }
1279
1280 /* Rules for the log in page */
1281
1282 #login_auth_buttons {
1283   margin-bottom: 0;
1284
1285   li {
1286     float: left;
1287     padding: $lineheight/4 $lineheight/2;
1288   }
1289 }
1290
1291 /* Rules for the account confirmation page */
1292
1293 .users-terms {
1294   .legale {
1295     border: 1px solid $grey;
1296     padding: $lineheight;
1297     margin-bottom: $lineheight;
1298     overflow: auto;
1299     height: 20em;
1300
1301     li {
1302       list-style: inherit;
1303     }
1304
1305     ol ol {
1306       list-style-type: lower-alpha;
1307     }
1308   }
1309 }
1310
1311 /* Rules for the account settings page */
1312
1313 #accountForm .user_image {
1314   margin-bottom: 0;
1315 }
1316
1317 #accountForm #user_image {
1318   margin-left: 20px;
1319 }
1320
1321 #accountForm ul.accountImage-options {
1322   margin-left: 120px;
1323 }
1324
1325 .nohome .location {
1326   display: none;
1327 }
1328
1329 #homerow .message {
1330   display: none;
1331 }
1332
1333 .nohome .message {
1334   display: inline !important;
1335 }
1336
1337 /* Rules for the oauth settings page */
1338
1339 .oauth_clients .buttons .oauth-edit {
1340   border-radius: 2px 0 0 2px;
1341 }
1342
1343 .oauth_clients .buttons .oauth-delete {
1344   border-radius: 0 2px 2px 0;
1345 }
1346
1347 /* Rules for the oauth authorization page */
1348
1349 .oauth-authorize ul {
1350   list-style: none;
1351 }
1352
1353 /* Rules for messages pages */
1354
1355 .messages {
1356   input[type="submit"] {
1357     margin: auto;
1358   }
1359
1360   .inbox-row {
1361     background: $offwhite;
1362   }
1363
1364   .inbox-row-unread {
1365     background: #CBEEA7;
1366   }
1367
1368   .right {
1369     float: right;
1370   }
1371 }
1372
1373 .inbox-row .inbox-mark-read {
1374   display: none;
1375 }
1376
1377 .info-line {
1378   margin-bottom: $lineheight;
1379   padding: $lineheight/4 0px 4px 0px;
1380   border-bottom: 1px solid $grey;
1381
1382   form, form div {
1383     display: inline;
1384   }
1385 }
1386
1387 .info-line .user_thumbnail_tiny {
1388   vertical-align: middle;
1389 }
1390
1391 .inbox-sent {
1392   white-space: nowrap;
1393 }
1394
1395 .inbox-mark-unread,
1396 .inbox-mark-read,
1397 .inbox-delete {
1398   width: 1%;
1399 }
1400
1401 .inbox-row-unread .inbox-mark-unread {
1402   display: none;
1403 }
1404
1405 /* Rules for "flash" notice boxes shown at the top of the content area */
1406
1407 .flash {
1408   padding: $lineheight;
1409
1410   &.error {
1411     background-color: #ff7070;
1412   }
1413
1414   &.warning {
1415     background-color: #ffe0cc;
1416   }
1417
1418   &.notice {
1419     background-color: #CBEEA7;
1420   }
1421
1422   div.message {
1423     display: inline-block;
1424     margin-left: $lineheight / 2;
1425     vertical-align: middle;
1426
1427     p {
1428       margin-top: $lineheight * 0.5;
1429       margin-bottom: $lineheight * 0.5;
1430
1431       &:first-child {
1432         margin-top: 0px;
1433       }
1434
1435       &:last-child {
1436         margin-bottom: 0px;
1437       }
1438     }
1439   }
1440 }
1441
1442 /* Rules for highlighting fields with rails validation errors */
1443
1444 .formError {
1445   display: inline-block;
1446   padding: 5px 10px;
1447   margin-top: 5px;
1448   border-radius: 4px;
1449   font-size: 12px;
1450   color: #fff;
1451   background-color: #ff7070;
1452 }
1453
1454 /* Rules for rails validation error boxes */
1455
1456 #errorExplanation {
1457   width: 400px;
1458   border: 2px solid #ff7070;
1459   padding: 0 $lineheight/2;
1460   margin-bottom: $lineheight;
1461   background-color: #f0f0f0;
1462
1463   h2 {
1464     margin: 0 -10px 10px -10px;
1465     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1466     font-weight: bold;
1467     font-size: 12px;
1468     background-color: #c00;
1469     color: #fff;
1470     text-align: left;
1471   }
1472
1473   p {
1474     color: #333;
1475     margin-bottom: 0px;
1476     padding: $lineheight/4;
1477   }
1478 }
1479
1480 .search_form {
1481   background-color: $lightgrey;
1482
1483   .describe_location {
1484     top: 6px;
1485     right: 6px;
1486     font-size: 10px;
1487     color: $blue;
1488   }
1489 }
1490
1491 .directions_form {
1492   background-color: $lightgrey;
1493
1494   .loader_copy {
1495     display: none;
1496
1497     img {
1498       vertical-align: middle;
1499     }
1500   }
1501
1502   a.reverse_directions {
1503     cursor: pointer;
1504   }
1505 }
1506
1507 /* Rules for user images */
1508
1509 img.user_image {
1510   max-width: 100px;
1511   max-height: 100px;
1512   border: 1px solid $grey;
1513   margin-bottom: $lineheight;
1514   float: left;
1515   margin-right: $lineheight;
1516 }
1517
1518 img.user_thumbnail {
1519   max-width: 50px;
1520   max-height: 50px;
1521   border: 1px solid $grey;
1522   margin-right: $lineheight;
1523 }
1524
1525 img.user_thumbnail_tiny {
1526   width: auto;
1527   height: auto;
1528   max-width: 25px;
1529   max-height: 25px;
1530   border: 1px solid $grey;
1531 }
1532
1533 /* Rules for geo microformats */
1534
1535 abbr.geo {
1536   border-bottom: none;
1537 }
1538
1539 /* General styles for action lists / subnavs / pager navs */
1540
1541 ul.secondary-actions {
1542   font-style: normal;
1543   margin-bottom: 0;
1544   margin-left: 0;
1545   padding: 0;
1546   &.pager {
1547     display: inline-block;
1548     margin-right: 60px;
1549   }
1550   > li {
1551     display: block;
1552     float: left;
1553     list-style: none;
1554     border-left: 1px solid $grey;
1555     padding-left: $lineheight/2;
1556     margin-right: $lineheight/2;
1557     &:first-child {
1558       border-left: 0;
1559       padding-left: 0;
1560     }
1561     &:last-child {
1562       margin-right: 0px;
1563     }
1564   }
1565 }
1566
1567 div.secondary-actions {
1568   padding: 10px;
1569   text-align: center;
1570 }
1571
1572 /* Utility for managing inner content areas */
1573
1574 .inner22 { padding: $lineheight;}
1575
1576 .inner12 { padding: $lineheight/2 $lineheight;}
1577
1578 .inner11 { padding: $lineheight/2;}
1579
1580 .inner20 { padding: $lineheight 0;}
1581
1582 .inner02 { padding: 0 $lineheight;}
1583
1584 .buttons {
1585   min-width: 200px;
1586   input[type="submit"],
1587   input[type="button"],
1588   input[type="reset"],
1589   .button,
1590   .button_to {
1591     box-sizing: border-box;
1592     float: left;
1593     border-radius: 0;
1594     margin:0;
1595     min-width: 75px;
1596     max-width: 180px;
1597     border-right:1px solid white;
1598     text-overflow: ellipsis;
1599     white-space: nowrap;
1600     overflow: hidden;
1601   }
1602   input:first-child,
1603   .button:first-child,
1604   .button_to:first-child {
1605     border-radius:2px 0 0 2px;
1606   }
1607   input:last-child,
1608   .button:last-child,
1609   .button_to:last-child {
1610     border-radius:0 2px 2px 0;
1611     border-right-width: 0;
1612   }
1613   input:only-child,
1614   .button:only-child,
1615   .button_to:only-child,
1616   *[value="Hide"] + input:last-child,
1617   *[value="Hide"] + .button:last-child,
1618   *[value="Hide"] + .button_to:last-child {
1619     border-radius:2px;
1620     border-right-width: 0;
1621   }
1622     /* if a 3-button set has a hidden middle button */
1623   *[value="Hide"] + input:nth-child(3),
1624   *[value="Hide"] + .button:nth-child(3),
1625   *[value="Hide"] + .button_to:nth-child(3) {
1626     border-radius:0 2px 2px 0;
1627     border-right-width: 0;
1628   }
1629   /* if a 3-button set starts with a hidden button */
1630   *[value="Hide"] + input:nth-child(2):not(:last-child),
1631   *[value="Hide"] + .button:nth-child(2):not(:last-child),
1632   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
1633     border-radius:2px 0 0 2px;
1634     border-right-width: 1px;
1635   }
1636 }
1637
1638 /* Customise the background colour of striped tables */
1639
1640 .table-striped > tbody > tr:nth-child(2n+1) > td,
1641 .table-striped > tbody > tr:nth-child(2n+1) > th {
1642    background-color: $offwhite;
1643 }
1644
1645 /* Rules for OpenID logo */
1646
1647 .openid_logo {
1648   vertical-align: text-bottom;
1649   border: 0;
1650 }
1651
1652 /* Rules for rich text */
1653
1654 .richtext,
1655 .prose {
1656   code {
1657     font-size: 13px;
1658     background: $lightgrey;
1659     padding: 2px 3px;
1660   }
1661
1662   pre {
1663     font-size: 13px;
1664     background: $lightgrey;
1665     padding: 2px 3px;
1666     white-space: pre-wrap;
1667
1668     code {
1669       padding: 0;
1670     }
1671   }
1672
1673   img {
1674     padding: $lineheight;
1675     background-color: $offwhite;
1676     display: block;
1677     max-width: 100%;
1678     margin: auto;
1679   }
1680
1681   blockquote {
1682     border-left: $lineheight solid $offwhite;
1683     padding-left: $lineheight;
1684     margin: 0;
1685     color: $darkgrey;
1686   }
1687 }
1688
1689 .comments .richtext {
1690   margin-left: 70px;
1691 }
1692
1693 /* Rules for the user notes list */
1694
1695 .note_list {
1696   tr.creator {
1697     background-color: $offwhite;
1698   }
1699 }
1700
1701 /* Rules for the iD editor */
1702
1703 .id-embed {
1704   width: 100%;
1705   height: 100%;
1706 }
1707
1708 /* Rules for the "Welcome" page */
1709 .site-welcome, .site-fixthemap {
1710   .center {
1711     text-align: center;
1712     .sprite {
1713       float: none;
1714       margin: auto;
1715     }
1716   }
1717
1718   .sprite {
1719     background-image: image-url("welcome-sprite.png");
1720     background-size: 500px 250px;
1721     display: block;
1722     float: left;
1723   }
1724
1725   .icon-list {
1726     padding-bottom: 20px;
1727     div {
1728       margin-bottom: 10px;
1729       p {
1730         padding-top: 10px;
1731       }
1732     }
1733   }
1734   .sprite.small {
1735     width: 50px;
1736     height: 50px;
1737   }
1738
1739   .sprite.x {
1740     /* no-r2 */ background-position: -50px 0;
1741   }
1742
1743   .sprite.term {
1744     margin-right: 10px;
1745     vertical-align: middle;
1746   }
1747
1748   .sprite.node {
1749     /* no-r2 */ background-position: -100px 0;
1750   }
1751
1752   .sprite.way {
1753     /* no-r2 */ background-position: -150px 0;
1754   }
1755
1756   .sprite.tag {
1757     /* no-r2 */ background-position: -200px 0;
1758   }
1759
1760   .sprite.editor {
1761     /* no-r2 */ background-position: -250px 0;
1762   }
1763
1764   .sprite.question {
1765     /* no-r2 */ background-position: -300px 0;
1766   }
1767
1768   .sprite.rules {
1769     /* no-r2 */ background-position: -350px 0;
1770   }
1771
1772   .start-mapping {
1773     margin: auto;
1774     cursor: pointer;
1775     border: none;
1776     padding: 20px 40px;
1777     font-size: 30px;
1778     text-decoration: none;
1779   }
1780
1781   .icon.note {
1782     background-color: #333;
1783     border-radius: 4px;
1784   }
1785 }
1786
1787 .site-about #content {
1788   background-color: $lightgrey;
1789   background-position: 50% 50%;
1790   background-repeat: no-repeat;
1791   background-size: cover;
1792   background-attachment: fixed;
1793
1794
1795   .content-inner {
1796     position: relative;
1797     color: #333;
1798     min-width: 320px;
1799     max-width: 640px;
1800   }
1801
1802   .text {
1803     background: white;
1804     padding: 40px;
1805   }
1806
1807   .attr {
1808     position: relative;
1809     padding: 170px 40px 20px;
1810     background: #333;
1811     background: rgba(0, 0, 0, .8);
1812     margin-bottom: 0;
1813     margin-top: -20px;
1814
1815     h1 {
1816       display: block;
1817       color: white;
1818       font-weight: 300;
1819       font-size: 28px;
1820       span {
1821         color: $vibrant-green;
1822       }
1823     }
1824
1825     @include media-breakpoint-up(sm) {
1826       h1 {
1827         font-size: 34px;
1828       }
1829     }
1830
1831     .user-image {
1832       position: absolute;
1833       top: 0px;
1834       right: 240px;
1835       left: 0px;
1836       height: 150px;
1837       background-position: 0 50%;
1838       background-repeat: no-repeat;
1839       background-image: image-url('about/osm.png');
1840       background-size: cover;
1841       background-color: $vibrant-green;
1842     }
1843
1844     .byosm {
1845       position: absolute;
1846       top: 0px;
1847       right: 0px;
1848       z-index: 1;
1849       width: 240px;
1850       height: 150px;
1851       padding: 20px 20px 20px 40px;
1852       font: 500 20px/24px Helvetica, Arial, sans-serif;
1853       white-space: nowrap;
1854       color: #fff;
1855       background: $vibrant-green;
1856     }
1857
1858     .byosm span {
1859       display: inline-block;
1860       width: 20px;
1861       margin-left: -20px;
1862     }
1863   }
1864
1865   .icon {
1866     width: 30px;
1867     height: 30px;
1868     margin-right: 10px;
1869     vertical-align: middle;
1870     background: 40px 40px image-url('about/sprite.png') no-repeat;
1871
1872     &.local {
1873       /* no-r2 */
1874       background-position: 0px 0px;
1875     }
1876     &.community {
1877       /* no-r2 */
1878       background-position: 0px -40px;
1879     }
1880     &.open {
1881       /* no-r2 */
1882       background-position: 0px -80px;
1883     }
1884     &.partners {
1885       /* no-r2 */
1886       background-position: 0px -120px;
1887     }
1888     &.infringement {
1889       /* no-r2 */
1890       background-position: 0px -160px;
1891     }
1892     &.legal {
1893       /* no-r2 */
1894       background-position: -45px -160px;
1895     }
1896   }
1897 }
1898
1899 @import 'browse';
1900
1901 @media only screen and (max-width:960px) {
1902   .header-illustration.new-user-arm {
1903     display: none;
1904   }
1905 }