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