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