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