Closed owenatgov closed 3 years ago
🤔 Would something like this work? I'm trying to think, ideally you want to inherit, apply to all, but also scope
.gem-c-success-alert {
a {
@extend .govuk-notification-banner__link;
}
}
@chris-gds This could work yes, but the DS team have made an informed decision about the specific implementation and I'd rather lean on said implementation than try to roll our own. Check out the convo in the DS issue I linked to for some more detailed whys.
I've had a nosey through the uses of success alert and haven't found any that use links in their body besides the cookie banner. I'm going to make a PR with some extra guidance on the success alert in a bit.
Marking as resolved for now. It doesn't look like there's a great need to use links in success alert components across govuk at present. I may bring this up in a future frontenders catchup to gauge thoughts on this.
The new success alert component, which is inherited from the success variant of the design system notification banner, uses an explicit class to style it's links to be green (
govuk-notification-banner__link
).Some comments from the design system team on the link colour choice:
Further reading on the implementation choice
This can't be implemented at the component level as we don't have total control over what content will be coming in, so we need to go through the instances of the success alert across govuk apps and make sure that any instances of links within the success alert component are using the above class.
Additionally, guidance should be added to the component docs advising to use the link class if you success alert content includes a link.