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