Open oscarduignan opened 5 days ago
Hi @oscarduignan, thanks for letting us know. Looks like it's picking the first item of the type scale instead of the right one, weird. It may take us a little bit to investigate as we need to figure how to run node-sass
on our machines (which use ARM processors that node-sass
doesn't compile on).
Out of curiosity, what keeps your project stuck on node-sass?
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)