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