Skip to content

Commit

Permalink
Reset <dl> styles in important-metadata component
Browse files Browse the repository at this point in the history
This component was probably relying on a reset stylesheet that has been removed and now adds the browser default margins to the dl and dd elements. We reset those values in the component stylesheet.
  • Loading branch information
alex-ju committed Mar 3, 2022
1 parent add72c3 commit 5ef73b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/components/_important-metadata.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@
margin-bottom: 5px;
}

.app-c-important-metadata__list {
margin: 0;
}

.app-c-important-metadata__term {
float: left;
padding-right: govuk-spacing(1);
}

.app-c-important-metadata__definition {
margin: 0;
font-weight: bold;
}
2 changes: 1 addition & 1 deletion app/views/components/_important-metadata.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% if title %>
<h2 class="app-c-important-metadata__title"><%= sanitize title %></h2>
<% end %>
<dl data-module="gem-track-click">
<dl class="app-c-important-metadata__list" data-module="gem-track-click">
<% items.each do |title, definition| %>
<dt class="app-c-important-metadata__term"><%= sanitize title.to_s %>: </dt>
<dd class="app-c-important-metadata__definition"><%= sanitize definition %></dd>
Expand Down

0 comments on commit 5ef73b6

Please sign in to comment.