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