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