Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link/mail helpers overwriting classes #74

Closed
cpjmcquillan opened this issue Dec 7, 2020 · 1 comment · Fixed by #75
Closed

Link/mail helpers overwriting classes #74

cpjmcquillan opened this issue Dec 7, 2020 · 1 comment · Fixed by #75

Comments

@cpjmcquillan
Copy link
Collaborator

I've noticed that when supplying custom classes to these helpers, the govuk-link class is no longer applied (i.e overwritten rather than merged).

Adding this issue so
a) I don't forget about it
b) Someone else can investigate/fix if they feel inclined to do so

@peteryates
Copy link
Member

I was hoping that this could be done in a clean elegant fashion using some combination of deep_merge but it's a faff because classes can be passed in as either a string or array. I think just manually ensuring that the class contains govuk-link via << is the way to go here, even though it's a bit ugly.

peteryates added a commit that referenced this issue Dec 7, 2020
Instead of overwriting the required CSS classes when custom ones are
provided, add the custom ones to the required one.

Fixes #74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants