Skip to content

Commit 1fd4a5f

Browse files
authored
Merge pull request #668 from primer/add-btn-transparent-back
Add btn-transparent back in
2 parents 180725e + 5eb8aa5 commit 1fd4a5f

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/marketing/buttons/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ Marketing buttons come in different colors and sizes, and are also available in
1919

2020
## Colors and outlined
2121

22-
Marketing buttons can be solid blue, outlined blue, or solid green.
22+
Marketing buttons can be solid blue, outlined blue, solid green, or transparent.
2323

2424
The solid blue and solid green buttons have more visual emphasis than the blue outlined button, therefore they should be used sparingly and only for call to actions that need emphasis.
2525

2626
```html
2727
<button class="btn-mktg mr-2" type="button">Learn more</button>
2828
<button class="btn-mktg btn-outline-mktg mr-2" type="button">Learn more</button>
2929
<button class="btn-mktg btn-primary-mktg mr-2" type="button">Sign up</button>
30+
<div class="bg-gray-dark">
31+
<button class="btn-mktg btn-transparent m-2" type="button">Learn more</button>
32+
</div>
3033
```
3134

3235
## Sizes

src/marketing/buttons/button.scss

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,32 @@
5454

5555
.btn-outline-mktg {
5656
color: $blue-450;
57-
background-color: $white;
57+
background-color: rgba($white, 0);
5858
border-color: rgba($blue-450, 0.5);
5959

6060
&:hover {
6161
color: $blue-500;
6262
text-decoration: none;
63-
background-color: $white;
63+
background-color: rgba($white, 0);
6464
border-color: rgba($blue-450, 1);
6565
}
6666
}
67+
68+
@mixin btn-transparent-active {
69+
color: $gray-800;
70+
background-color: $white;
71+
background-image: none;
72+
border-color: $white;
73+
}
74+
75+
.btn-transparent {
76+
color: $white;
77+
background-color: transparent;
78+
background-image: none;
79+
border: $border-width $border-style $white-fade-50;
80+
81+
&:hover,
82+
&:active {
83+
@include btn-transparent-active;
84+
}
85+
}

0 commit comments

Comments
 (0)