diff --git a/app/javascript/stylesheets/print.scss b/app/javascript/stylesheets/print.scss index 633d650df..31b110651 100644 --- a/app/javascript/stylesheets/print.scss +++ b/app/javascript/stylesheets/print.scss @@ -6,6 +6,13 @@ border: 1px solid gray; } +.one-grid { + display: grid; + grid-template-columns: auto; + font-size: 10px; + grid-auto-columns: 1fr 200px; +} + .two-grid { display: grid; grid-template-columns: auto auto; @@ -13,6 +20,13 @@ grid-auto-columns: 1fr 200px; } +.four-grid { + display: grid; + grid-template-columns: auto auto auto auto; + font-size: 10px; + grid-auto-columns: 1fr 200px; +} + .three-grid { display: grid; grid-template-columns: auto auto auto; @@ -24,6 +38,8 @@ font-size: small; margin-bottom: 0; margin-top: 5px; + background-color: #1d70b8; + color: white; } .govuk-body{ diff --git a/app/views/form/print.html.erb b/app/views/form/print.html.erb index b722de18f..9f14a9753 100644 --- a/app/views/form/print.html.erb +++ b/app/views/form/print.html.erb @@ -3,11 +3,11 @@ <%= form_with do |f| %> <% @form.all_subsections.each do |subsection_name, subsection_content| %>
<%= subsection_content["label"] %>
- <% large_answers = @form.questions_for_subsection(subsection_name).any? {|key, info| info["type"]== 'checkbox' || info["type"]== 'radio' && info["answer_options"].keys.length > 4} ? "two-grid" : "three-grid" %> + <% large_answers = @form.questions_for_subsection(subsection_name).any? {|key, info| info["type"]== 'checkbox' || info["type"]== 'radio' && info["answer_options"].keys.length > 4} ? "one-grid" : "three-grid" %>