Skip to content

Commit 0e55872

Browse files
committed
Add .close-button
Unchanged from dotcom
1 parent f61a726 commit 0e55872

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/content/components/buttons.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ Create a button that looks like a link with `.btn-link`. Rather than using an `<
118118
<button class="btn-link" type="button">Link button</button>
119119
```
120120

121+
## Close button
122+
123+
When using the `octicon-x` icon for a close button, add `.close-button` to remove the default button styles.
124+
125+
```html live
126+
<button class="close-button" type="button">
127+
<!-- <%= octicon "x" %> -->
128+
<svg width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z" /></svg>
129+
</button>
130+
```
131+
121132
## Button with counts
122133

123134
You can easily append a count to a **small button**. Add the `.with-count` class to the `.btn-sm` and then add the `.social-count` after the button.

src/buttons/misc.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
// stylelint-disable selector-max-type, block-opening-brace-space-before, no-duplicate-selectors
22

3+
// A button with an X to close stuff
4+
.close-button {
5+
padding: 0;
6+
background: transparent;
7+
border: 0;
8+
outline: none;
9+
}
10+
311
// Hidden text button
412
//
513
// Use `.hidden-text-expander` to indicate and expand hidden text.

0 commit comments

Comments
 (0)