ukgovdatascience / govdown

GOV.UK Design System theme for R Markdown
https://ukgovdatascience.github.io/govdown/
Other
46 stars 5 forks source link

Text in right-aligned table columns renders in serif font #31

Closed matt-dray closed 5 years ago

matt-dray commented 5 years ago

Problem

For me, right-aligned columns appear as serif font, but table font should be sans-serif regardless of alignment. I noticed this when looking at the {govdown} guidance page.

Example

Screenshot from the {govdown} guidance page rendered in Chrome. The right-aligned column called 'Right' contains serif fonts. Remaining columns are sans-serif.

Screen Shot 2019-06-05 at 16 31 47

The screenshot below is from a locally-knitted govdown Rmd showing that it doesn't matter where the right-aligned column is.

Screen Shot 2019-06-05 at 16 34 28

Reproducibility

This occurs for me regardless of browser (Chrome, Safari and Firefox) on my work Mac. I've also reproduced it locally by knitting a govdown Rmd containing tables produced in markdown format and when using knitr::kable().

Wasn't a problem in @nacnudus's setup, I believe.

Potential cause

Misbehaviour of govuk-table__cell--numeric? Inspection in browser implies sans-serif font though.

Screen Shot 2019-06-05 at 12 00 16
nacnudus commented 5 years ago

Confirmed. Thanks for the detailed the report.