feat: Enable static or responsive label on autocomplete#130
Merged
DafyddLlyr merged 3 commits intomainfrom Mar 28, 2022
Merged
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
jessicamcinchak
approved these changes
Mar 28, 2022
Member
jessicamcinchak
left a comment
There was a problem hiding this comment.
good eye, good solution for our use case! thanks for this!
| href="https://cdn.jsdelivr.net/npm/accessible-autocomplete@2.0.4/dist/accessible-autocomplete.min.css" | ||
| /> | ||
| <label class="govuk-label" htmlFor=${this.id}>${this.label}</label> | ||
| <label class=${this.getLabelClasses()} htmlFor=${this.id} |
Member
There was a problem hiding this comment.
make sure to rebase to not accidently overwrite with htmlFor again 🙂
Contributor
Author
There was a problem hiding this comment.
Very good point...!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Realised during Friday's show and tell that the label font size is 19px on PlanX when it should be 18px!
By default, the
govuk-labelclass takes into account the following breakpoints - https://github.com/alphagov/govuk-frontend/blob/v4.0.0/src/govuk/settings/_media-queries.scss#L10-L14This means it's not quite as simple as overwriting the font-size and setting a default, as this would have the side effect of breaking the responsiveness if anybody else wanted to use the component.