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

Fix sequence of content in Subhead #1950

Merged
merged 3 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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/fuzzy-bananas-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Fix sequence of content in Subhead
2 changes: 1 addition & 1 deletion docs/content/components/subhead.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Use all the elements together to create a Subhead with actions and a description
```html live title="Subhead with actions and description"
<div class="Subhead">
<div class="Subhead-heading">Subhead with actions and description</div>
<div class="Subhead-actions"><a href="#url" class="btn btn-sm btn-primary" role="button">Action</a></div>
<div class="Subhead-description">The subhead is a subdued header style with a light bottom border.</div>
<div class="Subhead-actions"><a href="#url" class="btn btn-sm btn-primary" role="button">Action</a></div>
</div>
```

Expand Down
3 changes: 3 additions & 0 deletions src/subhead/subhead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
font-size: $h2-size;
font-weight: $font-weight-normal;
flex: 1 1 auto;
order: 0;
}

// Make the text bold and red for dangerous content
Expand All @@ -31,13 +32,15 @@
font-size: $body-font-size;
color: var(--color-fg-muted);
flex: 1 100%;
order: 2;
}

// Add 1 or 2 buttons to the right of the heading
.Subhead-actions {
margin: $spacer-1 0 $spacer-1 $spacer-1;
align-self: center;
justify-content: flex-end;
order: 1;

+ .Subhead-description {
margin-top: $spacer-1;
Expand Down