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