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