Skip to content

Commit fddaeed

Browse files
authored
Merge pull request #486 from primer/text_inherit_docs
Documenting the text-inheritance color utility
2 parents 87fbb5d + 829a992 commit fddaeed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/primer-utilities/docs/colors.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ Use text color utilities to set text or [octicons](/styleguide/css/styles/core/c
131131

132132
These are our most common text with background color combinations. They don't all pass accessibility standards currently, but will be updated in the future. **Any of the combinations with a warning icon must be used with caution**.
133133

134+
### Text color inheritance
135+
136+
You can set the color inheritance on an element by using the `text-inherit` class.
137+
138+
```html
139+
<div class="text-purple">
140+
This text is purple, <a href="#" class="text-inherit">including the link</a>
141+
</div>
142+
```
143+
134144
### Text on white background
135145

136146
```html

0 commit comments

Comments
 (0)