]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/stylesheets/common.scss
Merge remote-tracking branch 'upstream/pull/2711'
[rails.git] / app / assets / stylesheets / common.scss
index 88b3e29f1b5dc495780f6278f4b77b008e119cf9..50bcf9be7b13124c05e9519154e974abf52db565 100644 (file)
@@ -1,5 +1,5 @@
 @import "parameters";
-@import "bootstrap-custom";
+@import "bootstrap";
 
 /* Styles common to large and small screens */
 
@@ -30,20 +30,11 @@ small, aside {
 
 #container { position: relative; }
 
-.column-1 {
-  width: 50%;
-  margin: 0 0 $lineheight/2 0;
-}
-
 .small_icon {
   vertical-align: middle;
   margin-right: $lineheight/4;
 }
 
-.red { color: $red; }
-
-.piwik { border: 0; }
-
 [dir=rtl] { /* no-r2 */ text-align: right; }
 
 [dir=ltr] { /* no-r2 */ text-align: left; }
@@ -85,32 +76,12 @@ small, aside {
 a {
   color: #24d;
   text-decoration: none;
-  -webkit-appearance: none;
   outline: 0;
   &:hover {
     text-decoration: underline;
   }
 }
 
-/* General styles for tables */
-
-table {
-  width: 100%;
-  margin-bottom: $lineheight;
-  th, td {
-    text-align: left;
-    padding: $lineheight/4;
-    line-height: $lineheight;
-  }
-  th {
-    font-weight: 600;
-    vertical-align: top;
-  }
-  td {
-    vertical-align: middle;
-  }
-}
-
 /* Utility for de-emphasizing content */
 
 .deemphasize {
@@ -120,6 +91,10 @@ table {
   }
 }
 
+.text-muted a {
+  color: $blue;
+}
+
 /* Rules for the header */
 
 #menu-icon {
@@ -190,6 +165,32 @@ nav.primary {
   .btn-outline-primary {
     @include button-outline-variant($green, $white);
   }
+
+  .disabled {
+    .btn-outline-primary {
+      color: $grey;
+      cursor: default;
+
+      .caret {
+        border-top-color: $grey;
+      }
+
+      &:hover {
+        background-color: lighten($green, 30%);
+      }
+    }
+  }
+
+  // Small tweaks to the toggle to stop the primary colour showing through
+  // when the menu is shown
+  .show > .btn-outline-primary.dropdown-toggle {
+    background-color: $green;
+    border-color: $green;
+
+    &:focus {
+      box-shadow: 0 0 0 0.2rem fade-out($green, 0.5);
+    }
+  }
 }
 
 nav.secondary {
@@ -214,8 +215,20 @@ nav.secondary {
   .user-menu {
     .btn-outline-secondary {
       @include button-outline-variant($darkgrey, $darkgrey, white, $darkgrey);
-      // @include button-outline-variant($grey, $grey, white, $grey);
       border-color: $grey;
+      &:hover {
+        border-color: $grey;
+      }
+      &:focus {
+        background-color: white;
+        box-shadow: none;
+      }
+    }
+    &.show .btn-outline-secondary {
+      background-color: white;
+      &:focus {
+        box-shadow: none;
+      }
     }
   }
 
@@ -226,12 +239,11 @@ nav.secondary {
 
   #inboxanchor {
     display: inline-block;
-    vertical-align: top;
     height: 25px;
     margin: 3px 0 3px 3px;
     background-color: lighten($grey, 10%);
     line-height: 20px;
-    border-radius: 2;
+    border-radius: 3;
   }
 
   .dropdown-menu {
@@ -241,11 +253,20 @@ nav.secondary {
   }
 }
 
+nav.primary, nav.secondary {
+  .dropdown-item {
+    &:hover, &:active {
+      background-color: $green;
+      color: white;
+    }
+  }
+}
+
 #compact-secondary-nav {
   display: none;
 }
 
-body.compact {
+body.compact-nav {
   #compact-secondary-nav {
     display: inline-block;
   }
@@ -673,10 +694,6 @@ body.compact {
 }
 
 #browse_status {
-  p {
-    padding: $lineheight;
-  }
-
   input {
     display: block;
     margin-left: auto;
@@ -727,6 +744,7 @@ header .search_forms,
 
   input[type=text].overflow {
     border-right: none;
+    border-radius: 3px 0px 0px 3px;
   }
 
   input:focus {
@@ -826,9 +844,6 @@ header .search_forms,
     margin-left: auto;
     margin-right: auto;
   }
-  td {
-    padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
-  }
 }
 
 /* Rules for search sidebar */
@@ -856,6 +871,7 @@ header .search_forms,
     padding: 5px 20px 10px 15px;
     width: 100%;
     border-collapse: separate;
+    border-spacing: 0;
 }
 
 div.direction {
@@ -980,6 +996,8 @@ tr.turn:hover {
     border-radius: 3px;
     table-layout: fixed;
     border-collapse: separate;
+    border-spacing: 0;
+    width: 100%;
 
     th, td {
       border-bottom: 1px solid $grey;
@@ -1017,11 +1035,6 @@ tr.turn:hover {
     }
   }
 
-  .warning {
-    margin: 0 0 $lineheight/2 0;
-    padding: 0 $lineheight/2;
-  }
-
   .note-comments li, .changeset-comments li {
     margin: $lineheight/2 0;
 
@@ -1168,16 +1181,6 @@ tr.turn:hover {
   background: $lightgrey;
 }
 
-.content-body {
-  h1, h2, h3, p, ul, ol {
-    margin-bottom: $lineheight;
-  }
-
-  h1, h2, h3 {
-    margin-top: $lineheight/2;
-  }
-}
-
 .content-inner {
   position: relative;
   max-width: 900px;
@@ -1243,23 +1246,14 @@ tr.turn:hover {
 /* Rules for small maps in content areas */
 
 .content_map {
-  position: relative;
-  width: 45%;
-  height: 400px;
+  height: 200px;
   border: 1px solid $grey;
   margin-bottom: $lineheight;
-  float: right;
 }
 
-/* Rules for the trace list shown by the traces tab etc */
-
-#trace_list {
-  border-width: 0px;
-  text-align: right;
-
-  .trace_summary {
-    font-size: 12px;
-    color: gray;
+@include media-breakpoint-up(md) {
+  .content_map {
+    height: 400px;
   }
 }
 
@@ -1290,21 +1284,14 @@ tr.turn:hover {
 /* Rules for the user profile page */
 
 #userinformation {
-
   min-height: 100px;
   .userinformation-inner {
     float: left;
   }
-  h2 {
-    margin-top: 0;
-  }
   .user-description {
     width: 100%;
     clear: both;
   }
-  .deemphasize {
-    margin: 0;
-  }
 }
 
 .admin-user-info small {
@@ -1313,16 +1300,6 @@ tr.turn:hover {
   margin-right: $lineheight;
 }
 
-.activity-block {
-  clear: left;
-  border-bottom: 1px solid $grey;
-  padding-bottom: $lineheight;
-  float: left;
-  h3 {
-    margin-bottom: $lineheight/2;
-  }
-}
-
 .contact-activity {
   margin-top: $lineheight;
   width: 100%;
@@ -1401,7 +1378,7 @@ tr.turn:hover {
     margin-top: $lineheight/2;
   }
 
-  &.deemphasize {
+  &.deleted {
     background-color: #fee;
   }
 
@@ -1456,7 +1433,7 @@ tr.turn:hover {
       padding-top: $lineheight;
       border-top: 1px solid $grey;
     }
-    &.deemphasize {
+    &.deleted {
       background-color: #fee;
     }
     p {
@@ -1520,13 +1497,6 @@ tr.turn:hover {
 
 /* Rules for the account settings page */
 
-#accountForm .user_map {
-  position: relative;
-  width: 500px;
-  height: 400px;
-  border: 1px solid $grey;
-}
-
 #accountForm .user_image {
   margin-bottom: 0;
 }
@@ -1551,11 +1521,6 @@ tr.turn:hover {
   display: inline !important;
 }
 
-.content_map.settings_map {
-  width: 50%;
-  float: none;
-}
-
 /* Rules for the oauth settings page */
 
 .oauth_clients .buttons .oauth-edit {
@@ -1575,43 +1540,21 @@ tr.turn:hover {
 /* Rules for messages pages */
 
 .messages {
-  width: 100%;
-  border: 1px solid $grey;
-
   input[type="submit"] {
     margin: auto;
   }
-  tbody tr {
-    border-top: 1px solid $grey;
-  }
 
   .inbox-row {
     background: $offwhite;
   }
 
   .inbox-row-unread {
-    background:#CBEEA7;
+    background: #CBEEA7;
   }
 
   .right {
     float: right;
   }
-
-  tr td,
-  tr th {
-    padding: $lineheight/4;
-  }
-  p:last-child,
-  h2:last-child,
-  h3:last-child,
-  ol:last-child,
-  ul:last-child {
-    margin-bottom:0;
-  }
-  tr td {
-    height: 30px;
-    border-right: 1px solid $lightgrey;
-  }
 }
 
 .inbox-row .inbox-mark-read {
@@ -1646,17 +1589,6 @@ tr.turn:hover {
   display: none;
 }
 
-.messages-show .message-buttons {
-  margin-top: $lineheight;
-  margin-bottom: $lineheight * 1.5;
-  padding-top: $lineheight;
-  border-top: 1px solid $lightgrey;
-}
-
-.messages-show .buttons .mark-unread-button {
-  border-radius: 0;
-}
-
 /* Rules for "flash" notice boxes shown at the top of the content area */
 
 .flash {
@@ -1999,16 +1931,11 @@ a.button {
   }
 }
 
-/* Rules for doing distinct colour of alternate table rows */
+/* Customise the background colour of striped tables */
 
-.table0,
-.item0 {
-  background: $offwhite;
-}
-
-.table1,
-.item1 {
-  background: #fff;
+.table-striped > tbody > tr:nth-child(2n+1) > td,
+.table-striped > tbody > tr:nth-child(2n+1) > th {
+   background-color: $offwhite;
 }
 
 /* Rules for OpenID logo */
@@ -2148,15 +2075,7 @@ input.richtext_title[type="text"] {
 
 .note_list {
   tr.creator {
-    background-color: $lightgrey;
-  }
-
-  td {
-    padding: 3px;
-  }
-
-  p {
-    margin-bottom: 0px;
+    background-color: $offwhite;
   }
 }
 
@@ -2278,12 +2197,18 @@ input.richtext_title[type="text"] {
       display: block;
       color: white;
       font-weight: 300;
-      font-size: 34px;
+      font-size: 28px;
       span {
         color: $vibrant-green;
       }
     }
 
+    @include media-breakpoint-up(sm) {
+      h1 {
+        font-size: 34px;
+      }
+    }
+
     .user-image {
       position: absolute;
       top: 0px;
@@ -2359,14 +2284,3 @@ input.richtext_title[type="text"] {
     display: none;
   }
 }
-
-.read-reports {
-  background: $lightgrey;
-  opacity: 0.7;
-}
-
-.issues-list {
-  td:nth-child(2) {
-    white-space: nowrap;
-  }
-}