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