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