]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Remove the custom flash styling for sidebar flashes
[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     float: right;
807     padding: 1px 6px;
808     border: 1px solid $lightgrey;
809     border-radius: 3px;
810   }
811
812   .browse-field {
813     margin-bottom: 10px;
814
815     h4 {
816       padding: 5px 0 5px 10px;
817       font-size: 12px;
818       border: 1px solid $grey;
819       border-radius: 4px 4px 0 0;
820       background-color: $offwhite;
821     }
822
823     p {
824       padding: 7px 10px;
825       font-size: 12px;
826       background-color: #FFF;
827       border: 1px solid $grey;
828       border-top: 0;
829       border-radius: 0 0 4px 4px;
830     }
831   }
832
833   .browse-tag-list {
834     background-color: $offwhite;
835     border: 1px solid $grey;
836     border-radius: 3px;
837     table-layout: fixed;
838     border-collapse: separate;
839     border-spacing: 0;
840     width: 100%;
841     margin-bottom: $spacer;
842
843     th, td {
844       border-bottom: 1px solid $grey;
845     }
846
847     tr:last-child th, tr:last-child td {
848       border-bottom: 0;
849     }
850
851     .browse-tag-k,
852     .browse-tag-v {
853       width: 50%;
854       padding: 6px 10px;
855       word-wrap: break-word;
856       white-space: pre-wrap;
857     }
858
859     .browse-tag-k {
860       font-weight: 500;
861       background-color: $offwhite;
862     }
863
864     .browse-tag-v {
865       border-left: 1px solid $grey;
866       background-color: #fff;
867     }
868
869     .colour-preview-box {
870       float: right;
871       width: 14px;
872       height: 14px;
873       margin: 4px 0px;
874       border: 1px solid rgba(0, 0, 0, .1);
875       // add color via inline css on element: background-color: <tag value>;
876     }
877   }
878
879   .note-comments li, .changeset-comments li {
880     margin: $lineheight/2 0;
881
882     p {
883       margin: 10px 6px 0 6px;
884       line-height: 1.5;
885     }
886   }
887
888   .comments-header {
889     float: left;
890   }
891
892   .subscribe-buttons {
893     float: left;
894     margin: 0 10px;
895     min-width: 80px;
896   }
897
898   .subscribe-buttons input {
899     font-size: 90%;
900     line-height: 15px;
901     min-height: 20px;
902   }
903
904   span.action-button:hover {
905     cursor: pointer;
906     text-decoration: underline;
907   }
908
909   .note-description {
910     overflow: hidden;
911     margin: 0 0 10px 10px;
912   }
913
914   .query-results {
915     display: none;
916
917     ul {
918       li {
919         &.query-result {
920           cursor: pointer;
921         }
922
923         &.selected {
924           background: $list-highlight;
925         }
926       }
927     }
928   }
929 }
930
931 /* Bootstrap buttons don't have any vertical margin, so
932    they touch when adjacent buttons wrap onto a new line
933    e.g. wide form buttons on a narrow sidebar */
934
935 .btn-wrapper {
936   > .btn {
937     margin-bottom: $spacer * 0.25;
938   }
939 }
940
941 /* Rules for export sidebar */
942
943 .export_form {
944   .export_area_inputs,
945   .export_button {
946     text-align: center;
947   }
948
949   .export_area_inputs {
950     margin-bottom: $spacer;
951     input[type="text"] {
952       width: 100px;
953       text-align: center;
954     }
955   }
956
957   .export_boxy {
958     background: $lightgrey;
959     border: 1px solid $grey;
960     border-radius: 3px;
961
962     #maxlat { margin-top: -1px; }
963     #minlon {
964       float: left;
965       /* no-r2 */ margin-left: -1px;
966     }
967     #maxlon {
968       float: right;
969       /* no-r2 */ margin-right: -1px;
970     }
971     #minlat { margin-bottom: -1px; }
972   }
973
974   .export_bound {
975     margin: $lineheight/4;
976   }
977
978   dl {
979     padding-left: $lineheight/2;
980     dd {
981       margin-left: 0;
982       margin-bottom: 10px;
983     }
984   }
985 }
986
987 /* Rules for edit pages */
988
989 .site-edit {
990   #content {
991     position: absolute;
992     top: $headerHeight;
993     bottom: 0;
994     width: 100%;
995   }
996
997   #map {
998     height: 100%;
999     overflow: hidden;
1000   }
1001 }
1002
1003 /* Rules for non-map content pages */
1004
1005 .content-heading {
1006   background: $lightgrey;
1007 }
1008
1009 .content-inner {
1010   position: relative;
1011   max-width: 960px;
1012   margin: auto;
1013   padding: $lineheight;
1014 }
1015
1016 /* Overrides for pages that use new layout conventions */
1017
1018 .header-illustration {
1019   background-position: 0 0;
1020   background-repeat: no-repeat;
1021   position: relative;
1022   min-height: 200px;
1023   width: 100%;
1024   left: 0;
1025   bottom: 0;
1026
1027   &.new-user-main {
1028     background-image: image-url("sign-up-illustration.png");
1029   }
1030
1031   &.confirm-main {
1032     background-image: image-url("confirm-illustration.png");
1033   }
1034
1035   &.new-user-terms {
1036     background-image: image-url("terms-illustration.png");
1037   }
1038
1039   &.new-user-arm {
1040     height: 110px;
1041     width: 130px;
1042     left: 280px;
1043     top: 180px;
1044     background-image: image-url("sign-up-illustration-arm.png");
1045     position: absolute;
1046     z-index: 100;
1047     pointer-events: none;
1048   }
1049 }
1050
1051 [dir=rtl] .header-illustration {
1052   transform: scaleX(-1);
1053 }
1054
1055 #content.maximised {
1056   top: 0;
1057   left: 0;
1058   right: 0;
1059   bottom: 0;
1060   border: 0;
1061   z-index: 2000;
1062 }
1063
1064 /* Rules for small maps in content areas */
1065
1066 .content_map {
1067   height: 200px;
1068   border: 1px solid $grey;
1069   margin-bottom: $lineheight;
1070 }
1071
1072 @include media-breakpoint-up(md) {
1073   .content_map {
1074     height: 400px;
1075   }
1076 }
1077
1078 /* Rules for the user map */
1079
1080 .content_map .leaflet-popup-content {
1081   margin: $lineheight/2;
1082   min-height: 50px;
1083 }
1084
1085 /* Rules for user popups on maps */
1086
1087 .user_popup {
1088   min-width: 200px;
1089   p {
1090     padding: 0 0 5px 0;
1091     margin-top: 0 0 0 60px;
1092     font-size: 12px;
1093   }
1094 }
1095
1096 /* Rules for the user list */
1097
1098 #user_list {
1099   width: 100%;
1100 }
1101
1102 /* Rules for the diary list page */
1103
1104 .diary_post {
1105   position: relative;
1106   padding-top: $lineheight;
1107   padding-bottom: $lineheight/2;
1108   border-top: 1px solid $grey;
1109
1110   &:first-of-type {
1111     margin-top: $lineheight/2;
1112   }
1113
1114   &.deleted {
1115     background-color: #fee;
1116   }
1117
1118   .post_heading {
1119     margin-bottom: $lineheight;
1120
1121     h2 {
1122       margin-top: 0;
1123       margin-bottom: $lineheight/2;
1124     }
1125   }
1126
1127   img.user_thumbnail {
1128     float: left;
1129   }
1130 }
1131
1132 /* Rules for the diary entry page */
1133
1134 .diary_entries {
1135   #map {
1136     height: 400px;
1137     border: 1px solid $grey;
1138     display: none;
1139     margin-bottom: $lineheight;
1140   }
1141   .comments {
1142     max-width: 740px;
1143   }
1144   .diary-comment {
1145     border-top: 1px dashed $grey;
1146     padding-top: $lineheight/2;
1147     padding-bottom: $lineheight/2;
1148     &:first-child {
1149       margin-top: $lineheight/2;
1150       padding-top: $lineheight;
1151       border-top: 1px solid $grey;
1152     }
1153     &.deleted {
1154       background-color: #fee;
1155     }
1156     p {
1157       margin-bottom: $lineheight/2;
1158     }
1159     .comment-heading {
1160       margin-bottom: 0;
1161       margin-top: 0;
1162     }
1163   }
1164 }
1165
1166 .diary_entries-show img.user_thumbnail {
1167   float: left;
1168 }
1169
1170 /* Rules for the log in page */
1171
1172 #login_auth_buttons {
1173   margin-bottom: 0;
1174
1175   li {
1176     float: left;
1177     padding: $lineheight/4 $lineheight/2;
1178   }
1179 }
1180
1181 /* Rules for the account confirmation page */
1182
1183 .users-terms {
1184   .legale {
1185     border: 1px solid $grey;
1186     padding: $lineheight;
1187     margin-bottom: $lineheight;
1188     overflow: auto;
1189     height: 20em;
1190
1191     li {
1192       list-style: inherit;
1193     }
1194
1195     ol ol {
1196       list-style-type: lower-alpha;
1197     }
1198   }
1199 }
1200
1201 /* Rules for the account settings page */
1202
1203 #accountForm .user_image {
1204   margin-bottom: 0;
1205 }
1206
1207 #accountForm #user_image {
1208   margin-left: 20px;
1209 }
1210
1211 #accountForm ul.accountImage-options {
1212   margin-left: 120px;
1213 }
1214
1215 .nohome .location {
1216   display: none;
1217 }
1218
1219 #homerow .message {
1220   display: none;
1221 }
1222
1223 .nohome .message {
1224   display: inline !important;
1225 }
1226
1227 /* Rules for the oauth settings page */
1228
1229 .oauth_clients .buttons .oauth-edit {
1230   border-radius: 2px 0 0 2px;
1231 }
1232
1233 .oauth_clients .buttons .oauth-delete {
1234   border-radius: 0 2px 2px 0;
1235 }
1236
1237 /* Rules for the oauth authorization page */
1238
1239 .oauth-authorize ul {
1240   list-style: none;
1241 }
1242
1243 /* Rules for messages pages */
1244
1245 .messages {
1246   input[type="submit"] {
1247     margin: auto;
1248   }
1249
1250   .inbox-row {
1251     background: $offwhite;
1252   }
1253
1254   .inbox-row-unread {
1255     background: #CBEEA7;
1256   }
1257
1258   .right {
1259     float: right;
1260   }
1261 }
1262
1263 .inbox-row .inbox-mark-read {
1264   display: none;
1265 }
1266
1267 .info-line {
1268   margin-bottom: $lineheight;
1269   padding: $lineheight/4 0px 4px 0px;
1270   border-bottom: 1px solid $grey;
1271
1272   form, form div {
1273     display: inline;
1274   }
1275 }
1276
1277 .info-line .user_thumbnail_tiny {
1278   vertical-align: middle;
1279 }
1280
1281 .inbox-sent {
1282   white-space: nowrap;
1283 }
1284
1285 .inbox-mark-unread,
1286 .inbox-mark-read,
1287 .inbox-delete {
1288   width: 1%;
1289 }
1290
1291 .inbox-row-unread .inbox-mark-unread {
1292   display: none;
1293 }
1294
1295 /* Rules for "flash" notice boxes shown at the top of the content area */
1296
1297 .flash {
1298   padding: $lineheight;
1299
1300   &.error {
1301     background-color: #ff7070;
1302   }
1303
1304   &.warning {
1305     background-color: #ffe0cc;
1306   }
1307
1308   &.notice {
1309     background-color: #CBEEA7;
1310   }
1311 }
1312
1313 /* Rules for highlighting fields with rails validation errors */
1314
1315 .formError {
1316   display: inline-block;
1317   padding: 5px 10px;
1318   margin-top: 5px;
1319   border-radius: 4px;
1320   font-size: 12px;
1321   color: #fff;
1322   background-color: #ff7070;
1323 }
1324
1325 /* Rules for rails validation error boxes */
1326
1327 #errorExplanation {
1328   width: 400px;
1329   border: 2px solid #ff7070;
1330   padding: 0 $lineheight/2;
1331   margin-bottom: $lineheight;
1332   background-color: #f0f0f0;
1333
1334   h2 {
1335     margin: 0 -10px 10px -10px;
1336     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1337     font-weight: bold;
1338     font-size: 12px;
1339     background-color: #c00;
1340     color: #fff;
1341     text-align: left;
1342   }
1343
1344   p {
1345     color: #333;
1346     margin-bottom: 0px;
1347     padding: $lineheight/4;
1348   }
1349 }
1350
1351 .search_form {
1352   background-color: $lightgrey;
1353
1354   .describe_location {
1355     top: 6px;
1356     right: 6px;
1357     font-size: 10px;
1358     color: $blue;
1359   }
1360 }
1361
1362 .directions_form {
1363   background-color: $lightgrey;
1364
1365   .loader_copy {
1366     display: none;
1367
1368     img {
1369       vertical-align: middle;
1370     }
1371   }
1372
1373   a.reverse_directions {
1374     cursor: pointer;
1375   }
1376 }
1377
1378 /* Rules for user images */
1379
1380 img.user_image {
1381   max-width: 100px;
1382   max-height: 100px;
1383   border: 1px solid $grey;
1384 }
1385
1386 img.user_thumbnail {
1387   max-width: 50px;
1388   max-height: 50px;
1389   border: 1px solid $grey;
1390 }
1391
1392 img.user_thumbnail_tiny {
1393   width: auto;
1394   height: auto;
1395   max-width: 25px;
1396   max-height: 25px;
1397   border: 1px solid $grey;
1398 }
1399
1400 /* Rules for geo microformats */
1401
1402 abbr.geo {
1403   border-bottom: none;
1404 }
1405
1406 /* General styles for action lists / subnavs / pager navs */
1407
1408
1409 nav.secondary-actions {
1410   margin-left: -11px;
1411   overflow: hidden;
1412   > ul {
1413     display: flex;
1414     flex-direction: row;
1415     flex-wrap: wrap;
1416     margin-bottom: 0;
1417     margin-left: -1px;
1418     padding: 0;
1419     &.pager {
1420       display: inline-block;
1421       margin-right: 60px;
1422     }
1423     > li {
1424       flex-basis: auto;
1425       list-style: none;
1426       border-left: 1px solid $grey;
1427       padding-left: $lineheight/2;
1428       margin-right: $lineheight/2;
1429       margin-bottom: $lineheight/8;
1430     }
1431   }
1432 }
1433
1434 div.secondary-actions {
1435   padding: 10px;
1436   text-align: center;
1437 }
1438
1439 .buttons {
1440   min-width: 200px;
1441   input[type="submit"],
1442   input[type="button"],
1443   input[type="reset"],
1444   .button,
1445   .button_to {
1446     box-sizing: border-box;
1447     float: left;
1448     border-radius: 0;
1449     margin:0;
1450     min-width: 75px;
1451     max-width: 180px;
1452     border-right:1px solid white;
1453     text-overflow: ellipsis;
1454     white-space: nowrap;
1455     overflow: hidden;
1456   }
1457   input:first-child,
1458   .button:first-child,
1459   .button_to:first-child {
1460     border-radius:2px 0 0 2px;
1461   }
1462   input:last-child,
1463   .button:last-child,
1464   .button_to:last-child {
1465     border-radius:0 2px 2px 0;
1466     border-right-width: 0;
1467   }
1468   input:only-child,
1469   .button:only-child,
1470   .button_to:only-child,
1471   *[value="Hide"] + input:last-child,
1472   *[value="Hide"] + .button:last-child,
1473   *[value="Hide"] + .button_to:last-child {
1474     border-radius:2px;
1475     border-right-width: 0;
1476   }
1477     /* if a 3-button set has a hidden middle button */
1478   *[value="Hide"] + input:nth-child(3),
1479   *[value="Hide"] + .button:nth-child(3),
1480   *[value="Hide"] + .button_to:nth-child(3) {
1481     border-radius:0 2px 2px 0;
1482     border-right-width: 0;
1483   }
1484   /* if a 3-button set starts with a hidden button */
1485   *[value="Hide"] + input:nth-child(2):not(:last-child),
1486   *[value="Hide"] + .button:nth-child(2):not(:last-child),
1487   *[value="Hide"] + .button_to:nth-child(2):not(:last-child) {
1488     border-radius:2px 0 0 2px;
1489     border-right-width: 1px;
1490   }
1491 }
1492
1493 /* Create a single-line dl */
1494
1495 dl.dl-inline {
1496   dt, dd {
1497     display: inline-block;
1498   }
1499   dd {
1500     margin-right: 1em;
1501   }
1502 }
1503
1504 /* Customise the background colour of striped tables */
1505
1506 .table-striped > tbody > tr:nth-child(2n+1) > td,
1507 .table-striped > tbody > tr:nth-child(2n+1) > th {
1508    background-color: $offwhite;
1509 }
1510
1511 /* Rules for OpenID logo */
1512
1513 .openid_logo {
1514   vertical-align: text-bottom;
1515   border: 0;
1516 }
1517
1518 /* Rules for rich text */
1519
1520 .richtext,
1521 .prose {
1522   code {
1523     font-size: 13px;
1524     background: $lightgrey;
1525     padding: 2px 3px;
1526   }
1527
1528   pre {
1529     font-size: 13px;
1530     background: $lightgrey;
1531     padding: 2px 3px;
1532     white-space: pre-wrap;
1533
1534     code {
1535       padding: 0;
1536     }
1537   }
1538
1539   img {
1540     padding: $lineheight;
1541     background-color: $offwhite;
1542     display: block;
1543     max-width: 100%;
1544     margin: auto;
1545   }
1546
1547   blockquote {
1548     border-left: $lineheight solid $offwhite;
1549     padding-left: $lineheight;
1550     margin: 0;
1551     color: $darkgrey;
1552   }
1553 }
1554
1555 /* Rules for the user notes list */
1556
1557 .note_list {
1558   tr.creator {
1559     background-color: $offwhite;
1560   }
1561 }
1562
1563 /* Rules for the iD editor */
1564
1565 .id-embed {
1566   width: 100%;
1567   height: 100%;
1568 }
1569
1570 /* Rules for the "Welcome" page */
1571 .site-welcome, .site-fixthemap {
1572   .center {
1573     text-align: center;
1574     .sprite {
1575       float: none;
1576       margin: auto;
1577     }
1578   }
1579
1580   .sprite {
1581     background-image: image-url("welcome-sprite.png");
1582     background-size: 500px 250px;
1583     display: block;
1584     float: left;
1585   }
1586
1587   .icon-list {
1588     padding-bottom: 20px;
1589     div {
1590       margin-bottom: 10px;
1591       p {
1592         padding-top: 10px;
1593       }
1594     }
1595   }
1596   .sprite.small {
1597     width: 50px;
1598     height: 50px;
1599   }
1600
1601   .sprite.x {
1602     /* no-r2 */ background-position: -50px 0;
1603   }
1604
1605   .sprite.term {
1606     margin-right: 10px;
1607     vertical-align: middle;
1608   }
1609
1610   .sprite.node {
1611     /* no-r2 */ background-position: -100px 0;
1612   }
1613
1614   .sprite.way {
1615     /* no-r2 */ background-position: -150px 0;
1616   }
1617
1618   .sprite.tag {
1619     /* no-r2 */ background-position: -200px 0;
1620   }
1621
1622   .sprite.editor {
1623     /* no-r2 */ background-position: -250px 0;
1624   }
1625
1626   .sprite.question {
1627     /* no-r2 */ background-position: -300px 0;
1628   }
1629
1630   .sprite.rules {
1631     /* no-r2 */ background-position: -350px 0;
1632   }
1633
1634   .start-mapping {
1635     margin: auto;
1636     cursor: pointer;
1637     border: none;
1638     padding: 20px 40px;
1639     font-size: 30px;
1640     text-decoration: none;
1641   }
1642
1643   .icon.note {
1644     background-color: #333;
1645     border-radius: 4px;
1646   }
1647 }
1648
1649 .site-about #content {
1650   background-color: $lightgrey;
1651   background-position: 50% 50%;
1652   background-repeat: no-repeat;
1653   background-size: cover;
1654   background-attachment: fixed;
1655
1656   .content-inner {
1657     max-width: 760px;
1658   }
1659
1660   .attr {
1661     margin-top: -20px;
1662
1663     h1 {
1664       span {
1665         color: $vibrant-green;
1666       }
1667     }
1668
1669     .user-image {
1670       height: 150px;
1671       background-position: 0 50%;
1672       background-repeat: no-repeat;
1673       background-image: image-url('about/osm.png');
1674       background-size: cover;
1675       background-color: $vibrant-green;
1676     }
1677
1678     .byosm {
1679       background: $vibrant-green;
1680     }
1681
1682     .byosm span {
1683       display: inline-block;
1684       width: 1em;
1685       margin-left: -1em;
1686     }
1687   }
1688
1689   .icon {
1690     width: 30px;
1691     height: 30px;
1692     margin-right: 10px;
1693     vertical-align: middle;
1694     background: 40px 40px image-url('about/sprite.png') no-repeat;
1695
1696     &.local {
1697       /* no-r2 */
1698       background-position: 0px 0px;
1699     }
1700     &.community {
1701       /* no-r2 */
1702       background-position: 0px -40px;
1703     }
1704     &.open {
1705       /* no-r2 */
1706       background-position: 0px -80px;
1707     }
1708     &.partners {
1709       /* no-r2 */
1710       background-position: 0px -120px;
1711     }
1712     &.infringement {
1713       /* no-r2 */
1714       background-position: 0px -160px;
1715     }
1716     &.legal {
1717       /* no-r2 */
1718       background-position: -45px -160px;
1719     }
1720   }
1721 }
1722
1723 @import 'browse';
1724
1725 @media only screen and (max-width:960px) {
1726   .header-illustration.new-user-arm {
1727     display: none;
1728   }
1729 }