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