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