]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/stylesheets/common.scss
Merge remote-tracking branch 'upstream/pull/2431'
[rails.git] / app / assets / stylesheets / common.scss
index 5fc4da8d828146069789ffdbff1b70a201b69e1d..a13f73d7a8ba0a2aa7228b927da1ea54e664f968 100644 (file)
@@ -1,5 +1,5 @@
 @import "parameters";
-@import "bootstrap-custom";
+@import "bootstrap";
 
 /* Styles common to large and small screens */
 
@@ -92,25 +92,6 @@ a {
   }
 }
 
-/* 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 {
@@ -190,6 +171,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 +221,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;
+      }
     }
   }
 
@@ -240,6 +259,15 @@ nav.secondary {
   }
 }
 
+nav.primary, nav.secondary {
+  .dropdown-item {
+    &:hover, &:active {
+      background-color: $green;
+      color: white;
+    }
+  }
+}
+
 #compact-secondary-nav {
   display: none;
 }
@@ -726,6 +754,7 @@ header .search_forms,
 
   input[type=text].overflow {
     border-right: none;
+    border-radius: 3px 0px 0px 3px;
   }
 
   input:focus {
@@ -825,9 +854,6 @@ header .search_forms,
     margin-left: auto;
     margin-right: auto;
   }
-  td {
-    padding: 0 $lineheight/4 $lineheight/4 $lineheight/4;
-  }
 }
 
 /* Rules for search sidebar */
@@ -855,6 +881,7 @@ header .search_forms,
     padding: 5px 20px 10px 15px;
     width: 100%;
     border-collapse: separate;
+    border-spacing: 0;
 }
 
 div.direction {
@@ -979,6 +1006,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;
@@ -1250,18 +1279,6 @@ tr.turn:hover {
   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;
-  }
-}
-
 /* Rules for the new trace form */
 
 #new_trace {
@@ -1574,43 +1591,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 {
@@ -1998,16 +1993,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 */
@@ -2147,15 +2137,7 @@ input.richtext_title[type="text"] {
 
 .note_list {
   tr.creator {
-    background-color: $lightgrey;
-  }
-
-  td {
-    padding: 3px;
-  }
-
-  p {
-    margin-bottom: 0px;
+    background-color: $offwhite;
   }
 }
 
@@ -2363,9 +2345,3 @@ input.richtext_title[type="text"] {
   background: $lightgrey;
   opacity: 0.7;
 }
-
-.issues-list {
-  td:nth-child(2) {
-    white-space: nowrap;
-  }
-}