]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.css.scss
Improve layout and styling of forms
[rails.git] / app / assets / stylesheets / common.css.scss
1 /* Parameters */
2 $lineheight: 20px;
3 $typeheight: 14px;
4
5 $offwhite: #f4f4ff;
6 $blue: #7092FF;
7 $lightblue: #B8C5F0;
8 $grey: #AAA;
9 $keyline: #CCC;
10 $hovercolor: 20%;
11
12 /* Styles common to large and small screens */
13
14 /* Minimal CSS reset */
15
16 html, body, ul, ol, li, form, fieldset, legend, h1, h2, h3, h4, h5, h6, p, input {
17   margin: 0;
18   padding: 0;
19   border: 0;
20   font-size:100%;
21 }
22
23 fieldset,img { border: 0; }
24
25 legend { color: #000; }
26
27 sup { vertical-align: text-top; }
28
29 sub { vertical-align: text-bottom; }
30
31 table {
32   border-collapse: collapse;
33   border-spacing: 0;
34 }
35
36 li { list-style: none; }
37
38 input,
39 select,
40 textarea,
41 body { font: #{$typeheight}/#{$lineheight} "Helvetica Neue",Arial,sans-serif; }
42
43 abbr, acronym {
44   border-bottom: .1em dotted;
45   cursor: help;
46 }
47
48 /* Micro Clearfix | Details: http://nicolasgallagher.com/micro-clearfix-hack/ */
49
50 .clearfix:before,
51 .clearfix:after {
52     content: " ";
53     display: table;
54 }
55
56 .clearfix:after {
57     clear: both;
58 }
59
60 /* Default rules for the body of every page */
61
62 * {
63   -moz-box-sizing: border-box;
64   -webkit-box-sizing: border-box;
65   box-sizing: border-box;
66 }
67
68 body {
69   font-family: 'Helvetica Neue',Arial,sans-serif;
70   font-size: $typeheight;
71   line-height: 1.6666;
72   color: #222;
73   background-color: #fff;
74   margin: 0px;
75   padding: 0px;
76   text-align: left;
77 }
78
79 body.slim {
80   background-color: #f0f0f0;
81 }
82
83 h1, h2, h3 {
84   margin-top: $lineheight/2;
85   margin-bottom: $lineheight;
86   font-weight: bold;
87   line-height: 1.2;
88 }
89
90 h1, h2 {
91   font-size: 32px;
92 }
93
94 #content h2 {
95   font-size: 21px;
96 }
97
98 h3 {
99   font-size: 21px;
100   margin-top: $lineheight/2;
101   margin-bottom: $lineheight;
102 }
103
104 h4,h5,h6 {
105   font-size: $typeheight;
106   margin-top: $lineheight/2;
107   margin-bottom: $lineheight/2;
108   font-weight: bold;
109   line-height: 1.5;
110 }
111
112 p, ul {
113   margin-bottom: $lineheight;
114 }
115
116 p > img {
117   width: auto;
118   max-width: 100%;
119 }
120
121 small, aside {
122   font-size: 12px;
123 }
124
125 h1:first-child,
126 h2:first-child,
127 h3:first-child,
128 h4:first-child,
129 h5:first-child,
130 h6:first-child {
131   margin-top: 0;
132 }
133
134 .column-1 {
135   width: 50%;
136   margin: 0 0 $lineheight/2 0;
137 }
138
139 .small_icon {
140   vertical-align: middle;
141   margin-right: $lineheight/4;
142 }
143
144 /* Rules for links */
145
146 a {
147   color: #00f;
148   text-decoration: none;
149   &:hover {
150     text-decoration: underline;
151   }
152 }
153
154 /* Rules for horizontal lines */
155
156 hr {
157   border: none;
158   background-color: #ccc;
159   color: #ccc;
160   height: 1px;
161 }
162
163 /* General styles for tables */
164
165 table {
166   width: 100%;
167   margin-bottom: $lineheight;
168   th, td {
169     text-align: left;
170     padding: $lineheight/4;
171     line-height: $lineheight;
172   }
173   th {
174     font-weight: bold;
175     vertical-align: top;
176   }
177   td {
178     vertical-align: middle;
179   }
180 }
181
182 /* Rules for the whole left sidebar, including the logo */
183
184 #left {
185   position: absolute;
186   height: 100%;
187   width: 185px;
188   font-size: 11px;
189   line-height: 1.1;
190   z-index: 100;
191   border-right: 1px solid #ccc;
192 }
193
194 /* Rules for the OpenStreetMap logo in the top left corner */
195
196 #logo {
197   display: block;
198   width: 170px;
199   min-width: 170px;
200   padding: $lineheight $lineheight/4;
201   text-align: center;
202   margin: auto;
203 }
204
205 #logo h1 {
206   font-size: 18px;
207   line-height: 1;
208   text-align: center;
209   margin: 0;
210 }
211
212 #logo h2 {
213   font-size: $lineheight/2;
214   line-height: 15px;
215   margin: 0;
216 }
217
218 /* Rules for the site name */
219
220 #small-title {
221   display: none;
222 }
223
224 /* Rules for the introductory text displayed in the left sidebar to new users */
225
226 .sidebar-copy {
227   padding: $lineheight/4 $lineheight/2;
228   p {
229     margin: $lineheight/4 0;
230   }
231 }
232 .sidebar-copy.intro {
233   border-top: 1px solid #ccc;
234 }
235
236 /*
237  * Rules for alert boxes shown in the left sidebar when important
238  * information needs to be conveyed such as when the site is
239  * undergoing maintenance.
240  */
241
242 .sidebar-alert {
243   padding: $lineheight/4;
244   border-top: 1px solid #ccc;
245   margin-top: 4px;
246   margin-bottom: -5px;
247   background: #e00;
248   font-size: 12px;
249   font-weight: bold;
250   p {
251     margin: $lineheight/4;
252   }
253 }
254
255 /*
256  * Rules for notice boxes shown in the left sidebar when important, but
257  * non-critical information needs to be conveyed such as notices about
258  * donation drives.
259  */
260
261 .sidebar-notice {
262   padding: $lineheight/4;
263   border-top: 1px solid #ccc;
264   margin-top: 4px;
265   margin-bottom: -5px;
266   background: #ea0;
267   font-size: 12px;
268   p {
269     margin: $lineheight/4;
270   }
271 }
272
273 /* Rules for the menu displayed in the left sidebar */
274
275 .left_menu {
276   left: 0px;
277   margin: 0;
278   padding: $lineheight/4 $lineheight/2;
279   font-size: 12px;
280   line-height: 1.25;
281   list-style-type: none;
282   border-bottom: 1px solid #ccc;
283   border-top: 1px solid #ccc;
284   img {
285     margin: $lineheight/2 0px;
286   }
287
288   ul {
289     padding: 0;
290     margin: 0;
291   }
292
293   li {
294     list-style-type: none;
295     padding: 0;
296     margin: 0;
297   }
298
299   h4 {
300     padding: $lineheight/4 0 $lineheight/4 0;
301     font-size: 12px;
302     margin: 0;
303   }
304
305   li:last-child h4 {
306     padding-top: 0;
307   }
308 }
309
310 /* Rules for SOTM advert */
311
312 #sotm {
313   width: 165px;
314   margin: $lineheight/2;
315   padding: 0px;
316   border: 0px;
317   background: #fff;
318   img {
319     width: 165px;
320   }
321 }
322
323 /*
324  * Rules for "optional boxes" which appear in the left sidebar on
325  * certain pages. Current users are the seach box on the main page
326  * and the tag cloud on the traces pages.
327  */
328
329 .optionalbox {
330   left: 0px;
331   padding: $lineheight/4 $lineheight/2;
332   margin: $lineheight/4 0;
333   text-align: left;
334 }
335
336 /* Rules for the search box */
337
338 #search_field {
339   position: relative;
340
341   form {
342     width: 165px;
343   }
344
345   input[type="text"] {
346     width: 165px;
347     padding: 3px;
348     font-size: $typeheight;
349     line-height: 1.1;
350     height: 25px;
351     padding: 2px 0px 2px $lineheight/4;
352     box-shadow: inset #DDD 0px 1px 3px;
353   }
354
355   input[type="text"]:focus {
356     outline: none;
357     border: 1px solid #000;
358   }
359
360   input[type="submit"] {
361     border: 0;
362     margin: 0;
363     padding: 0;
364     width: 15px;
365     height: 15px;
366     min-width: 0;
367     text-indent: -1000px;
368     overflow: hidden;
369     background: image-url("sprite.png") 0 0 no-repeat;
370     position: absolute;
371     top: $lineheight/4;
372     right: $lineheight/4;
373     cursor: pointer;
374   }
375 }
376
377 .search_help {
378   margin: $lineheight/4 0 0 0;
379 }
380
381 /* Utility for de-emphasizing content */
382
383 .deemphasize {
384   color: #999;
385   a {
386     color: $blue;
387   }
388 }
389
390 /* Rules for donation request box */
391
392 .donate {
393   display: block;
394   width: 164px;
395   padding: $lineheight/4;
396   border: 1px solid #AED1A0;
397   background: #cbeea7;
398   font-size: $typeheight;
399   line-height: 1.4;
400   text-align: center;
401   border-radius: 2px;
402   color: #222;
403   margin: $lineheight/2 $lineheight/2 0px $lineheight/2;
404
405   &:hover {
406     background: #9ed485;
407     text-decoration: none;
408   }
409   span {
410     margin: 0;
411     padding-left: 18px;
412     background: image-url("sprite.png") 0 -29px no-repeat;
413   }
414 }
415
416 /* Rules for Creative Commons logo button */
417
418 #cclogo {
419   margin: $lineheight/2 0;
420   float: right;
421 }
422
423 /* Rules for tabbed navigation bar */
424
425 #top-bar {
426   position: relative;
427   margin-left: 185px;
428   height: 30px;
429   border-bottom: 1px solid #ccc;
430   background: white;
431   z-index: 100;
432 }
433
434 .site-edit #top-bar,
435 .site-index #top-bar,
436 .site-export #top-bar {
437   position: fixed;
438   left: 0;
439   right: 0;
440 }
441
442 #tabnav {
443   height: 30px;
444   margin-bottom:0;
445   overflow: hidden;
446   li {
447     display: inline;
448   }
449   a, a:link, a:visited {
450     float: left;
451     font-weight: bold;
452     padding: 3px $lineheight/2;
453     text-decoration: none;
454     color: #333;
455     float: left;
456     margin-right: 1px;
457     -webkit-transition: color 200ms ease-in;
458        -moz-transition: color 200ms ease-in;
459          -o-transition: color 200ms ease-in;
460             transition: color 200ms ease-in;
461   }
462 }
463
464 .site-index #tabnav a#viewanchor,
465 .site-edit #tabnav a#editanchor,
466 .changeset-list #tabnav a#historyanchor,
467 .site-export #tabnav a#exportanchor {
468   border-bottom: 1px solid #aaa;
469   background: #9ed485;
470   color: #000;
471 }
472
473 #tabnav a:link:hover, #tabnav a:visited:hover {
474   text-decoration: underline;
475 }
476
477 #tabnav a:link.disabled,
478 #tabnav a:visited.disabled,
479 #tabnav a:link:hover.disabled,
480 #tabnav a:visited:hover.disabled {
481   color: #ccc;
482   cursor: default;
483   &:hover {
484     text-decoration: none;
485   }
486 }
487
488 /* Utility for styling notification numbers */
489
490 .count-number {
491   padding: 2px $lineheight/4;
492   border-radius: 2px;
493   background: #d7d7ff;
494   margin: 0 2px;
495   font-size: 11px;
496   color: #333;
497 }
498
499 /* Rules for greeting bar in the top right corner */
500
501 #greeting {
502   float: right;
503   padding-top: 3px;
504   margin-right: $lineheight/4;
505 }
506
507 .greeting-bar-unread {
508   font-weight: bold;
509 }
510
511 /* Rules for the message shown in place of the map when javascript is disabled */
512
513 #noscript {
514   z-index: 20000000;
515   position: absolute;
516   top: 15px;
517   left: 15px;
518 }
519
520 /* Rules for Leaflet maps */
521
522 .leaflet-control-attribution {
523   a.disabled {
524     color: #99c9dc;
525     cursor: default;
526     text-decoration: none;
527   }
528
529   ul.secondary-actions {
530     float: left;
531     margin-right: $lineheight/4;
532
533     &:only-child {
534       margin-right: 0px;
535     }
536   }
537 }
538
539 .site-index .leaflet-top,
540 .site-export .leaflet-top {
541   top: $lineheight/2 !important;
542   .leaflet-control {
543     margin-top: 0px !important;
544   }
545 }
546
547 .site-index #map .olControlScaleLine,
548 .site-export #map .olControlScaleLine {
549   left: $lineheight/2 !important;
550 }
551
552 .leaflet-popup-scrolled {
553   padding-right: $lineheight;
554   border-bottom: 0px !important;
555   border-top: 0px !important;
556 }
557
558 .leaflet-popup-content-wrapper {
559   border-radius: 4px !important;
560   -webkit-border-radius: 4px !important;
561 }
562
563 /* Rules for edit menu */
564
565 .menuicon {
566   padding: 0 $lineheight/4;
567   font-weight: normal;
568   display: inline-block;
569   &:hover {
570     text-decoration: none !important;
571   }
572 }
573
574 .menu {
575   display: none;
576   z-index: 10000;
577   position: absolute;
578   background-color: #ffffff;
579   border: 1px solid $keyline;
580   border-top: 0px;
581   ul {
582     margin: 0px;
583   }
584   li {
585     padding: 2px $lineheight/4;
586     border-top: 1px solid #eee;
587     white-space: nowrap;
588   }
589 }
590
591 /* Rules for attribution text under the main map shown on printouts */
592
593 #attribution {
594   display: none;
595 }
596
597 .attribution_license,
598 .attribution_project {
599   text-align: left;
600 }
601
602 .attribution_notice {
603   text-align: center;
604 }
605
606 /* Rules for the popout map sidebar */
607
608 #sidebar {
609   display: none;
610   position: absolute;
611   overflow: auto;
612   top: 0px;
613   bottom: 0px;
614   left: 0px;
615   border-right: 1px solid $keyline;
616   width: 33.3333%;
617   .sidebar_heading {
618     position: relative;
619     padding: $lineheight/2 $lineheight;
620     z-index: 9999;
621     background: $offwhite;
622     border-bottom: 1px solid #ccc;
623   }
624   h4 {
625     margin: 0;
626   }
627   ul {
628     margin-bottom: 0;
629     &:last-child {
630         border-bottom: 1px solid #ccc;
631     }
632     li {
633       margin-bottom: $lineheight/4;
634       &:last-child {
635         margin-bottom: 0;
636       }
637     }
638   }
639 }
640
641 #sidebar_close {
642   position: absolute;
643   height: $lineheight;
644   top: 0px;
645   bottom: 0;
646   right: $lineheight;
647   margin: auto;
648 }
649
650 #sidebar_content {
651   position: relative;
652   margin-bottom: 20px;
653   width: 100%;
654   h4 {
655     padding: 0 $lineheight $lineheight/2 $lineheight;
656     margin-top: $lineheight/2;
657     margin-bottom: 0;
658     border-bottom: 1px solid #ddd;
659   }
660 }
661
662 /* Rules for the map key which appears in the popout sidebar */
663
664 #mapkey {
665   padding: $lineheight $lineheight 0 $lineheight;
666  .mapkey-table-key img {
667     display: block;
668     margin-left: auto;
669     margin-right: auto;
670   }
671   td {
672     padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
673   }
674 }
675
676 /* Rules for search results which appear in the popout sidebar */
677
678 .search_searching {
679   margin-top: $lineheight/4;
680   margin-bottom: $lineheight/4;
681 }
682
683 .search_results_entry {
684   margin-bottom: 0;
685
686   .search_details {
687     display: block;
688     text-align: right;
689   }
690 }
691
692 .search_results_entry .search_searching {
693   text-align: center;
694   margin: $lineheight auto;
695   width: $lineheight;
696   display: block;
697 }
698
699 ul.results-list li { border-bottom: 1px solid #ccc; }
700
701 .search_results_error {
702   color: #f00;
703 }
704
705 /* Rules for data browser information which appears in the popout sidebar */
706
707 #browse_content {
708   position: relative;
709   .browse_show_list.button {
710     position: absolute;
711     left: $lineheight;
712     right: $lineheight;
713     bottom: -40px;
714     margin-bottom: 0;
715   }
716   a.more-details {
717     position: absolute;
718     top: 0;
719     right: $lineheight;
720   }
721   ul li {
722     margin-bottom: 0;
723   }
724 }
725
726 .browse_details {
727   position: relative;
728 }
729
730 .browse_status {
731   display: none;
732 }
733
734 /* Rules for export information which appears in the popout sidebar */
735
736 .export_bounds {
737   text-align: center;
738 }
739
740 .export_area_inputs {
741   margin-bottom: $lineheight/2;
742   input[type="text"] {
743     width: 60px;
744     margin-bottom: 5px;
745   }
746 }
747
748 .export_bound {
749   margin: $lineheight/4;
750 }
751
752 .export_details input[type="text"]#export_html_text {
753   width: 100%;
754 }
755
756 #sidebar #marker_inputs li:last-child {
757   margin-bottom: $lineheight/2;
758 }
759
760 #export_osm,
761 #export_mapnik,
762 #export_osmarender {
763   display: none;
764 }
765
766 /* Rules for the main content area */
767
768 #content {
769   padding: $lineheight;
770   position: relative;
771 }
772
773 .site-edit #content,
774 .site-index #content,
775 .site-export #content {
776   position: fixed;
777   padding: 0;
778   top: 30px; bottom: 0;
779   left: 184px; right: 0;
780   border-left: 1px solid #ccc;
781 }
782
783 .wrapper {
784   margin-left: 184px;
785   border-left: 1px solid #ccc;
786   text-align: left;
787 }
788
789 .site-edit #content {
790   top: 30px;
791 }
792
793 #content.maximised {
794   top: 0;
795   left: 0;
796   right: 0;
797   bottom: 0;
798   border: 0;
799   z-index: 1000;
800 }
801
802 #slim_container {
803   width: 100%;
804 }
805
806 #slim_container_content {
807   max-width: 50em;
808   background-color: #FFFFFF;
809   margin: $lineheight/2 auto;
810   padding: 3px;
811   border-radius: 25px;
812   -moz-border-radius: 25px;
813   border: 1px solid #e6e6e6;
814 }
815
816 #slim_content {
817   margin: $lineheight/2;
818   margin-top: 95px;
819   max-width: 50em;
820
821   .content-heading {
822     margin-bottom: 15px;
823   }
824 }
825
826 #slim_header {
827   margin: 30px $lineheight/2;
828   position: absolute;
829   top: 0px;
830   margin-right: $lineheight/4;
831   img {
832     vertical-align: middle;
833     margin-bottom: $lineheight/4;
834     margin-right: $lineheight/4;
835   }
836 }
837
838 .content-heading {
839   position: relative;
840   padding: $lineheight;
841   background: $offwhite;
842   h1, h2 {
843     margin-bottom: $lineheight/2;
844     line-height: 100%;
845     &:last-child {
846       margin-bottom: 0;
847     }
848   }
849   p {
850     margin-top: $lineheight/2;
851     margin-bottom: 0px;
852   }
853 }
854
855 /* Rules for small maps in content areas */
856
857 .content_map {
858   position: relative;
859   width: 45%;
860   height: 400px;
861   border: 1px solid #ccc;
862   margin-bottom: $lineheight;
863   float: right;
864 }
865
866 .content_map #small_map {
867   height: 100%;
868   width: 100%;
869   margin-bottom: $lineheight;
870 }
871
872 /* Rules for the home page */
873
874 .site-export #map,
875 .site-index #map {
876   position: absolute;
877   top: 0px;
878   bottom: 0px;
879   left: 0px;
880   right: 0px;
881 }
882
883 /* Rules for the edit page */
884
885 .site-edit #map {
886   position: absolute;
887   top: 0px;
888   bottom: 0px;
889   left: 0px;
890   right: 0px;
891   overflow: hidden;
892 }
893
894 /* Rules for the changeset list shown by the history tab etc */
895
896 #changeset_list {
897   width: 100%;
898   ul {
899     padding: $lineheight/2 0;
900     margin-bottom: 0px;
901     border-top: 1px solid #ccc;
902     &:last-child {
903       border-bottom: 1px solid #ccc;
904     }
905   }
906   .selected {
907     background: #FFFFC0;
908   }
909   .date,
910   .user {
911     border-left: 1px solid #ccc;
912     padding-left: $lineheight/4;
913     margin-right: $lineheight/4;
914   }
915 }
916
917 #changeset_list_map_wrapper {
918   position: absolute;
919   width: 50%;
920   height: 490px;
921   top: 0;
922   right: 0;
923 }
924
925 #changeset_list_map_wrapper.scrolled {
926   position: fixed;
927 }
928
929 #changeset_list_map {
930   position: absolute;
931   bottom: $lineheight;
932   top: $lineheight;
933   right: $lineheight;
934   left: $lineheight;
935   border: 1px solid #ccc;
936 }
937
938 #changeset_list_map_wrapper.scrolled #changeset_list_map {
939   margin-left: 93px;
940 }
941
942 /* Rules for the data browser */
943
944 .browse-section {
945   border-top: 1px solid #ccc;
946   margin-top: $lineheight/2;
947   padding-top: $lineheight/2;
948   &:first-child {
949     margin-top: 0;
950   }
951   .warning {
952     background-color: #ffe0cc;
953     margin: 0px;
954     padding: 4px 6px;
955     max-width: 100%;
956   }
957   h4, p {
958     margin-bottom: $lineheight/4;
959   }
960   p, ul, .bbox, .geo {
961     display: inline-block;
962     vertical-align: top;
963     max-width: 65%;
964   }
965   ul p {
966     margin-left: 0;
967     margin-bottom: 0;
968   }
969   h4 {
970     width: 33.3333%;
971     display: inline-block;
972     vertical-align: top;
973   }
974 }
975
976 .bbox {
977   div {
978     width: 33.3333%;
979     text-align: center;
980     padding: $lineheight/4 0;
981     overflow: hidden;
982     text-overflow: ellipsis;
983     float: left;
984   }
985   .max_lat,
986   .min_lat {
987     margin-left: auto;
988     margin-right: auto;
989     width: 100%;
990   }
991 }
992
993 #browse_map .geolink {
994   display: none;
995 }
996
997 #browse_map .secondary-actions {
998   margin-bottom: $lineheight/2;
999 }
1000
1001 /* Rules for the trace list shown by the traces tab etc */
1002
1003 #trace_list {
1004   font-size: $lineheight/2;
1005   border-width: 0px;
1006   text-align: right;
1007
1008   .trace_summary {
1009     font-size: 12px;
1010     color: gray;
1011   }
1012
1013   .trace_pending {
1014     color: red;
1015   }
1016
1017   .trace_public {
1018     color: green;
1019   }
1020
1021   .trace_identifiable {
1022     color: green;
1023   }
1024
1025   .trace_trackable {
1026     color: red;
1027   }
1028
1029   .trace_private {
1030     color: red;
1031   }
1032 }
1033
1034 /* Rules for the user profile page */
1035
1036 #userinformation {
1037   min-height: 100px;
1038   .userinformation-inner {
1039     float: left;
1040   }
1041   h2 {
1042     margin-top: 0;
1043   }
1044   .user-description {
1045     width: 100%;
1046     clear: both;
1047   }
1048   .deemphasize {
1049     margin: 0;
1050   }
1051 }
1052
1053 .admin-user-info small {
1054   margin-bottom: $lineheight/2;
1055   display: inline;
1056   margin-right: $lineheight;
1057 }
1058
1059 .activity-block {
1060   clear: left;
1061   border-bottom: 1px solid #ccc;
1062   padding-bottom: $lineheight;
1063   float: left;
1064   h3 {
1065     margin-bottom: $lineheight/2;
1066   }
1067 }
1068
1069 .contact-activity {
1070   margin-top: $lineheight;
1071   width: 100%;
1072 }
1073
1074 .activity-details p {
1075   margin-left: 72px;
1076   margin-bottom: 0;
1077 }
1078
1079 #friends-container .contact-activity ul {
1080   margin-left: 72px;
1081   }
1082
1083 .user-view {
1084   p#no_home_location {
1085     margin: $lineheight;
1086   }
1087   .user_thumbnail {
1088     margin-top: $lineheight/4;
1089     float: left;
1090   }
1091 }
1092
1093 /* Rules for the user map */
1094
1095 .content_map .leaflet-popup-content {
1096   margin: $lineheight/2;
1097   min-height: 50px;
1098 }
1099
1100 /* Rules for user popups on maps */
1101
1102 .user_popup {
1103   min-width: 200px;
1104
1105   p {
1106     padding-top: 0;
1107     padding-bottom: 5px;
1108     margin-top: 0;
1109     margin-bottom: 0;
1110     margin-left: 60px;
1111     font-size: 12px;
1112   }
1113
1114   img.user_thumbnail {
1115     float: left;
1116     margin: 0 $lineheight/2 0 0;
1117   }
1118 }
1119
1120 /* Rules for the user list */
1121
1122 #user_list {
1123   font-size: $lineheight/2;
1124   width: 100%;
1125
1126   tr {
1127     vertical-align: middle;
1128   }
1129
1130   p {
1131     margin-top: 0px;
1132     margin-bottom: 0px;
1133   }
1134 }
1135
1136 #user_list_actions {
1137   float: right;
1138   margin-top: $lineheight/2;
1139 }
1140
1141 /* Rules for the diary list page */
1142
1143 .diary_entry-list img.user_thumbnail {
1144   float: left;
1145 }
1146
1147 .diary_post {
1148   max-width: 740px;
1149   position: relative;
1150   margin-top: $lineheight/2;
1151   padding-top: $lineheight;
1152   border-top: 1px solid #ccc;
1153
1154   &:first-child {
1155     margin-top: 0;
1156     border-top: 0;
1157     padding-top: 0;
1158   }
1159   h1, h2 {
1160     font-size: 21px;
1161     line-height: 1;
1162   }
1163   small.deemphasize {
1164     float: left;
1165     display: block;
1166   }
1167   ul.secondary-actions { display: inline-block;}
1168 }
1169
1170 .content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div
1171   display: inline;
1172 }
1173
1174 #content  .post_heading {
1175   margin-bottom: $lineheight;
1176   h2 {
1177     margin-top: 0;
1178     margin-bottom: $lineheight/2;
1179     font-size: 24px;
1180   }
1181 }
1182
1183 /* Rules for the diary entry page */
1184
1185 .diary_entry {
1186   #map {
1187     position: relative;
1188     width: 90%;
1189     height: 400px;
1190     border: 1px solid #ccc;
1191     display: none;
1192     margin-bottom: $lineheight;
1193   }
1194   #newcomment {
1195     border-top: 1px solid #ccc;
1196     padding-top: $lineheight;
1197     margin-top: $lineheight/2;
1198   }
1199   .comments {
1200     max-width: 740px;
1201   }
1202   .diary-comment {
1203     margin-top: $lineheight/2;
1204     border-top: 1px dashed #ccc;
1205     padding-top: $lineheight/2;
1206     &:first-child {
1207       margin-top: $lineheight;
1208       padding-top: $lineheight;
1209       border-top: 1px solid #ccc;
1210     }
1211     p {
1212       margin-bottom: $lineheight/2;
1213     }
1214     .comment-heading {
1215       margin-bottom: 0;
1216       margin-top: 0;
1217     }
1218   }
1219 }
1220
1221 .diary_entry-view img.user_thumbnail {
1222   float: left;
1223 }
1224
1225 /* Rules for the login page */
1226
1227 #login_openid_buttons {
1228   margin-bottom: 0;
1229 }
1230
1231 #login_openid_buttons li {
1232   float: left;
1233   padding: $lineheight/4 $lineheight/2;
1234 }
1235
1236 /* Rules for the account confirmation page */
1237
1238 #terms {
1239   .legale {
1240     border: 1px solid #ccc;
1241     padding: $lineheight;
1242     margin-bottom: $lineheight;
1243     overflow: auto;
1244     height: 10em;
1245
1246     &:p#last {
1247       margin-bottom: 0px;
1248     }
1249
1250     &:ol {
1251       margin-bottom: 0px;
1252     }
1253
1254     &:img {
1255       display: block;
1256       margin: $lineheight auto inherit auto;
1257     }
1258   }
1259
1260   form.sign {
1261     input[type=submit] {
1262       float: left;
1263     }
1264     #decline {
1265       background: $grey;
1266       &:hover {
1267         background: darken($grey, $hovercolor);
1268       }
1269     }
1270   }
1271   fieldset {
1272     margin-bottom: $lineheight;
1273   }
1274   #contributorGuidance {
1275     background-color: $offwhite;
1276     border-radius: 4px;
1277     -moz-border-radius: 4px;
1278   }
1279   .signing-buttons {
1280     height: 50px;
1281   }
1282 }
1283
1284 /* Rules for the account settings page */
1285
1286 #accountForm .user_map {
1287   position: relative;
1288   width: 500px;
1289   height: 400px;
1290   border: 1px solid #ccc;
1291 }
1292
1293 #accountForm .user_image {
1294   margin-bottom: 0;
1295 }
1296
1297 #accountForm #user_image {
1298   margin-left: 20px;
1299 }
1300
1301 #accountForm ul.accountImage-options {
1302   margin-left: 120px;
1303 }
1304
1305 .nohome .location {
1306   display: none;
1307 }
1308
1309 #homerow .message {
1310   display: none;
1311 }
1312
1313 .nohome .message {
1314   display: inline !important;
1315 }
1316
1317 .content_map.settings_map {
1318   width: 50%;
1319   float: none;
1320 }
1321
1322 /* Rules for the oauth settings page */
1323
1324 .oauth_clients .buttons .oauth-edit {
1325   border-radius: 2px 0 0 2px;
1326 }
1327
1328 .oauth_clients .buttons .oauth-delete {
1329   border-radius: 0 2px 2px 0;
1330 }
1331
1332 /* Rules for messages pages */
1333
1334 .messages {
1335   width: 100%;
1336   border: 1px solid #ddd;
1337
1338   input[type="submit"] {
1339     margin: auto;
1340   }
1341   tbody tr {
1342     border-top: 1px solid #ccc;
1343   }
1344
1345   .inbox-row {
1346     background: #f8f8ff;
1347   }
1348
1349   .inbox-row-unread {
1350     background:#CBEEA7;
1351   }
1352
1353   .right {
1354     float: right;
1355   }
1356
1357   tr td,
1358   tr th {
1359     padding: $lineheight/4;
1360   }
1361   tr td {
1362     height: 30px;
1363     border-right: 1px solid $keyline;
1364   }
1365 }
1366
1367 .inbox-row .inbox-mark-read {
1368   display: none;
1369 }
1370
1371 .info-line {
1372   margin-bottom: $lineheight;
1373   padding: $lineheight/4 0px 4px 0px;
1374   border-bottom: 1px solid #ccc;
1375
1376   form, form div {
1377     display: inline;
1378   }
1379 }
1380
1381 .info-line .user_thumbnail_tiny {
1382   vertical-align: middle;
1383 }
1384
1385 .inbox-mark-unread,
1386 .inbox-mark-read,
1387 .inbox-delete {
1388   width: 1%;
1389 }
1390
1391 .inbox-row-unread .inbox-mark-unread {
1392   display: none;
1393 }
1394
1395 .message-read .message-buttons {
1396   margin-top: $lineheight;
1397   padding-top: $lineheight;
1398   border-top: 1px solid $keyline;
1399 }
1400
1401 .message-read .buttons .mark-unread-button {
1402   border-radius: 0;
1403 }
1404
1405 /* Rules for "flash" notice boxes shown at the top of the content area */
1406
1407 .flash {
1408     padding: $lineheight;
1409   &#error {
1410     background-color: #ff7070;
1411   }
1412   &#warning {
1413     background-color: #ffe0cc;
1414   }
1415   &#notice {
1416     background-color: #CBEEA7;
1417   }
1418 }
1419
1420 /* Rules for highlighting fields with rails validation errors */
1421
1422 .field_with_errors {
1423   padding: 2px;
1424   background-color: #ff7070;
1425   display: table;
1426 }
1427
1428 /* Rules for rails validation error boxes */
1429
1430 #errorExplanation {
1431   width: 400px;
1432   border: 2px solid #ff7070;
1433   padding: $lineheight/2;
1434   margin-bottom: $lineheight;
1435   background-color: #f0f0f0;
1436   h2 {
1437     margin: -10px;
1438     padding: $lineheight/4 $lineheight/4 $lineheight/4 15px;
1439     font-weight: bold;
1440     font-size: 12px;
1441     background-color: #c00;
1442     color: #fff;
1443     text-align: left;
1444   }
1445
1446   p {
1447     color: #333;
1448     margin-bottom: 0px;
1449     padding: $lineheight/4;
1450   }
1451
1452   ul li {
1453     font-size: 12px;
1454     list-style: disc;
1455   }
1456
1457 }
1458
1459 /* Rules for forms */
1460
1461 .standard-form {
1462   fieldset {
1463     margin-bottom: $lineheight;
1464   }
1465   label.standard-label {
1466     display: block;
1467     margin-bottom: $lineheight/4;
1468     font-size: $typeheight;
1469     font-weight: bold;
1470     line-height: 1.5;
1471   }
1472   label.standard-label.secondary {
1473     display: inline-block;
1474     font-weight: normal;
1475   }
1476   .form-help {
1477     font-weight: normal;
1478   }
1479   .form-column {
1480     float: left;
1481     margin-right: 20px;
1482   }
1483   .form-divider {
1484     margin-top: $lineheight;
1485     padding-top: $lineheight;
1486     border-top: 1px solid $keyline;
1487   }
1488   .form-row {
1489     margin-bottom: $lineheight/2;
1490   }
1491   .form-list {
1492     margin-bottom: 0;
1493   }
1494   .form-list li {
1495     margin-bottom: 5px;
1496    }
1497   input[type="checkbox"],
1498   input[type="radio"] {
1499     float: left;
1500     margin-top: 5px;
1501     margin-right: 5px;
1502   }
1503 }
1504
1505 #remember_me_openid {
1506   display: block;
1507 }
1508
1509 input[type="text"],
1510 input[type="email"],
1511 input[type="url"],
1512 input[type="password"],
1513 textarea {
1514   border: 1px solid #ccc;
1515   padding: 2px 5px;
1516   margin: 0;
1517   width: 200px;
1518 }
1519
1520 textarea {
1521   padding: 5px;
1522   width: 100%;
1523   height: 100% !important;
1524 }
1525
1526 /* Rules for user images */
1527
1528 img.user_image {
1529   max-width: 100px;
1530   max-height: 100px;
1531   border: 1px solid #ccc;
1532   margin-bottom: $lineheight;
1533   float: left;
1534   margin-right: $lineheight;
1535 }
1536
1537 img.user_thumbnail {
1538   max-width: 50px;
1539   max-height: 50px;
1540   border: 1px solid #ccc;
1541   margin-right: $lineheight;
1542 }
1543
1544 img.user_thumbnail_tiny {
1545   max-width: 25px;
1546   max-height: 25px;
1547   border: 1px solid #ccc;
1548 }
1549
1550 /* Rule for "nowrap" class that can be applied to anything to stop wrapping */
1551
1552 .nowrap {
1553   white-space: nowrap;
1554 }
1555
1556 /* Rules for geo microformats */
1557
1558 abbr.geo {
1559   border-bottom: none;
1560 }
1561
1562 /* Rules for RSS buttons */
1563
1564 .rsssmall {
1565   position: relative;
1566   top: 5px;
1567 }
1568
1569 /* General styles for action lists / subnavs / pager navs */
1570
1571 ul.secondary-actions {
1572   font-style: normal;
1573   margin-bottom: 0;
1574   margin-left: 0;
1575   &.pager {
1576     display: inline-block;
1577     margin-right: 60px;
1578   }
1579   li {
1580     display: block;
1581     float: left;
1582     list-style: none;
1583     border-left: 1px solid #ccc;
1584     padding-left: $lineheight/4;
1585     margin-right: $lineheight/4;
1586     &:first-child {
1587       border-left: 0;
1588       padding-left: 0;
1589     }
1590     &:last-child {
1591       margin-right: 0px;
1592     }
1593   }
1594 }
1595
1596 /* Utility for managing inner content areas */
1597
1598 .inner22 { padding: $lineheight;}
1599
1600 .inner12 { padding: $lineheight/2 $lineheight;}
1601
1602 .inner02 { padding: 0 $lineheight;}
1603
1604 /* Utility for general button styles */
1605
1606 input[type="button"],
1607 input[type="submit"],
1608 input[type="reset"],
1609 a.button {
1610   cursor: pointer;
1611   border: 0;
1612   display: inline-block;
1613   line-height: 20px;
1614   padding: $lineheight/4 $lineheight/2;
1615   min-width: 120px;
1616   margin: 0 0 $lineheight/2 0;
1617   color: white;
1618   background: $blue;
1619   text-align: center;
1620   border-radius: 2px;
1621   -moz-border-radius: 2px;
1622   &:hover {
1623     background: darken($blue, $hovercolor);
1624     text-decoration: none;
1625   }
1626   &.deemphasize {
1627     background: $lightblue;
1628     &:hover {
1629       background: darken($lightblue, $hovercolor);
1630     }
1631   }
1632   &:last-child {
1633     margin-bottom: 0;
1634   }
1635 }
1636
1637 .buttons {
1638   min-width: 200px;
1639   input[type="submit"],
1640   input[type="button"],
1641   input[type="reset"],
1642   .button {
1643     box-sizing: border-box;
1644     float: left;
1645     margin-bottom:0;
1646     min-width: 100px;
1647     max-width: 150px;
1648   }
1649   input:first-child,
1650   .button:first-child {
1651     border-radius:2px 0 0 2px;
1652     border-right:1px solid white;
1653     margin-left: 0px;
1654   }
1655   input:last-child,
1656   .button:last-child {
1657     border-radius:0 2px 2px 0;
1658     margin-right: 0px;
1659   }
1660   input:only-child,
1661   .button:only-child {
1662     border-radius:2px;
1663     margin-right: 0px;
1664   }
1665
1666 }
1667
1668 /* Rules for doing distinct colour of alternate table rows */
1669
1670 .table0,
1671 .item0 {
1672   background: $offwhite;
1673 }
1674
1675 .table1,
1676 .item1 {
1677   background: #fff;
1678 }
1679
1680 /* Rules for OpenID logo */
1681
1682 .openid_logo {
1683   vertical-align: text-bottom;
1684   border: 0;
1685 }
1686
1687 /* Rules for rich text */
1688
1689 .richtext,
1690 .prose {
1691   h1, h2 {
1692     padding-bottom: $lineheight/2;
1693     border-bottom: 1px dashed #cccccc;
1694     margin-bottom: $lineheight/2;
1695   }
1696
1697   h1 {
1698     font-size: 24px;
1699   }
1700
1701   h2 {
1702     font-size: 18px;
1703   }
1704
1705   h3 {
1706     font-size: $typeheight;
1707   }
1708
1709   code {
1710     font-size: 13px;
1711     background: #e8e8e8;
1712     padding: 2px 3px;
1713   }
1714
1715   pre {
1716     font-size: 13px;
1717     background: #e8e8e8;
1718     padding: 2px 3px;
1719
1720     code {
1721       padding: 0;
1722     }
1723   }
1724
1725   img {
1726     padding: $lineheight;
1727     background-color: $offwhite;
1728     display: block;
1729     max-width: 100%;
1730     margin: auto;
1731   }
1732
1733   blockquote {
1734     border-left: $lineheight solid $offwhite;
1735     padding-left: $lineheight;
1736     margin: 0;
1737     color: #7E7E7E;
1738   }
1739
1740   ul, ol {
1741     font-style: italic;
1742     padding-left: $lineheight;
1743     margin-bottom: $lineheight;
1744     margin-left: $lineheight;
1745   }
1746
1747   ul li {
1748     list-style: disc;
1749   }
1750
1751   ol li {
1752     list-style: decimal;
1753   }
1754 }
1755
1756 .diary_post .richtext {
1757     margin-top: $lineheight;
1758   }
1759
1760 .comments .richtext {
1761   margin-left: 70px;
1762   margin-top: 0;
1763 }
1764
1765 /* Rules for rich text editors */
1766
1767 .richtext_container {
1768   margin-bottom: $lineheight;
1769
1770   .richtext_content {
1771     width: 50%;
1772     display: inline-block;
1773     vertical-align: top;
1774
1775     .richtext_preview {
1776       display: inline-block;
1777       padding: $lineheight;
1778       background-color: $offwhite;
1779       overflow-x: auto;
1780
1781       &.loading {
1782         background-image: image-url("loading.gif");
1783         background-repeat: no-repeat;
1784         background-position: center;
1785       }
1786
1787       > :first-child {
1788         margin-top: 0px;
1789       }
1790     }
1791   }
1792
1793   .richtext_help {
1794     display: inline-block;
1795     vertical-align: top;
1796     margin-left: 15px;
1797     background-color: #f8f8ff;
1798     padding: $lineheight/2;
1799     width: 300px;
1800     max-width: 450px;
1801
1802     ul {
1803       margin-bottom: 0;
1804     }
1805
1806     h4.heading, li {
1807       border-bottom: 1px solid #ccc;
1808       margin-bottom: $lineheight/4;
1809       padding-bottom: $lineheight/4;
1810     }
1811
1812     li h4, li span, li p {
1813       display: inline-block;
1814       vertical-align: top;
1815       font-size: 11px;
1816     }
1817
1818     li h4 {
1819       width: 35%;
1820       margin: 0;
1821     }
1822
1823     li span, li p {
1824       width: 60%;
1825       margin-left: $lineheight/2;
1826       margin-bottom: $lineheight/4;
1827       white-space: nowrap;
1828     }
1829   }
1830 }
1831
1832 /* Rules for the user notes list */
1833
1834 .note_list {
1835   tr.creator {
1836     background-color: #eeeeee;
1837   }
1838
1839   td {
1840     padding: 3px;
1841   }
1842
1843   p {
1844     margin-bottom: 0px;
1845   }
1846 }
1847
1848 /* Rules for the notes interface */
1849
1850 .note {
1851   padding-top: $lineheight/2;
1852 }
1853
1854 .note {
1855   h2 {
1856     margin-bottom: $lineheight/2;
1857   }
1858
1859   div {
1860     margin-top: $lineheight/2;
1861   }
1862
1863   .permalink {
1864     position: absolute;
1865     top: $lineheight/4;
1866     left: $lineheight/4;
1867     min-width: 15px;
1868     min-height: 15px;
1869     background: image-url("sprite.png") 0 -45px no-repeat;
1870   }
1871
1872   .permalink span {
1873     display: none;
1874     padding-left: $lineheight;
1875   }
1876
1877   .permalink:hover span {
1878     display: block;
1879   }
1880
1881   .warning {
1882     display: block;
1883     background-color: #ffe0cc;
1884     padding: 4px 6px;
1885     margin-bottom: $lineheight/2;
1886   }
1887
1888   .comment_body {
1889     margin-top: 2px;
1890     margin-bottom: 2px;
1891
1892     p {
1893       margin-top: 0px;
1894       margin-bottom: 0px;
1895     }
1896   }
1897
1898   .comment {
1899     width: 100%;
1900     height: 100px;
1901   }
1902
1903   .buttons {
1904     margin-top: $lineheight/4;
1905     text-align: right;
1906   }
1907 }
1908
1909 /*
1910  * Rules for the iD editor
1911  */
1912 .id-embed {
1913   width: 100%;
1914   height: 100%;
1915 }
1916
1917 /* Rules for rotating sidebar ads */
1918 .ad-container {
1919   display: block;
1920   height: 120px;
1921   overflow: hidden;
1922   position: relative;
1923   border-bottom: 1px solid #ccc;
1924 }
1925
1926 .ads {
1927   width: 370px;
1928   position: absolute;
1929   left: 0%;
1930 }
1931
1932 .ad {
1933   float: left;
1934   height: 120px;
1935   padding: $lineheight/2;
1936   border: 0px;
1937   background: #fff;
1938 }