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