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