]> git.openstreetmap.org Git - rails.git/blob - app/assets/stylesheets/common.scss
Merge remote-tracking branch 'upstream/pull/4178'
[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, .login-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 {
321     display: none;
322   }
323
324   .overlay-sidebar #sidebar #banner {
325     display: none;
326   }
327 }
328
329 /* Utility for styling notification numbers */
330
331 .count-number {
332   padding: 2px $lineheight/4;
333   border-radius: 2px;
334   background: lighten($green, 30%);
335   margin: 0 2px;
336   font-size: 11px;
337   color: #333;
338 }
339
340 /* Rules for the message shown in place of the map when javascript is disabled */
341
342 #noscript {
343   z-index: 20000000;
344   margin-left: 400px;
345   margin-top: 50px;
346 }
347
348 /* Rules for Leaflet maps */
349
350 .leaflet-top.leaflet-right,
351 .leaflet-top.leaflet-left {
352   height: 100%;
353   column-gap: 10px;
354   display: flex;
355   flex-direction: column;
356   flex-wrap: wrap-reverse;
357 }
358
359 .leaflet-control .control-button {
360   display: block;
361   height: 40px;
362   width: 40px;
363   background-color: #333;
364   background-color: rgba(0,0,0,.6);
365   outline: none;
366
367   &:hover,
368   &:focus {
369     background-color: black;
370   }
371
372   &.disabled,
373   &.leaflet-disabled {
374     background-color: #333;
375     background-color: rgba(0,0,0,.5);
376     cursor: default;
377   }
378
379   &.active {
380     background-color: $vibrant-green;
381   }
382
383   &-first {
384     border-start-start-radius: 4px;
385   }
386
387   &-last {
388     border-end-start-radius: 4px;
389     margin-bottom: 10px;
390   }
391
392   .icon {
393     margin: 10px;
394   }
395 }
396
397 /* Rules for the sidebar and main map area */
398
399 .map-layout {
400   #content {
401     overflow: hidden;
402     position: absolute;
403     top: $headerHeight;
404     bottom: 0;
405     width: 100%;
406   }
407
408   #sidebar, #map {
409     position: relative;
410     height: 100%;
411     overflow-x: hidden;
412     overflow-y: auto;
413   }
414
415   #sidebar {
416     float: left;
417     width: $sidebarWidth;
418     background: #fff;
419
420     #sidebar_loader {
421       display: none;
422     }
423
424     #sidebar_content {
425       padding: $spacer;
426     }
427
428     > div {
429       position: relative;
430     }
431   }
432
433   .overlay-sidebar #sidebar {
434     position: absolute;
435     z-index: 1000;
436     height: auto;
437     overflow: hidden;
438
439     #banner {
440       display: block;
441     }
442
443     .welcome {
444       display: block;
445     }
446
447     #sidebar_content {
448       display: none;
449     }
450   }
451
452   .welcome {
453     display: none;
454
455     p {
456       font-size: 110%;
457       font-weight: 300;
458     }
459   }
460
461   #banner {
462     display: none;
463
464     img {
465       display: block;
466       width: $sidebarWidth;
467     }
468
469     button.btn-close {
470       background-color: rgba(255, 255, 255, 0.5);
471       opacity: 1.0;
472     }
473   }
474
475   #map {
476     height: 100%;
477     overflow: hidden;
478
479     &.query-active {
480       cursor: help;
481     }
482
483     &.query-disabled {
484       cursor: not-allowed;
485     }
486
487     .leaflet-marker-draggable {
488       cursor: move;
489     }
490   }
491
492   #map-ui {
493     display: none;
494     position: relative;
495     float: right;
496     width: 250px;
497     height: 100%;
498     background: white;
499     overflow: auto;
500
501     .section {
502       border-bottom: 1px solid $grey;
503       padding: 10px 20px;
504     }
505   }
506 }
507
508 @include media-breakpoint-down(md) {
509   body.map-layout {
510     #sidebar, #map {
511       position: relative;
512       overflow-x: hidden;
513       width: 100%;
514       height: 50%;
515     }
516
517     #map-ui {
518       z-index: 9999;
519       width: 100%;
520       height: 50%;
521       overflow-y: scroll;
522     }
523
524     .overlay-sidebar {
525       #sidebar {
526         position: absolute;
527         width: 350px;
528         height: auto;
529         overflow: hidden;
530       }
531
532       #map, #map-ui {
533         height: 100%;
534       }
535     }
536   }
537 }
538
539 .layers-ui {
540   .base-layers {
541     .leaflet-container {
542       width: 100%;
543       height: 50px;
544       cursor: pointer;
545     }
546
547     li  {
548       overflow: hidden;
549       border-radius: 3px;
550       border: 2px solid #fff;
551       margin-bottom: 8px;
552       position: relative;
553       transition: border-color 0.08s ease-in;
554
555       label {
556         position: absolute;
557         top: 0;
558         left: 0;
559         padding: 2px 6px;
560         border-bottom-right-radius: 3px;
561         cursor: pointer;
562         font-weight: 600;
563         font-size: 16px;
564         text-stroke: 2px #fff;
565         background: rgba(255,255,255,.9);
566         z-index: 1000;
567         input[type="radio"] {
568           display: none;
569         }
570       }
571
572       &.active { border-color: darken($green, 10%); }
573       &:hover {
574         border-color: $grey;
575         &.active { border-color: darken($green, 20%); }
576       }
577     }
578   }
579
580   .overlay-layers {
581     p {
582       font-size: 13px;
583       margin-bottom: 8px;
584     }
585     li.disabled { color: $darkgrey; }
586   }
587 }
588
589 .share-ui {
590   .share-link {
591     input[type=text],
592     textarea {
593       width: 100%;
594       font-family: monospace;
595       font-size: small;
596       line-height: 1.3;
597     }
598   }
599
600   .share-image {
601     label {
602       margin-right: 10px;
603     }
604   }
605
606   #mapnik_scale {
607     width: 100px;
608   }
609 }
610
611 .leaflet-top {
612   top: $lineheight/2 !important;
613   .leaflet-control {
614     margin-right: 0px !important;
615     margin-top: 0px !important;
616   }
617 }
618
619 .leaflet-popup-scrolled {
620   padding-right: $lineheight;
621   border-bottom: 0px !important;
622   border-top: 0px !important;
623 }
624
625 .leaflet-popup-content-wrapper {
626   border-radius: 4px !important;
627 }
628
629 /* Rules for attribution text under the main map shown on printouts */
630
631 #attribution {
632   display: none;
633 }
634
635 .donate-attr { color: darken($green, 10%) !important; }
636
637 /* Rules for the sidebar */
638
639 .sidebar_heading {
640   position: relative;
641   padding: $lineheight/2 $lineheight;
642   // background: $offwhite;
643   // border-bottom: 1px solid $grey;
644 }
645
646 #browse_status {
647   input {
648     display: block;
649     margin-left: auto;
650     margin-right: auto;
651   }
652
653   > div {
654    padding: $spacer;
655   }
656 }
657
658 /* Temporary label size override until we remove site-wide font customisation */
659
660 form {
661   label {
662     font-size: 16px;
663   }
664 }
665
666 /* Stop bootstrap 5 from floating legends when they don't need to be */
667 legend {
668   float: none;
669 }
670
671 /* Override the text colour for primary and secondary buttons, to match our
672    bootstrap 4 colours. Note this has accessibility issues, which is why
673    bootstrap 5 calculates black as the appropriate colour, and we should
674    reconsider our colours at some point with that in mind. */
675
676 .btn-primary {
677   @include button-variant($primary, $primary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
678 }
679
680 .btn-secondary {
681   @include button-variant($secondary, $secondary, $color: $white, $hover-color: $white, $active-color: $white, $disabled-color: $white);
682 }
683
684 .btn-outline-secondary {
685   @include button-outline-variant($secondary, $color-hover: $white, $active-color: $white);
686 }
687
688 /* Rules for the search and direction forms */
689
690 header .search_forms,
691 .directions_form {
692   display: none;
693 }
694
695 /* Rules for the map key which appears in the popout sidebar */
696
697 #mapkey {
698  .mapkey-table-key img {
699     display: block;
700     margin-left: auto;
701     margin-right: auto;
702   }
703 }
704
705 /* Rules for search sidebar */
706
707 #sidebar .search_results_entry {
708   ul li {
709     cursor: pointer;
710     &.selected { background: $list-highlight; }
711   }
712
713   .search_more .loader {
714     display: none;
715   }
716 }
717
718 .search_results_error {
719   color: #f00;
720   padding: 10px 20px;
721 }
722
723 /* Rules for routing */
724
725 div.direction {
726   background-image: image-url('routing-sprite.png');
727   width: 20px;
728   height: 20px;
729   background-repeat: no-repeat;
730 }
731 @for $i from 0 through 25 {
732 div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; }
733 }
734
735 td.instruction, td.distance {
736     padding-top: $lineheight/5;
737     padding-bottom: $lineheight/5;
738     border-bottom: 1px solid $grey;
739 }
740 td.distance {
741     color: $darkgrey;
742     text-align: right;
743     font-size: x-small;
744 }
745 tr.turn {
746     cursor: pointer;
747 }
748 tr.turn:hover {
749     background: $list-highlight;
750 }
751
752 .routing_marker { width: 15px; cursor: move; }
753
754 .browse_status {
755   display: none;
756 }
757
758 /* Rules for the history sidebar */
759
760 #sidebar .changesets {
761   li {
762     &.selected { background: $list-highlight; }
763     /* color is derived from changeset bbox fillColor in history.js */
764
765     a.stretched-link > span, a:not(.stretched-link), [title] {
766       position: relative;
767       z-index: 2; /* needs to be higher than Bootstrap's stretched link ::after z-index */
768     }
769   }
770
771   .comments {
772     color: $darkgrey;
773   }
774
775   .comments-0 {
776     opacity: 0.5;
777   }
778
779   .changeset_more .loader {
780     display: none;
781     width: 100%;
782   }
783 }
784
785 /* Rules for the browse sidebar */
786
787 #sidebar_content {
788   .browse-section {
789     padding-bottom: $spacer;
790     margin-bottom: $spacer;
791     border-bottom: 1px solid $grey;
792
793     h4:first-child {
794       word-wrap: break-word;
795     }
796   }
797
798   .browse-section:last-of-type {
799     border-bottom: none;
800   }
801
802   .browse-tag-list {
803     background-color: $offwhite;
804     table-layout: fixed;
805     border-collapse: separate;
806     border-spacing: 0;
807     width: 100%;
808     margin-bottom: $spacer;
809
810     th, td {
811       border-bottom: 1px solid $grey;
812     }
813
814     tr:last-child th, tr:last-child td {
815       border-bottom: 0;
816     }
817
818     .browse-tag-k,
819     .browse-tag-v {
820       width: 50%;
821       padding: 6px 10px;
822       word-wrap: break-word;
823       white-space: pre-wrap;
824     }
825
826     .browse-tag-k {
827       font-weight: 500;
828       background-color: $offwhite;
829     }
830
831     .browse-tag-v {
832       border-left: 1px solid $grey;
833       background-color: #fff;
834     }
835
836     .colour-preview-box {
837       float: right;
838       width: 14px;
839       height: 14px;
840       margin: 4px 0px;
841       border: 1px solid rgba(0, 0, 0, .1);
842       // add color via inline css on element: background-color: <tag value>;
843     }
844   }
845
846   .note-comments li, .changeset-comments li {
847     margin: $lineheight/2 0;
848
849     p {
850       margin: 10px 6px 0 6px;
851       line-height: 1.5;
852     }
853   }
854
855   .subscribe-buttons input {
856     font-size: 90%;
857     line-height: 15px;
858     min-height: 20px;
859   }
860
861   span.action-button:hover {
862     cursor: pointer;
863     text-decoration: underline;
864   }
865
866   .note-description {
867     overflow: hidden;
868     margin: 0 0 10px 10px;
869   }
870
871   .query-results {
872     display: none;
873
874     ul {
875       li {
876         &.query-result {
877           cursor: pointer;
878         }
879
880         &.selected {
881           background: $list-highlight;
882         }
883       }
884     }
885   }
886 }
887
888 /* Bootstrap buttons don't have any vertical margin, so
889    they touch when adjacent buttons wrap onto a new line
890    e.g. wide form buttons on a narrow sidebar */
891
892 .btn-wrapper {
893   > .btn {
894     margin-bottom: $spacer * 0.25;
895   }
896 }
897
898 /* Rules for export sidebar */
899
900 .export_form {
901   .export_area_inputs,
902   .export_button {
903     text-align: center;
904   }
905
906   .export_area_inputs {
907     margin-bottom: $spacer;
908     input[type="text"] {
909       width: 100px;
910       text-align: center;
911     }
912   }
913
914   .export_boxy {
915     background: $lightgrey;
916
917     #maxlat { margin-top: -1px; }
918     #minlon {
919       float: left;
920       /* no-r2 */ margin-left: -1px;
921     }
922     #maxlon {
923       float: right;
924       /* no-r2 */ margin-right: -1px;
925     }
926     #minlat { margin-bottom: -1px; }
927   }
928
929   .export_bound {
930     margin: $lineheight/4;
931   }
932
933   dl {
934     padding-left: $lineheight/2;
935     dd {
936       margin-left: 0;
937       margin-bottom: 10px;
938     }
939   }
940 }
941
942 /* Rules for edit pages */
943
944 .site-edit {
945   #content {
946     position: absolute;
947     top: $headerHeight;
948     bottom: 0;
949     width: 100%;
950   }
951
952   #map {
953     height: 100%;
954     overflow: hidden;
955   }
956 }
957
958 /* Rules for non-map content pages */
959
960 .content-heading {
961   background: $lightgrey;
962 }
963
964 .content-inner {
965   position: relative;
966   max-width: 960px;
967   margin: auto;
968   padding: $lineheight;
969 }
970
971 /* Overrides for pages that use new layout conventions */
972
973 .header-illustration {
974   background-position: 0 0;
975   background-repeat: no-repeat;
976   position: relative;
977   min-height: 200px;
978   width: 100%;
979   left: 0;
980   bottom: 0;
981
982   &.new-user-main {
983     background-image: image-url("sign-up-illustration.png");
984   }
985
986   &.confirm-main {
987     background-image: image-url("confirm-illustration.png");
988   }
989
990   &.new-user-terms {
991     background-image: image-url("terms-illustration.png");
992   }
993
994   &.new-user-arm {
995     height: 110px;
996     width: 130px;
997     left: 280px;
998     top: 180px;
999     background-image: image-url("sign-up-illustration-arm.png");
1000     position: absolute;
1001     z-index: 100;
1002     pointer-events: none;
1003   }
1004 }
1005
1006 [dir=rtl] .header-illustration {
1007   transform: scaleX(-1);
1008
1009   h1 {
1010     transform: scaleX(-1);
1011   }
1012 }
1013
1014 #content.maximised {
1015   top: 0;
1016   left: 0;
1017   right: 0;
1018   bottom: 0;
1019   border: 0;
1020   z-index: 2000;
1021 }
1022
1023 /* Rules for small maps in content areas */
1024
1025 .content_map {
1026   height: 200px;
1027   margin-bottom: $lineheight;
1028 }
1029
1030 @include media-breakpoint-up(md) {
1031   .content_map {
1032     height: 400px;
1033   }
1034 }
1035
1036 /* Rules for the user map */
1037
1038 .content_map .leaflet-popup-content {
1039   margin: $lineheight/2;
1040   min-height: 50px;
1041 }
1042
1043 /* Rules for user popups on maps */
1044
1045 .user_popup {
1046   min-width: 200px;
1047   p {
1048     padding: 0 0 5px 0;
1049     margin: 0 0 0 60px;
1050     font-size: 12px;
1051   }
1052 }
1053
1054 /* Rules for the user list */
1055
1056 #user_list {
1057   width: 100%;
1058 }
1059
1060 /* Rules for the diary entry page */
1061
1062 .diary_entries {
1063   #map {
1064     height: 400px;
1065     display: none;
1066   }
1067   .comments {
1068     max-width: 740px;
1069   }
1070   .diary-comment {
1071     border-top: 1px dashed $grey;
1072     &:first-child {
1073       border-top: 1px solid $grey;
1074     }
1075     p {
1076       margin-bottom: $lineheight/2;
1077     }
1078   }
1079 }
1080
1081 /* Rules for the log in page */
1082
1083 #login_auth_buttons {
1084   margin-bottom: 0;
1085
1086   li {
1087     float: left;
1088     padding: $lineheight/4 $lineheight/2;
1089   }
1090 }
1091
1092 /* Rules for the account confirmation page */
1093
1094 .users-terms {
1095   .legale {
1096     padding: $lineheight;
1097     margin-bottom: $lineheight;
1098     overflow: auto;
1099     height: 20em;
1100
1101     li {
1102       list-style: inherit;
1103     }
1104
1105     ol ol {
1106       list-style-type: lower-alpha;
1107     }
1108   }
1109 }
1110
1111 /* Rules for the oauth authorization page */
1112
1113 .oauth-authorize ul {
1114   list-style: none;
1115 }
1116
1117 /* Rules for messages pages */
1118
1119 .messages {
1120   .inbox-row {
1121     background: $offwhite;
1122   }
1123
1124   .inbox-row-unread {
1125     background: #CBEEA7;
1126   }
1127 }
1128
1129 .search_form {
1130   background-color: $lightgrey;
1131
1132   .describe_location {
1133     top: 6px;
1134     right: 6px;
1135     font-size: 10px;
1136     color: $blue;
1137   }
1138 }
1139
1140 .directions_form {
1141   background-color: $lightgrey;
1142 }
1143
1144 /* Rules for user images */
1145
1146 img.user_image {
1147   max-width: 100px;
1148   max-height: 100px;
1149 }
1150
1151 img.user_thumbnail {
1152   max-width: 50px;
1153   max-height: 50px;
1154 }
1155
1156 img.user_thumbnail_tiny {
1157   width: auto;
1158   height: auto;
1159   max-width: 25px;
1160   max-height: 25px;
1161 }
1162
1163 /* General styles for action lists / subnavs */
1164
1165 nav.secondary-actions {
1166   margin-left: -11px;
1167   overflow: hidden;
1168   > ul {
1169     display: flex;
1170     flex-direction: row;
1171     flex-wrap: wrap;
1172     margin-bottom: 0;
1173     margin-left: -1px;
1174     padding: 0;
1175     > li {
1176       flex-basis: auto;
1177       list-style: none;
1178       border-left: 1px solid $grey;
1179       padding-left: $lineheight/2;
1180       margin-right: $lineheight/2;
1181       margin-bottom: $lineheight/8;
1182     }
1183   }
1184 }
1185
1186 div.secondary-actions {
1187   padding: 10px;
1188   text-align: center;
1189 }
1190
1191 /* Rules for rich text */
1192
1193 .richtext,
1194 .prose {
1195   code {
1196     background: $lightgrey;
1197     padding: 2px 3px;
1198     direction: inherit; /* fix for Bootstrap < 5.2 */
1199     unicode-bidi: unset; /* fix for Bootstrap < 5.2 */
1200   }
1201
1202   pre {
1203     background: $lightgrey;
1204     padding: 2px 3px;
1205     white-space: pre-wrap;
1206
1207     code {
1208       padding: 0;
1209     }
1210   }
1211
1212   img {
1213     padding: $lineheight;
1214     background-color: $offwhite;
1215     display: block;
1216     max-width: 100%;
1217     margin: auto;
1218   }
1219
1220   blockquote {
1221     border-left: $lineheight solid $offwhite;
1222     padding-left: $lineheight;
1223     margin: 0;
1224     color: $darkgrey;
1225   }
1226 }
1227
1228 /* Rules for the iD editor */
1229
1230 .id-embed {
1231   width: 100%;
1232   height: 100%;
1233 }
1234
1235 /* Rules for the "Welcome" page */
1236 .site-welcome, .site-fixthemap {
1237   .sprite {
1238     background-image: image-url("welcome-sprite.png");
1239     background-size: 500px 250px;
1240     display: block;
1241   }
1242
1243   .sprite.small {
1244     width: 50px;
1245     height: 50px;
1246   }
1247
1248   .sprite.x {
1249     /* no-r2 */ background-position: -50px 0;
1250   }
1251
1252   .sprite.term {
1253     margin-right: 10px;
1254     vertical-align: middle;
1255   }
1256
1257   .sprite.node {
1258     /* no-r2 */ background-position: -100px 0;
1259   }
1260
1261   .sprite.way {
1262     /* no-r2 */ background-position: -150px 0;
1263   }
1264
1265   .sprite.tag {
1266     /* no-r2 */ background-position: -200px 0;
1267   }
1268
1269   .sprite.editor {
1270     /* no-r2 */ background-position: -250px 0;
1271   }
1272
1273   .sprite.question {
1274     /* no-r2 */ background-position: -300px 0;
1275   }
1276
1277   .sprite.rules {
1278     /* no-r2 */ background-position: -350px 0;
1279   }
1280
1281   .icon.note {
1282     background-color: #333;
1283     border-radius: 4px;
1284   }
1285 }
1286
1287 .site-about #content {
1288   background-color: $lightgrey;
1289
1290   .content-inner {
1291     max-width: 760px;
1292   }
1293
1294   .attr {
1295     margin-top: -20px;
1296
1297     h1 {
1298       span {
1299         color: $vibrant-green;
1300       }
1301     }
1302
1303     .user-image {
1304       height: 150px;
1305       background-position: 0 50%;
1306       background-repeat: no-repeat;
1307       background-image: image-url('about/osm.png');
1308       background-size: cover;
1309       background-color: $vibrant-green;
1310     }
1311
1312     .byosm {
1313       background: $vibrant-green;
1314     }
1315
1316     .byosm span {
1317       display: inline-block;
1318       width: 1em;
1319       margin-left: -1em;
1320     }
1321   }
1322
1323   .icon {
1324     width: 30px;
1325     height: 30px;
1326     background: 40px 40px image-url('about/sprite.png') no-repeat;
1327
1328     &.local {
1329       /* no-r2 */
1330       background-position: 0px 0px;
1331     }
1332     &.community {
1333       /* no-r2 */
1334       background-position: 0px -40px;
1335     }
1336     &.open {
1337       /* no-r2 */
1338       background-position: 0px -80px;
1339     }
1340     &.partners {
1341       /* no-r2 */
1342       background-position: 0px -120px;
1343     }
1344     &.infringement {
1345       /* no-r2 */
1346       background-position: 0px -160px;
1347     }
1348     &.legal {
1349       /* no-r2 */
1350       background-position: -45px -160px;
1351     }
1352   }
1353 }
1354
1355 @import 'browse';