We found an issue recently which was caused by <label class="nhsuk-label nhsuk-radios__label"> having display: block style.
It turns out that when importing individual sass components, the order of imports matters.
This is because the display rules in label.scss and radios.scss (and also checkboxes.scss) have the same specificity.
Solution
I think the specificity of the display rule for the label in radios.scss and checkboxes.scss should be increased so that it always takes precedence over the rule in labels.scss.
Bug Report
What is the issue?
We found an issue recently which was caused by
<label class="nhsuk-label nhsuk-radios__label">
havingdisplay: block
style. It turns out that when importing individual sass components, the order of imports matters.Correct styles:
Incorrect styles:
This is because the
display
rules in label.scss and radios.scss (and also checkboxes.scss) have the same specificity.Solution
I think the specificity of the display rule for the label in radios.scss and checkboxes.scss should be increased so that it always takes precedence over the rule in labels.scss.