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