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