You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On large screens, the pagination component sets its font-size to 0. This fixes some browser-rendering bugs which put unnecessary spaces between elements.
When using this technique, you need to give the child elements an explicit font-size. Otherwise they will default to 0 and not be visible. This is what happens with moj-pagination__results.
This bug is masked in the documentation, because the element is a p tag and gets a font-size from the GOV.UK Design System's CSS. But some services don't get this rule because of how they've configured the GOV.UK Design System.
Steps to Reproduce
Recreate the example in the documentation but remove the default p {} rule from GOV.UK CSS, or use a <div> for the moj-pagination__results element.
You can also emulate the above with browser dev tools.
Expected behaviour: It should say "Showing 10 to 20 of 30 results"
Prerequisites
Description
Originally reported on Slack.
On large screens, the pagination component sets its font-size to 0. This fixes some browser-rendering bugs which put unnecessary spaces between elements.
When using this technique, you need to give the child elements an explicit font-size. Otherwise they will default to 0 and not be visible. This is what happens with
moj-pagination__results
.This bug is masked in the documentation, because the element is a
p
tag and gets a font-size from the GOV.UK Design System's CSS. But some services don't get this rule because of how they've configured the GOV.UK Design System.Steps to Reproduce
p {}
rule from GOV.UK CSS, or use a<div>
for themoj-pagination__results
element.You can also emulate the above with browser dev tools.
Expected behaviour: It should say "Showing 10 to 20 of 30 results"
Actual behaviour: The results text is hidden
Reproduces how often: 100%
Versions
Version
v0.0.17-alpha
in every browserAdditional Information
I've made a PR to fix this.
The text was updated successfully, but these errors were encountered: