]> git.openstreetmap.org Git - rails.git/commitdiff
Remove list style reset, and add overrides where necessary
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Jan 2020 14:51:29 +0000 (15:51 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Jan 2020 16:16:11 +0000 (17:16 +0100)
This allows the bootstrap list typography to work without being overridden. It also means
that lists look like normal lists by default, instead of needing to be recreated from
scratch each time. Only the cases where padding and discs are unwanted need to have
custom CSS.

app/assets/stylesheets/common.scss
app/views/browse/changeset.html.erb
app/views/issues/show.html.erb
app/views/reports/new.html.erb

index b1bdb712f9319ef1221ee8a2107477e3890920e1..0ea8949a721467036475118104e452903d24b685 100644 (file)
@@ -5,7 +5,7 @@
 
 /* Minimal CSS reset */
 
 
 /* Minimal CSS reset */
 
-html, body, ul, ol, li, form, fieldset, legend, input {
+html, body, form, fieldset, legend, input {
   margin: 0;
   padding: 0;
   border: 0;
   margin: 0;
   padding: 0;
   border: 0;
@@ -30,8 +30,6 @@ table {
   border-spacing: 0;
 }
 
   border-spacing: 0;
 }
 
-li { list-style: none; }
-
 input,
 select,
 textarea,
 input,
 select,
 textarea,
@@ -251,6 +249,7 @@ header {
 
 nav.primary {
   > ul {
 
 nav.primary {
   > ul {
+    padding: 0;
     $border: 1px solid $green;
 
     border: $border;
     $border: 1px solid $green;
 
     border: $border;
@@ -317,6 +316,9 @@ nav.secondary {
 
   > ul {
     vertical-align: middle;
 
   > ul {
     vertical-align: middle;
+    margin: 0;
+    padding: 0;
+
     a, .dropdown-toggle {
       display: inline-block;
       text-decoration: none;
     a, .dropdown-toggle {
       display: inline-block;
       text-decoration: none;
@@ -336,6 +338,7 @@ nav.secondary {
     border: $border;
     border-radius: $border-radius;
     margin-left: 10px;
     border: $border;
     border-radius: $border-radius;
     margin-left: 10px;
+    padding: 0;
 
     > li {
       border-right: $border;
 
     > li {
       border-right: $border;
@@ -1002,9 +1005,14 @@ header .search_forms,
 /* Rules for search sidebar */
 
 #sidebar .search_results_entry {
 /* Rules for search sidebar */
 
 #sidebar .search_results_entry {
+  ul {
+   padding: 0;
+  }
+
   ul li {
     border-bottom: $keyline;
     cursor: pointer;
   ul li {
     border-bottom: $keyline;
     cursor: pointer;
+    list-style-type: none;
     &:first-child { border-top: $keyline; }
     &.selected { background: $list-highlight; }
   }
     &:first-child { border-top: $keyline; }
     &.selected { background: $list-highlight; }
   }
@@ -1123,10 +1131,6 @@ tr.turn:hover {
     border-radius: 3px;
   }
 
     border-radius: 3px;
   }
 
-  .paginate ul {
-    padding-left: 20px;
-  }
-
   .browse-field {
     margin-bottom: 10px;
 
   .browse-field {
     margin-bottom: 10px;
 
@@ -1507,10 +1511,6 @@ tr.turn:hover {
   margin-bottom: 0;
 }
 
   margin-bottom: 0;
 }
 
-#friends-container .contact-activity ul {
-  margin-left: 70px;
-}
-
 .users-show {
   // Silly exception; remove when user page is redesigned.
   .content-inner {
 .users-show {
   // Silly exception; remove when user page is redesigned.
   .content-inner {
@@ -1908,15 +1908,6 @@ tr.turn:hover {
     margin-bottom: 0px;
     padding: $lineheight/4;
   }
     margin-bottom: 0px;
     padding: $lineheight/4;
   }
-
-  ul {
-    padding-left: $lineheight;
-
-    li {
-      font-size: 12px;
-      list-style: disc;
-    }
-  }
 }
 
 /* Rules for forms */
 }
 
 /* Rules for forms */
@@ -1960,7 +1951,8 @@ tr.turn:hover {
   }
   .form-list li {
     margin-bottom: 5px;
   }
   .form-list li {
     margin-bottom: 5px;
-   }
+    list-style-type: none;
+  }
   input[type="checkbox"],
   input[type="radio"] {
     float: left;
   input[type="checkbox"],
   input[type="radio"] {
     float: left;
@@ -2044,6 +2036,7 @@ ul.secondary-actions {
   font-style: normal;
   margin-bottom: 0;
   margin-left: 0;
   font-style: normal;
   margin-bottom: 0;
   margin-left: 0;
+  padding: 0;
   &.pager {
     display: inline-block;
     margin-right: 60px;
   &.pager {
     display: inline-block;
     margin-right: 60px;
@@ -2238,20 +2231,6 @@ a.button {
     margin: 0;
     color: $darkgrey;
   }
     margin: 0;
     color: $darkgrey;
   }
-
-  ul, ol {
-    padding-left: $lineheight;
-    margin-bottom: $lineheight;
-    margin-left: $lineheight;
-  }
-
-  ul > li {
-    list-style: disc;
-  }
-
-  ol > li {
-    list-style: decimal;
-  }
 }
 
 .diary_post .richtext {
 }
 
 .diary_post .richtext {
@@ -2689,30 +2668,8 @@ input.richtext_title[type="text"] {
   opacity: 0.7;
 }
 
   opacity: 0.7;
 }
 
-.related-reports {
-  ul {
-    padding-left: $lineheight;
-    margin-bottom: 0;
-
-    li {
-      list-style: disc;
-    }
-  }
-}
-
 .issues-list {
   td:nth-child(2) {
     white-space: nowrap;
   }
 }
 .issues-list {
   td:nth-child(2) {
     white-space: nowrap;
   }
 }
-
-.report-disclaimer {
-  ul {
-    padding-left: $lineheight;
-    margin-bottom: 0;
-
-    li {
-      list-style: disc;
-    }
-  }
-}
index 148cb5a8807fcd70fb3b8098e23ffce1c2b4fd6f..76112e41eadb5c9ed165a0a008baacc5b101c7c6 100644 (file)
@@ -89,7 +89,7 @@
       <%= type_and_paginated_count("way", @way_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @way_pages, :page_param => "way_page" } %>
     </h4>
       <%= type_and_paginated_count("way", @way_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @way_pages, :page_param => "way_page" } %>
     </h4>
-    <ul>
+    <ul class="list-unstyled">
       <% @ways.each do |way| %>
         <li><%= link_to printable_name(way, true), { :action => "way", :id => way.way_id.to_s }, { :class => link_class("way", way), :title => link_title(way) } %></li>
       <% end %>
       <% @ways.each do |way| %>
         <li><%= link_to printable_name(way, true), { :action => "way", :id => way.way_id.to_s }, { :class => link_class("way", way), :title => link_title(way) } %></li>
       <% end %>
       <%= type_and_paginated_count("relation", @relation_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
     </h4>
       <%= type_and_paginated_count("relation", @relation_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
     </h4>
-    <ul>
+    <ul class="list-unstyled">
       <% @relations.each do |relation| %>
         <li><%= link_to printable_name(relation, true), { :action => "relation", :id => relation.relation_id.to_s }, { :class => link_class("relation", relation), :title => link_title(relation) } %></li>
       <% end %>
       <% @relations.each do |relation| %>
         <li><%= link_to printable_name(relation, true), { :action => "relation", :id => relation.relation_id.to_s }, { :class => link_class("relation", relation), :title => link_title(relation) } %></li>
       <% end %>
       <%= type_and_paginated_count("node", @node_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @node_pages, :page_param => "node_page" } %>
     </h4>
       <%= type_and_paginated_count("node", @node_pages) %>
       <%= render :partial => "paging_nav", :locals => { :pages => @node_pages, :page_param => "node_page" } %>
     </h4>
-    <ul>
+    <ul class="list-unstyled">
       <% @nodes.each do |node| %>
         <li><%= link_to printable_name(node, true), { :action => "node", :id => node.node_id.to_s }, { :class => link_class("node", node), :title => link_title(node), :rel => link_follow(node) } %></li>
       <% end %>
       <% @nodes.each do |node| %>
         <li><%= link_to printable_name(node, true), { :action => "node", :id => node.node_id.to_s }, { :class => link_class("node", node), :title => link_title(node), :rel => link_follow(node) } %></li>
       <% end %>
index 24a74c728ef0600f31cedd0438d64a419d1cddd0..5efa6a1bb776b754cb86129622fec24faac88fbf 100644 (file)
@@ -39,7 +39,7 @@
   </div>
 
   <% if @issue.reported_user %>
   </div>
 
   <% if @issue.reported_user %>
-    <div class="col-md-4 related-reports">
+    <div class="col-md-4">
       <h3><%= t ".other_issues_against_this_user" %></h3>
       <% if @related_issues.count > 1 %>
         <ul>
       <h3><%= t ".other_issues_against_this_user" %></h3>
       <% if @related_issues.count > 1 %>
         <ul>
index aad0d801b732b3aa5d56da3b5080b2af72047e6e..a29104ae7874a7a7569b7fc760437d931a582dec 100644 (file)
@@ -2,9 +2,9 @@
   <h1><%= t ".title_html", :link => link_to(reportable_title(@report.issue.reportable), reportable_url(@report.issue.reportable)) %></h1>
 <% end %>
 
   <h1><%= t ".title_html", :link => link_to(reportable_title(@report.issue.reportable), reportable_url(@report.issue.reportable)) %></h1>
 <% end %>
 
-<div class="alert alert-warning report-disclaimer">
+<div class="alert alert-warning">
   <%= t(".disclaimer.intro") %>
   <%= t(".disclaimer.intro") %>
-  <ul>
+  <ul class="mb-0">
     <li> <%= t(".disclaimer.not_just_mistake") %> </li>
     <li> <%= t(".disclaimer.unable_to_fix") %> </li>
     <li> <%= t(".disclaimer.resolve_with_user") %> </li>
     <li> <%= t(".disclaimer.not_just_mistake") %> </li>
     <li> <%= t(".disclaimer.unable_to_fix") %> </li>
     <li> <%= t(".disclaimer.resolve_with_user") %> </li>
@@ -13,7 +13,7 @@
 
 <%= form_for(@report) do |f| %>
   <%= f.error_messages %>
 
 <%= form_for(@report) do |f| %>
   <%= f.error_messages %>
-  <fieldset>
+  <fieldset class="standard-form">
     <%= f.fields_for @report.issue do |issue_form| %>
       <%= issue_form.hidden_field :reportable_id %>
       <%= issue_form.hidden_field :reportable_type %>
     <%= f.fields_for @report.issue do |issue_form| %>
       <%= issue_form.hidden_field :reportable_id %>
       <%= issue_form.hidden_field :reportable_type %>
 
     <div class='standard-form-row'>
       <p><%= t(".select") %></p>
 
     <div class='standard-form-row'>
       <p><%= t(".select") %></p>
-      <ul>
+      <ul class="form-list">
       <% Report.categories_for(@report.issue.reportable).each do |c| %>
         <li>
           <%= radio_button :report, :category, c, :required => true %>
       <% Report.categories_for(@report.issue.reportable).each do |c| %>
         <li>
           <%= radio_button :report, :category, c, :required => true %>
-          <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %> <br />
+          <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %>
         </li>
       <% end %>
       </ul>
         </li>
       <% end %>
       </ul>