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