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