From 65c3c2a91558a88ceea3c772d2b290281c642c9c Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 15 Jan 2020 15:51:29 +0100 Subject: [PATCH] Remove list style reset, and add overrides where necessary 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 | 71 ++++++----------------------- app/views/browse/changeset.html.erb | 6 +-- app/views/issues/show.html.erb | 2 +- app/views/reports/new.html.erb | 10 ++-- 4 files changed, 23 insertions(+), 66 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index b1bdb712f..0ea8949a7 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -5,7 +5,7 @@ /* Minimal CSS reset */ -html, body, ul, ol, li, form, fieldset, legend, input { +html, body, form, fieldset, legend, input { margin: 0; padding: 0; border: 0; @@ -30,8 +30,6 @@ table { border-spacing: 0; } -li { list-style: none; } - input, select, textarea, @@ -251,6 +249,7 @@ header { nav.primary { > ul { + padding: 0; $border: 1px solid $green; border: $border; @@ -317,6 +316,9 @@ nav.secondary { > ul { vertical-align: middle; + margin: 0; + padding: 0; + a, .dropdown-toggle { display: inline-block; text-decoration: none; @@ -336,6 +338,7 @@ nav.secondary { border: $border; border-radius: $border-radius; margin-left: 10px; + padding: 0; > li { border-right: $border; @@ -1002,9 +1005,14 @@ header .search_forms, /* Rules for search sidebar */ #sidebar .search_results_entry { + ul { + padding: 0; + } + ul li { border-bottom: $keyline; cursor: pointer; + list-style-type: none; &:first-child { border-top: $keyline; } &.selected { background: $list-highlight; } } @@ -1123,10 +1131,6 @@ tr.turn:hover { border-radius: 3px; } - .paginate ul { - padding-left: 20px; - } - .browse-field { margin-bottom: 10px; @@ -1507,10 +1511,6 @@ tr.turn:hover { margin-bottom: 0; } -#friends-container .contact-activity ul { - margin-left: 70px; -} - .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; } - - ul { - padding-left: $lineheight; - - li { - font-size: 12px; - list-style: disc; - } - } } /* Rules for forms */ @@ -1960,7 +1951,8 @@ tr.turn:hover { } .form-list li { margin-bottom: 5px; - } + list-style-type: none; + } input[type="checkbox"], input[type="radio"] { float: left; @@ -2044,6 +2036,7 @@ ul.secondary-actions { font-style: normal; margin-bottom: 0; margin-left: 0; + padding: 0; &.pager { display: inline-block; margin-right: 60px; @@ -2238,20 +2231,6 @@ a.button { 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 { @@ -2689,30 +2668,8 @@ input.richtext_title[type="text"] { 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; } } - -.report-disclaimer { - ul { - padding-left: $lineheight; - margin-bottom: 0; - - li { - list-style: disc; - } - } -} diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 148cb5a88..76112e41e 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -89,7 +89,7 @@ <%= type_and_paginated_count("way", @way_pages) %> <%= render :partial => "paging_nav", :locals => { :pages => @way_pages, :page_param => "way_page" } %> -