]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/stylesheets/common.css.scss
Make more use of SCSS nesting
[rails.git] / app / assets / stylesheets / common.css.scss
index 12a4f2b4517460cbb59792b270f24e0e134c93a3..5aebc464b2775ed37a56700cb6356f30085bcf9f 100644 (file)
@@ -214,12 +214,10 @@ table {
 
 .sidebar-copy {
   padding: 5px 10px;
+  p {
+    margin: 5px 0;
+  }
 }
-
-.sidebar-copy p {
-  margin: 5px 0;
-}
-
 .sidebar-copy.intro {
   border-top: 1px solid #ccc;
 }
@@ -272,31 +270,30 @@ table {
   list-style-type: none;
   border-bottom: 1px solid #ccc;
   border-top: 1px solid #ccc;
-}
-
-.left_menu img {
-  margin: 10px 0px;
-}
-
-.left_menu ul {
-  padding: 0;
-  margin: 0;
-}
-
-.left_menu li {
-  list-style-type: none;
-  padding: 0;
-  margin: 0;
-}
-
-.left_menu h4 {
-  padding: 5px 0 5px 0;
-  font-size: 12px;
-  margin: 0;
-}
+  img {
+    margin: 10px 0px;
+  }
 
-.left_menu li:last-child h4 {
-  padding-top: 0;
+  ul {
+    padding: 0;
+    margin: 0;
+  }
+  
+  li {
+    list-style-type: none;
+    padding: 0;
+    margin: 0;
+  }
+  
+  h4 {
+    padding: 5px 0 5px 0;
+    font-size: 12px;
+    margin: 0;
+  }
+  
+  li:last-child h4 {
+    padding-top: 0;
+  }
 }
 
 /* Rules for SOTM advert */
@@ -307,10 +304,9 @@ table {
   padding: 0px;
   border: 0px;
   background: #fff;
-}
-
-#sotm img {
-  width: 165px;
+  img {
+    width: 165px;
+  }
 }
 
 /*
@@ -328,42 +324,42 @@ table {
 
 /* Rules for the search box */
 
-#search_field form {
-  width: 165px;
-}
-
 #search_field {
   position: relative;
-}
-
-#search_field input[type="text"] {
-  width: 165px;
-  padding: 3px;
-  font-size: 14px;
-  line-height: 1.1;
-  height: 25px;
-  padding: 2px 0px 2px 5px;
-  box-shadow: inset #DDD 0px 1px 3px;
-}
 
-#search_field input[type="text"]:focus {
-  outline: none;
-  border: 1px solid #000;
-}
-
-#search_field input[type="submit"] {
-  border: 0;
-  margin: 0;
-  padding: 0;
-  width: 15px;
-  height: 15px;
-  text-indent: -1000px;
-  overflow: hidden;
-  background: image-url("sprite.png") 0 0 no-repeat;
-  position: absolute;
-  top: 5px;
-  right: 5px;
-  cursor: pointer;
+  form {
+    width: 165px;
+  }
+  
+  input[type="text"] {
+    width: 165px;
+    padding: 3px;
+    font-size: 14px;
+    line-height: 1.1;
+    height: 25px;
+    padding: 2px 0px 2px 5px;
+    box-shadow: inset #DDD 0px 1px 3px;
+  }
+  
+  input[type="text"]:focus {
+    outline: none;
+    border: 1px solid #000;
+  }
+  
+  input[type="submit"] {
+    border: 0;
+    margin: 0;
+    padding: 0;
+    width: 15px;
+    height: 15px;
+    text-indent: -1000px;
+    overflow: hidden;
+    background: image-url("sprite.png") 0 0 no-repeat;
+    position: absolute;
+    top: 5px;
+    right: 5px;
+    cursor: pointer;
+  }
 }
 
 .search_help {
@@ -435,24 +431,22 @@ table {
   height: 30px;
   margin-bottom:0;
   overflow: hidden;
-}
-
-#tabnav li {
-  display: inline;
-}
-
-#tabnav a, #tabnav a:link, #tabnav a:visited {
-  float: left;
-  font-weight: bold;
-  padding: 3px 10px;
-  text-decoration: none;
-  color: #333;
-  float: left;
-  margin-right: 1px;
-  -webkit-transition: color 200ms ease-in;
-     -moz-transition: color 200ms ease-in;
-       -o-transition: color 200ms ease-in;
-          transition: color 200ms ease-in;
+  li {
+    display: inline;
+  }
+  a, a:link, a:visited {
+    float: left;
+    font-weight: bold;
+    padding: 3px 10px;
+    text-decoration: none;
+    color: #333;
+    float: left;
+    margin-right: 1px;
+    -webkit-transition: color 200ms ease-in;
+       -moz-transition: color 200ms ease-in;
+         -o-transition: color 200ms ease-in;
+            transition: color 200ms ease-in;
+  }
 }
 
 .site-index #tabnav a#viewanchor,
@@ -474,13 +468,9 @@ table {
 #tabnav a:visited:hover.disabled {
   color: #ccc;
   cursor: default;
-}
-
-#tabnav a:link.disabled:hover,
-#tabnav a:visited.disabled:hover,
-#tabnav a:link:hover.disabled:hover,
-#tabnav a:visited:hover.disabled:hover {
-  text-decoration: none;
+  &:hover {
+    text-decoration: none;
+  }
 }
 
 /* Utility for styling notification numbers */
@@ -576,16 +566,14 @@ table {
   background-color: #ffffff;
   border: 1px solid #cccccc;
   border-top: 0px;
-}
-
-.menu ul {
-  margin: 0px;
-}
-
-.menu li {
-  padding: 2px 5px;
-  border-top: 1px solid #eee;
-  white-space: nowrap;
+  ul {
+    margin: 0px;
+  }
+  li {
+    padding: 2px 5px;
+    border-top: 1px solid #eee;
+    white-space: nowrap;
+  }
 }
 
 /* Rules for attribution text under the main map shown on printouts */
@@ -660,16 +648,14 @@ table {
 
 #mapkey {
   padding: 20px;
-}
-
-#mapkey .mapkey-table-key img {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-#mapkey td {
-  padding: 0 5px 5px 5px;
+ .mapkey-table-key img {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+  }
+  td {
+    padding: 0 5px 5px 5px;
+  }
 }
 
 /* Rules for search results which appear in the popout sidebar */
@@ -828,12 +814,11 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   position: absolute;
   top: 0px;
   margin-right: 5px;
-}
-
-#slim_header img {
-  vertical-align: middle;
-  margin-bottom: 5px;
-  margin-right: 5px;
+  img {
+    vertical-align: middle;
+    margin-bottom: 5px;
+    margin-right: 5px;
+  }
 }
 
 .content-heading {
@@ -1005,31 +990,31 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   font-size: 10px;
   border-width: 0px;
   text-align: right;
-}
-
-#trace_list .trace_summary {
-  font-size: 12px;
-  color: gray;
-}
-
-#trace_list .trace_pending {
-  color: red;
-}
-
-#trace_list .trace_public {
-  color: green;
-}
-
-#trace_list .trace_identifiable {
-  color: green;
-}
-
-#trace_list .trace_trackable {
-  color: red;
-}
-
-#trace_list .trace_private {
-  color: red;
+  
+  .trace_summary {
+    font-size: 12px;
+    color: gray;
+  }
+  
+  .trace_pending {
+    color: red;
+  }
+  
+  .trace_public {
+    color: green;
+  }
+  
+  .trace_identifiable {
+    color: green;
+  }
+  
+  .trace_trackable {
+    color: red;
+  }
+  
+  .trace_private {
+    color: red;
+  }
 }
 
 /* Rules for the user profile page */
@@ -1081,13 +1066,14 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   margin-left: 72px;
   }
 
-.user-view p#no_home_location {
-  margin: 20px;
-}
-
-.user-view .user_thumbnail {
-  margin-top: 5px;
-  float: left;
+.user-view {
+  p#no_home_location {
+    margin: 20px;
+  }
+  .user_thumbnail {
+    margin-top: 5px;
+    float: left;
+  }
 }
 
 /* Rules for the user map */
@@ -1101,25 +1087,20 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 
 .user_popup {
   min-width: 200px;
-}
 
-.user_popup p {
-  padding-top:0;
-  padding-bottom: 5px;
-  margin-top: 0;
-}
-
-.user_popup img.user_thumbnail {
-  float: left;
-  margin: 0 10px 0 0;
-}
-
-/* Rules for user popups on maps */
-
-.user_popup p {
-  margin-bottom: 0;
-  margin-left: 60px;
-  font-size: 12px;
+  p {
+    padding-top: 0;
+    padding-bottom: 5px;
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 60px;
+    font-size: 12px;
+  }
+  
+  img.user_thumbnail {
+    float: left;
+    margin: 0 10px 0 0;
+  }
 }
 
 /* Rules for the user list */
@@ -1127,15 +1108,15 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 #user_list {
   font-size: 10px;
   width: 100%;
-}
 
-#user_list tr {
-  vertical-align: middle;
-}
-
-#user_list p {
-  margin-top: 0px;
-  margin-bottom: 0px;
+  tr {
+    vertical-align: middle;
+  }
+  
+  p {
+    margin-top: 0px;
+    margin-bottom: 0px;
+  }
 }
 
 #user_list_actions {
@@ -1288,14 +1269,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 
 /* Rules for the account settings page */
 
-#accountForm {
-  margin-top: 20px;
-}
-
-#accountForm td {
-  padding-bottom: 10px;
-}
-
 #accountForm .user_map {
   position: relative;
   width: 500px;
@@ -1320,10 +1293,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   display: inline !important;
 }
 
-#accountForm input[type=submit] {
-  margin-top: 15px;
-}
-
 .content_map.settings_map {
   float: none;
   width: 50%;
@@ -1334,27 +1303,27 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 .messages {
   width: 100%;
   border: 1px solid #ddd;
-}
 
-.messages tbody tr {
-  border-top: 1px solid #ccc;
-}
-
-.messages .inbox-row {
-  background: #f8f8ff;
-}
-
-.messages .inbox-row-unread {
-  background:#CBEEA7;
-}
-
-.right {
-  float: right;
-}
-
-.messages tr td,
-.messages tr th {
-  padding: 5px;
+  tbody tr {
+    border-top: 1px solid #ccc;
+  }
+  
+  .inbox-row {
+    background: #f8f8ff;
+  }
+  
+  .inbox-row-unread {
+    background:#CBEEA7;
+  }
+  
+  .right {
+    float: right;
+  }
+  
+  tr td,
+  tr th {
+    padding: 5px;
+  }
 }
 
 .inbox-row .inbox-mark-read {
@@ -1365,11 +1334,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   margin-bottom: 20px;
   padding: 5px 0px 4px 0px;
   border-bottom: 1px solid #ccc;
-}
 
-.info-line form,
-.info-line form div {
-  display: inline;
+  form, form div {
+    display: inline;
+  }
 }
 
 .info-line .user_thumbnail_tiny {
@@ -1411,50 +1379,49 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   padding: 10px;
   margin-bottom: 20px;
   background-color: #f0f0f0;
-}
-
-#errorExplanation h2 {
-  margin: -10px;
-  padding: 5px 5px 5px 15px;
-  font-weight: bold;
-  font-size: 12px;
-  background-color: #c00;
-  color: #fff;
-  text-align: left;
-}
+  h2 {
+    margin: -10px;
+    padding: 5px 5px 5px 15px;
+    font-weight: bold;
+    font-size: 12px;
+    background-color: #c00;
+    color: #fff;
+    text-align: left;
+  }
 
-#errorExplanation p {
-  color: #333;
-  margin-bottom: 0px;
-  padding: 5px;
-}
+  p {
+    color: #333;
+    margin-bottom: 0px;
+    padding: 5px;
+  }
+  
+  ul li {
+    font-size: 12px;
+    list-style: disc;
+  }
 
-#errorExplanation ul li {
-  font-size: 12px;
-  list-style: disc;
 }
 
 /* Rules for forms */
 
-.standard-form fieldset {
-  margin-bottom: 20px;
-}
-
-.standard-form label {
-  display: block;
-  width: 300px;
-  margin-right: 10px;
-  font-size: 14px;
-  font-weight: bold;
-  line-height: 1.5;
-}
-
-.standard-form .form-row {
-  margin-bottom: 10px;
-}
-
-.standard-form input[name=remember_me] {
-  float: left;
+.standard-form {
+  fieldset {
+    margin-bottom: 20px;
+  }
+  label {
+    display: block;
+    width: 300px;
+    margin-right: 10px;
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 1.5;
+  }
+  .form-row {
+    margin-bottom: 10px;
+  }
+  input[name=remember_me] {
+    float: left;
+  }
 }
 
 #remember_me_openid {
@@ -1743,6 +1710,20 @@ a.button.submit {
       margin-right: 10px;
     }
   }
+
+  .buttons input[type="submit"] {
+    display: inline-block;
+    margin-bottom:0;
+    width:99px;
+    min-width:99px;
+  }
+  .buttons input:first-child {
+    border-radius:2px 0 0 2px;
+    margin-right:1px;
+  }
+  .buttons input:last-child {
+    border-radius:0 2px 2px 0;
+  }
 }
 
 /* Rules for the user notes list */