-
Notifications
You must be signed in to change notification settings - Fork 334
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
Can't add custom class to character count #1649
Comments
Hey Emma, We recognise that the api for this component is inconsistent with the rest of our components. To make it consistent we'd need to make a breaking change. For this reason we'll see if more of our users run into this issue, and then consider changing this. Let us know if this causes blockers for you, and we can reconsider this decision. |
As discussed in the v4 prioritisation, this component does work differently to our other components, so maybe it's ok that this is reflected in the macro options. This problem is wider than just classes, e.g: the macro options also let you pass in
Probably needs more investigation. It would also be good to know if this is something that causes an issue for a lot of our users, or if it behaves as expected despite being different to other design system components. |
This is now ready for review as part of #4566 |
Currently it's not possible to add a custom class to the character count wrapper (
.govuk-character-count
) because theclasses
property is being used for the nested textarea instead. This goes against the convention in other components.It would be helpful for us to have
classes
apply to the.govuk-character-count
(or if this would be a problem because of introducing a breaking change then it would be helpful to have a new property that gives the ability to add custom classes to.govuk-character-count
). In our use case we are re-skinninggovuk-frontend
for Hackney Council (see https://github.com/lbhackney-IT/lbh-frontend) and would like to alter the spacing around the character count component and to style the hint inside it without targeting solely.govuk-*
classes (a convention that we're trying to stick to). There are ways of getting round this (not least breaking our convention in this case) so it isn't absolutely crucial to us, but would be nice if it could work the same way as all other components.The text was updated successfully, but these errors were encountered: