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