govuk-font(14) outputs incorrect font-sizes when compiling with node-sass #5415
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
sass / css
Description of the issue
compiling styles with libsass (in this case via node-sass) causes govuk-font(14) to have incorrect font-size
this isn't related to decimal rounding, but because of some logic to suppress deprecation warnings not working exactly the same under libsass as it does when using dart-sass
Steps to reproduce the issue
gh repo clone alphagov/govuk-frontend
npx node-sass govuk-frontend/packages/govuk-frontend/src/govuk/all.scss node-sass.css
.govuk-body-xs
and anything similarly using the deprecated govuk-font(14) and you'll see output like this:where the font-sizes are wrong
seems like cause could be related to some logic in the sass around suppressing warnings for internal usages of govuk-font(14) where something is giving different result in node-sass and causing the logic to be incorrect and pick up the biggest size typography instead.
Actual vs expected behaviour
you can see the xs font size is showing as
font-size: 3.3125rem;
and on print for example, 53pt - which is bigger than headings, where it should be like this, which is from the dart-sass compiled output in govuk-frontend distEnvironment (where applicable)
only applies where anyone is compiling the govuk-frontend styles with libsass (for example, node-sass)
The text was updated successfully, but these errors were encountered: