]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/stylesheets/common.css.scss
Simplified common details
[rails.git] / app / assets / stylesheets / common.css.scss
index 5f038d692099ef2a98ab5ccb30b2629efd8a8a89..66b9f3c4854eb28d6fc3f92cafcc8c14277a46c5 100644 (file)
@@ -215,51 +215,6 @@ table {
   }
 }
 
-/* Rules for the search box */
-
-#search_form {
-  position: relative;
-  padding: $lineheight;
-  background-color: $lightgrey;
-  border-bottom: $keyline;
-
-  #query_wrapper {
-    position: relative;
-    overflow: hidden;
-  }
-
-  input {
-    width: 100%;
-    height: 30px;
-    border-right: none;
-    border-radius: 2px 0 0 2px;
-
-    transition: 300ms linear;
-    -webkit-transition: 300ms linear;
-    -moz-transition: 300ms linear;
-  }
-
-  input:focus {
-    outline: none;
-    box-shadow: 0px 0px 7px #9ED485;
-  }
-
-  input[type=submit] {
-    float: right;
-    width: auto;
-    min-width: 0;
-    border-radius: 0 2px 2px 0;
-  }
-
-  #describe_location {
-    position: absolute;
-    top: 6px;
-    right: 6px;
-    font-size: 10px;
-    color: $blue;
-  }
-}
-
 /* Utility for de-emphasizing content */
 
 .deemphasize {
@@ -269,27 +224,6 @@ table {
   }
 }
 
-/* Rules for donation request box */
-
-a.donate {
-  display: block;
-  width: 163px;
-  padding: $lineheight/4;
-  border: 1px solid #AED1A0;
-  background: #cbeea7;
-  font-size: $typeheight;
-  line-height: 1.4;
-  text-align: center;
-  border-radius: 2px;
-  color: #222;
-  margin: $lineheight/2 auto;
-
-  &:hover {
-    background: #9ed485;
-    text-decoration: none;
-  }
-}
-
 /* Rules for the header */
 
 header {
@@ -605,34 +539,94 @@ nav.secondary {
   border-radius: 0 0 0 4px;
 }
 
-/* Rules for the home page */
+/* Rules for the sidebar and main map area */
 
-#map {
-  height: 100%;
-  overflow: hidden;
-}
+.map-layout {
+  #content {
+    position: absolute;
+    top: $headerHeight;
+    bottom: 0;
+    width: 100%;
+  }
 
-#map-ui {
-  display: none;
-  position: relative;
-  float: right;
-  width: 250px;
-  height: 100%;
-  background: white;
-  overflow: auto;
+  #sidebar, #map {
+    position: relative;
+    height: 100%;
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
 
-  .section {
-    border-bottom: 1px solid #DDD;
-    padding: 15px;
+  #sidebar {
+    float: left;
+    width: $sidebarWidth;
+    border-right: $keyline;
+
+    h2, h3, h4 {
+      padding: $lineheight;
+      border-bottom: $keyline;
+    }
+
+    h4 {
+      font-weight: normal;
+    }
+
+    .icon.close {
+      position: absolute;
+      right: $lineheight;
+    }
+
+    .footer {
+      position: absolute;
+      bottom: 0;
+    }
+
+    p.credits {
+      font-size: 11px;
+      color: #999;
+
+      a {
+        color: #666;
+      }
+    }
+  }
+
+  #sidebar.minimized {
+    position: absolute;
+    z-index: 1000;
+    height: auto;
+
+    #sidebar_content {
+      display: none;
+    }
+  }
+
+  #map {
+    height: 100%;
+    overflow: hidden;
   }
 
-  a.close-button {
+  #map-ui {
+    display: none;
+    position: relative;
     float: right;
-    padding:5px;
-    font-size:20px;
-    line-height:10px;
-    color:#222;
-    border:1px solid #ddd;
+    width: 250px;
+    height: 100%;
+    background: white;
+    overflow: auto;
+
+    .section {
+      border-bottom: 1px solid #DDD;
+      padding: 15px;
+    }
+
+    a.close-button {
+      float: right;
+      padding:5px;
+      font-size:20px;
+      line-height:10px;
+      color:#222;
+      border:1px solid #ddd;
+    }
   }
 }
 
@@ -761,42 +755,6 @@ nav.secondary {
 
 /* Rules for the sidebar */
 
-#sidebar {
-  border-right: $keyline;
-
-  .alert {
-    background: #e00;
-  }
-
-  h2, h3, h4 {
-    padding: $lineheight;
-    border-bottom: $keyline;
-  }
-
-  h4 {
-    font-weight: normal;
-  }
-
-  .icon.close {
-    position: absolute;
-    right: $lineheight;
-  }
-
-  .footer {
-    position: absolute;
-    bottom: 0;
-  }
-
-  p.credits {
-    font-size: 11px;
-    color: #999;
-
-    a {
-      color: #666;
-    }
-  }
-}
-
 .sidebar_heading {
   position: relative;
   padding: $lineheight/2 $lineheight;
@@ -819,6 +777,103 @@ nav.secondary {
   bottom: 0;
   width: 100%;
   overflow-y: auto;
+
+  .loader,
+  .load_more {
+    text-align: center;
+    margin: $lineheight auto;
+    width: $lineheight;
+    display: block;
+  }
+}
+
+/* Rules for the search box */
+
+#search_form {
+  position: relative;
+  padding: $lineheight;
+  background-color: $lightgrey;
+  border-bottom: $keyline;
+
+  #query_wrapper {
+    position: relative;
+    overflow: hidden;
+  }
+
+  input {
+    width: 100%;
+    height: 30px;
+    border-right: none;
+    border-radius: 2px 0 0 2px;
+
+    transition: 300ms linear;
+    -webkit-transition: 300ms linear;
+    -moz-transition: 300ms linear;
+  }
+
+  input:focus {
+    outline: none;
+    box-shadow: 0px 0px 7px #9ED485;
+  }
+
+  input[type=submit] {
+    float: right;
+    width: auto;
+    min-width: 0;
+    border-radius: 0 2px 2px 0;
+  }
+
+  #describe_location {
+    position: absolute;
+    top: 6px;
+    right: 6px;
+    font-size: 10px;
+    color: $blue;
+  }
+}
+
+/* Rules for donation request box */
+
+a.donate {
+  display: block;
+  width: 163px;
+  padding: $lineheight/4;
+  border: 1px solid #AED1A0;
+  background: #cbeea7;
+  font-size: $typeheight;
+  line-height: 1.4;
+  text-align: center;
+  border-radius: 2px;
+  color: #222;
+  margin: $lineheight/2 auto;
+
+  &:hover {
+    background: #9ed485;
+    text-decoration: none;
+  }
+}
+
+/* Rules for rotating sidebar ads */
+
+.ad-container {
+  display: block;
+  height: 120px;
+  margin: auto;
+  overflow: hidden;
+  position: relative;
+  border-bottom: 1px solid #ccc;
+
+  a {
+    display: block;
+    width: 165px;
+    margin: auto;
+  }
+
+  .ad {
+    height: 100px;
+    border: 0;
+    background: #fff;
+  }
 }
 
 /* Rules for the map key which appears in the popout sidebar */
@@ -836,19 +891,7 @@ nav.secondary {
 
 /* Rules for search results which appear in the popout sidebar */
 
-.search_searching {
-  margin-top: $lineheight/4;
-  margin-bottom: $lineheight/4;
-}
-
 .search_results_entry {
-  .search_searching {
-    text-align: center;
-    margin: $lineheight auto;
-    width: $lineheight;
-    display: block;
-  }
-
   ul li {
     border-bottom: 1px solid #ccc;
   }
@@ -895,6 +938,97 @@ nav.secondary {
   display: none;
 }
 
+/* Rules for the changeset list shown by the history tab */
+
+#sidebar .changesets {
+  li {
+    padding: $lineheight;
+    border-bottom: $keyline;
+    cursor: pointer;
+  }
+
+  li.selected {
+    background: #FCFEA4;
+  }
+}
+
+/* Rules for the data browser */
+
+#sidebar_content {
+  .browse-section {
+    padding: 20px;
+    border-bottom: 1px solid #CCC;
+  }
+
+  .browse-field {
+    margin-bottom: 10px;
+
+    h4 {
+      padding: 5px 0 5px 10px;
+      font-size: 12px;
+      border: 1px solid #CCC;
+      border-radius: 4px 4px 0 0;
+      background-color: #F6F6F6;
+    }
+
+    p {
+      padding: 7px 10px;
+      font-size: 12px;
+      background-color: #FFF;
+      border: 1px solid #CCC;
+      border-top: 0;
+      border-radius: 0 0 4px 4px;
+    }
+  }
+
+  .browse-tag-list {
+    border: 1px solid #CCC;
+    border-radius: 4px;
+    font-size: 12px;
+
+    li {
+      border-bottom: 1px solid #CCC;
+    }
+
+    li:last-child {
+      border-bottom: 0;
+    }
+
+    .browse-tag-k,
+    .browse-tag-v {
+      display: inline-block;
+      width: 50%;
+      height: 30px;
+      float: left;
+      padding: 6px 10px;
+    }
+
+    .browse-tag-k {
+      font-weight: bold;
+      background-color: #F6F6F6;
+      border-radius: 4px 0 0 4px;
+    }
+
+    .browse-tag-v {
+      border-left: 1px solid #CCC;
+    }
+  }
+}
+
+/* Rules for the changeset details */
+
+#sidebar_content {
+  .browse-section.header {
+    padding: 20px;
+    border-bottom: 1px solid #CCC;
+
+    h2 {
+      padding: 0 0 5px 0;
+      border-bottom: none;
+    }
+  }
+}
+
 /* Rules for export information which appears in the popout sidebar */
 
 .export_bounds {
@@ -913,13 +1047,9 @@ nav.secondary {
   margin: $lineheight/4;
 }
 
-/* Rules for the sidebar and main content area */
+/* Rules for edit pages */
 
-.site-index,
-.site-export,
-.site-edit,
-.changeset-list,
-.browse {
+.site-edit {
   #content {
     position: absolute;
     top: $headerHeight;
@@ -927,19 +1057,13 @@ nav.secondary {
     width: 100%;
   }
 
-  #sidebar, #map {
-    position: relative;
+  #map {
     height: 100%;
-    overflow-x: hidden;
-    overflow-y: auto;
-  }
-
-  #sidebar {
-    float: left;
-    width: $sidebarWidth;
   }
 }
 
+/* Rules for non-map content pages */
+
 .content-heading {
   background: $lightgrey;
   border-bottom: $keyline;
@@ -1074,78 +1198,6 @@ nav.secondary {
   float: right;
 }
 
-/* Rules for the changeset list shown by the history tab */
-
-#sidebar .changesets {
-  li {
-    padding: $lineheight;
-    border-bottom: $keyline;
-  }
-}
-
-/* Rules for the data browser */
-
-body.browse #sidebar_content {
-  .browse-section {
-    padding: 20px;
-    border-bottom: 1px solid #CCC;
-  }
-
-  .browse-field {
-    margin-bottom: 10px;
-
-    h4 {
-      padding: 5px 0 5px 10px;
-      font-size: 12px;
-      border: 1px solid #CCC;
-      border-radius: 4px 4px 0 0;
-      background-color: #F6F6F6;
-    }
-
-    p {
-      padding: 7px 10px;
-      font-size: 12px;
-      background-color: #FFF;
-      border: 1px solid #CCC;
-      border-top: 0;
-      border-radius: 0 0 4px 4px;
-    }
-  }
-
-  .browse-tag-list {
-    border: 1px solid #CCC;
-    border-radius: 4px;
-    font-size: 12px;
-
-    li {
-      border-bottom: 1px solid #CCC;
-    }
-
-    li:last-child {
-      border-bottom: 0;
-    }
-
-    .browse-tag-k,
-    .browse-tag-v {
-      display: inline-block;
-      width: 50%;
-      height: 30px;
-      float: left;
-      padding: 9px 10px;
-    }
-
-    .browse-tag-k {
-      font-weight: bold;
-      background-color: #F6F6F6;
-      border-radius: 4px 0 0 4px;
-    }
-
-    .browse-tag-v {
-      border-left: 1px solid #CCC;
-    }
-  }
-}
-
 /* Rules for the trace list shown by the traces tab etc */
 
 #trace_list {
@@ -1525,17 +1577,19 @@ body.browse #sidebar_content {
 
 /* Rules for "flash" notice boxes shown at the top of the content area */
 
-.flash {
-    padding: $lineheight;
-  &#error {
-    background-color: #ff7070;
-  }
-  &#warning {
-    background-color: #ffe0cc;
-  }
-  &#notice {
-    background-color: #CBEEA7;
-  }
+.error {
+  padding: $lineheight;
+  background-color: #ff7070;
+}
+
+.warning {
+  padding: $lineheight;
+  background-color: #ffe0cc;
+}
+
+.notice {
+  padding: $lineheight;
+  background-color: #CBEEA7;
 }
 
 /* Rules for highlighting fields with rails validation errors */
@@ -2066,37 +2120,13 @@ a.button {
   }
 }
 
-/*
- * Rules for the iD editor
- */
+/* Rules for the iD editor */
 
 .id-embed {
   width: 100%;
   height: 100%;
 }
 
-/* Rules for rotating sidebar ads */
-.ad-container {
-  display: block;
-  height: 120px;
-  margin: auto;
-  overflow: hidden;
-  position: relative;
-  border-bottom: 1px solid #ccc;
-
-  a {
-    display: block;
-    width: 165px;
-    margin: auto;
-  }
-
-  .ad {
-    height: 100px;
-    border: 0;
-    background: #fff;
-  }
-}
-
 /* Rules for dropdown menus */
 
 .dropdown {
@@ -2440,3 +2470,5 @@ a.button {
     &.infringement { background-position: 0px -160px; }
   }
 }
+
+@import 'browse';