alphagov/paas-admin

<body> element should not have govuk-body class

Closed this issue · 1 comments

Hey folks,

Just noticed that the skip link is rendered strangely in the PaaS admin app, with an unexpected bottom margin:

Screenshot 2019-09-27 at 16 39 47BST

From digging in, it looks like this is happening because you're applying the govuk-body class to the body

{% set bodyClasses = "govuk-body" %}

I can totally understand from the name why that might have happened (!) but the govuk-body class is intended to be applied to paragraphs. The only class we expect to be on the <body> is govuk-template__body (which is there)

This is setting a bottom margin on the <body> which is being inherited by the skip link (and possibly other elements on the page) – the fact that the margin is being inherited at all is kind of weird and I'm going to raise an issue about that over on our side.

Note that this will also currently be setting the font on everything within the <body>, so when you remove this there's a chance you might end up with some parts of the UI not using the font, if they don't have the correct classes.

Great catch - thanks @36degrees! We'll have a look.