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