Skip to content

Commit

Permalink
css fix for puppetteer bug
Browse files Browse the repository at this point in the history
dont use partial for service name
  • Loading branch information
willc-work committed Jul 11, 2023
1 parent 1ef1977 commit 4d5a054
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion app/assets/stylesheets/print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@
display: none !important; // In no circumstances do we want buttons to appear when the page is printed,
// regardless of class-based button styles
}
}
}
// Grover/pupetteer has a bug https://github.com/puppeteer/puppeteer/issues/4125
// this ensures that the bug does not cause the titles in H1 and H2 elements to
// split on the characters 'fi'
.no-ligatures{
font-variant-ligatures: none;
}

.no-wrap{
white-space: nowrap;
}
6 changes: 3 additions & 3 deletions app/views/estimates/print.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
= t("estimates.show.not_likely_to_qualify")
- else
= t("estimates.show.likely_to_qualify")
.govuk-grid-column-full
.govuk-grid-column-full.no-ligatures
.gem-c-organisation-logo
.gem-c-organisation-logo__container
span.gem-c-organisation-logo__name
Expand All @@ -18,7 +18,7 @@

button.govuk-button.govuk-button--secondary data-module="govuk-button" data-trigger="print" = t(".print_this_page")

= render "shared/heading", header_text: t("service.name")
h2.govuk-heading-m = t("service.name")
= render "result_panel_content"

- if @model.level_of_help == "certificated"
Expand All @@ -44,7 +44,7 @@
= render "evidence"

- if @model.calculated?(:gross_income) || @model.calculated?(:disposable_income) || @model.calculated?(:capital)
h2.govuk-heading-m = t("estimates.show.#{@model.level_of_help}_how_calculated")
h2.govuk-heading-m.no-wrap = t("estimates.show.#{@model.level_of_help}_how_calculated")

- if @model.calculated?(:gross_income)
h2.govuk-heading-m = t("estimates.show.income_calculation")
Expand Down

0 comments on commit 4d5a054

Please sign in to comment.