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