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