Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sharp-moles-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cloudfour/patterns': patch
---

Make nested headings inherit font colors
5 changes: 3 additions & 2 deletions src/components/heading/heading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ $max-width-permalink-shift: math.div($min-width-permalink-shift * 16 - 1, 16);

/// For complex headings (those containing a permalink and/or subheading), the
/// actual `h*` element must be a child element, so we inherit the container's
/// font styles. It's important the containing element retain the heading font
/// styles for vertical rhythm to work as intended!
/// font and color styles. It's important the containing element retain the
/// heading font styles for vertical rhythm to work as intended!
.c-heading__content {
color: inherit;
font: inherit;
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/heading/heading.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ import demo from './demo/demo.twig';
options: ['', 'light'],
},
},
class: {
type: 'string',
description: 'If necessary, additional classes can be added to headings.',
},
}}
parameters={{
docs: {
Expand Down