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

Styling of links not in paragraphs #53

Closed
robredpath opened this issue Mar 20, 2025 · 4 comments · Fixed by #55
Closed

Styling of links not in paragraphs #53

robredpath opened this issue Mar 20, 2025 · 4 comments · Fixed by #55
Labels

Comments

@robredpath
Copy link
Contributor

In some cases, there are links which aren't inline in paragraph text. They might be part of a larger component (e.g. a table of contents, or the breadcrumbs, or a menu) or part of an ad-hoc creation.

Here's some examples:

Image Image Image Image Image Image

I have heard from the d-portal developers that it's not clear how such links should be displayed, and from looking around it seems that we largely make decisions case-by-case. I don't know how much of an issue it is that we make different decisions in different cases, but I do think we should help people make that decision.

@robredpath
Copy link
Contributor Author

#46 (comment) discusses this as well

@codemacabre
Copy link
Collaborator

I'd be inclined to lean towards fewer options to ensure that links remain consistent across the site(s). From what I can see, the following cases should be enough:

  • Links in paragraphs (on light backgrounds)
  • Links in paragraphs (on dark backgrounds)
  • Links not in paragraphs (on light backgrounds)
  • Links not in paragraphs (on dark backgrounds)

@codemacabre
Copy link
Collaborator

In adding the above styles, I also needed to add a .iati-dark-background class which can be applied to any element, ideally divs and paragraphs.

For the standalone links, I've inverted the text-decoration style, so it is by default not underlined, but becomes underlined on :active, :focus and :hover. Paragraph styles remain unchanged (so underlined by default). The .light links (to be used on dark backgrounds) are as follows:

Image

Copy link

🎉 This issue has been resolved in version 3.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants