Skip to content

Commit

Permalink
Move caption styling to selectable css
Browse files Browse the repository at this point in the history
It was implemented in a style attribute, but would be better places in
the selectable table's CSS
  • Loading branch information
rossjones committed Sep 26, 2024
1 parent 319646b commit b042a7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/importer/assets/css/selectable_table.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ table.selectable {

table.selectable caption {
text-align: inherit;
white-space: nowrap;
overflow: hidden;
}

table.selectable col:not(:first-child) {
Expand Down
4 changes: 1 addition & 3 deletions lib/importer/nunjucks/importer/macros/range_selector.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

<table class="selectable govuk-body" data-persist-selection="true">
{% if caption %}
<caption
class="govuk-table__caption govuk-table__caption--m"
style="white-space: nowrap; overflow: hidden;">{{caption}}</caption>
<caption class="govuk-table__caption govuk-table__caption--m">{{caption}}</caption>
{% endif %}
<tbody>
{% for row in rows %}
Expand Down
4 changes: 1 addition & 3 deletions lib/importer/nunjucks/importer/macros/table_view.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

<table class="selectable govuk-body" data-persist-selection="true">
{% if caption %}
<caption
class="govuk-table__caption govuk-table__caption--m"
style="white-space: nowrap; overflow: hidden;">{{caption}}</caption>
<caption class="govuk-table__caption govuk-table__caption--m">{{caption}}</caption>
{% endif %}
{% if not hideHeader %}
<thead>
Expand Down

0 comments on commit b042a7f

Please sign in to comment.