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