Typography sizing updates!
We've updated typography sizing variables and class names to separate semantics from presentation. Read about how you can update.
Examples
The only base HTML element the design system applies styling to is the <a>
element. You can also use .ds-c-link
and .ds-c-link--inverse
for styling links.
On light background
On dark background
Code
Style customization
The following CSS variables can be overridden to customize links:
Guidance
Your link should always describe where it will take users. Users tend to scan text online, and elements that stand out (like links) grab attention. Clear links can help users navigate more quickly.
For example, instead of:
Use:
Never use a link to say “click here.” A nondescript link forces users to backtrack and read the surrounding text for more context. This is even more problematic for those who rely on screen readers, which can list links for quicker navigation. A list of “click here” isn’t helpful for anyone.
When to use
- Navigating to a new page or view in your application
- Navigating to a different web page, e.g. external documentation
- Note: Warn the user if links open a new window or downloads a file (PDF, for example).
When to consider alternatives
- Opening or closing a modal or dialog
- Triggering a dropdown menu
- Submitting data to the server
Accessibility
- Users should be able to tab to navigate between links.
- Users should be able to activate a link when pressing ‘Enter’ on their keyboard.
- Users should be able to identify links without relying on color alone.
- Users should be able to activate hover and focus states with both a mouse and a keyboard.