Skip to content

Commit

Permalink
Remove task list indentation with no section title
Browse files Browse the repository at this point in the history
We only want the indentation with a section title as it lines up with
the number of the section.
  • Loading branch information
syed87 authored and thomasleese committed Nov 8, 2023
1 parent 731874c commit 244b18a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/assets/stylesheets/_task_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
}
}

.app-task-list__items-no-indentation {
@include govuk-font($size: 19);
@include govuk-responsive-margin(9, "bottom");
list-style: none;
padding-left: 0;
}

.app-task-list__items {
@include govuk-font($size: 19);
@include govuk-responsive-margin(9, "bottom");
Expand Down
2 changes: 1 addition & 1 deletion app/components/task_list/component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= section[:title] %>
</h2>

<ul class="app-task-list__items">
<ul class="<%= section[:title].present? ? 'app-task-list__items' : 'app-task-list__items-no-indentation' %>">
<% section[:items].each do |item| %>
<li class="app-task-list__item">
<% status_id = "#{section[:number]}-#{section[:key]}-#{item[:key]}-status" %>
Expand Down

0 comments on commit 244b18a

Please sign in to comment.