[SPIKE] Use GOV.UK Frontend for buttons #328
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This uses the latest version of GOV.UK Frontend to render the buttons. GOV.UK Frontend is still in private beta, but this PR is mainly to see how we might consume the project (since it's The Future).
Some observations:
govuk-button
,gem-c-button
).Open issues
The images don't work as they should yet. Although we're able to display the start button image, the resulting CSS links to the image directly. In Rails we normally use the image-url helper to refer to assets, so it will use the fingerprinting. I've tried overridingFixed by Allow custom image and font URL helpers govuk-frontend#733govuk-file-url()
but that doesn't work.The button component seems to have a fixed bottom margin, which causes the info text to be weird:Fixed by setting a bottom margin: 2315334
The font is included by default, this might be a problemFixed by Use new font loading strategy govuk-frontend#726https://trello.com/c/L9Lhqngb