Previews

No matching results.

x
1
2
3
4
5
<!-- Default -->
<button type="button" data-view-component="true" class="btn-mktg">Default</button>
<!-- Large -->
<button type="button" data-view-component="true" class="btn-mktg btn-large-mktg">Large</button>
1
2
3
4
5
# Default
render(Primer::Alpha::ButtonMarketing.new) { "Default" }
# Large
render(Primer::Alpha::ButtonMarketing.new(variant: :large)) { "Large" }

app/components/primer/alpha/button_marketing.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
.btn-mktg {
position: relative;
z-index: 1;
display: inline-block;
/* stylelint-disable-next-line primer/spacing */
padding: 0.9rem 1.5rem 1.1rem;
/* stylelint-disable-next-line primer/typography */
font-size: 1rem;
font-weight: var(--base-text-weight-semibold);
line-height: 1;
color: var(--bgColor-default);
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
user-select: none;
background: linear-gradient(180deg, rgba(255, 255, 255, 15%) 0%, rgba(255, 255, 255, 0%) 100%),
var(--color-mktg-btn-bg) !important;
border: 0;
/* stylelint-disable-next-line primer/borders */
border-radius: 0.375rem;
transition: box-shadow 0.2s, outline 0.2s ease;
-webkit-appearance: none !important;
appearance: none !important;
}
.btn-mktg::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
content: '';
/* stylelint-disable-next-line primer/colors */
background: linear-gradient(180deg, rgba(255, 255, 255, 15%) 0%, rgba(255, 255, 255, 0%) 100%) !important;
border-radius: inherit;
opacity: 0;
transition: opacity 0.2s;
background-blend-mode: normal;
}
.btn-mktg:hover {
-webkit-text-decoration: none;
text-decoration: none;
box-shadow: var(--color-mktg-btn-shadow-hover) !important;
}
:is(.btn-mktg:hover,.btn-mktg:focus,.btn-mktg:focus-visible,.btn-mktg.focus)::before {
opacity: 1;
}
/* fallback :focus state */
.btn-mktg:focus {
outline: 2px solid var(--focus-outlineColor);
outline-offset: 2px;
box-shadow: none;
/* remove fallback :focus if :focus-visible is supported */
}
.btn-mktg:focus:not(:focus-visible) {
outline: solid 1px transparent;
box-shadow: none;
}
/* default focus state */
.btn-mktg:focus-visible {
outline: 2px solid var(--focus-outlineColor);
outline-offset: 2px;
box-shadow: none;
}
.btn-mktg:active::before {
opacity: 0.5 !important;
}
.btn-mktg.disabled,.btn-mktg[disabled] {
pointer-events: none;
cursor: default;
opacity: 0.5;
}
.btn-muted-mktg {
color: var(--fgColor-default) !important;
background: none !important;
box-shadow: var(--color-mktg-btn-shadow-outline);
}
.btn-muted-mktg::before {
display: none;
}
.btn-muted-mktg:hover {
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
}
.btn-muted-mktg:active {
/* stylelint-disable-next-line primer/box-shadow */
box-shadow: var(--fgColor-default) 0 0 0 3px inset !important;
}
.btn-muted-mktg:disabled {
/* stylelint-disable-next-line primer/box-shadow */
box-shadow: var(--fgColor-default) 0 0 0 1px inset !important;
}
.btn-subtle-mktg {
color: var(--fgColor-default) !important;
background: none !important;
box-shadow: none !important;
}
.btn-subtle-mktg::before {
background: none !important;
}
.btn-subtle-mktg:hover {
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
}
.btn-signup-mktg {
/* stylelint-disable-next-line primer/colors */
color: #fff;
/* stylelint-disable-next-line primer/colors */
background: linear-gradient(180deg, rgba(52, 183, 89, 15%) 0%, rgba(46, 164, 79, 0%) 100%), rgb(46, 164, 79) !important;
}
.btn-signup-mktg::before {
/* stylelint-disable-next-line primer/colors */
background: linear-gradient(180deg, rgba(52, 183, 89, 15%) 0%, rgba(46, 164, 79, 0%) 100%) !important;
}
/* fallback :focus state */
.btn-signup-mktg:focus {
outline: 2px solid var(--focus-outlineColor);
outline-offset: 2px;
box-shadow: none;
/* remove fallback :focus if :focus-visible is supported */
}
.btn-signup-mktg:focus:not(:focus-visible) {
outline: solid 1px transparent;
box-shadow: none;
}
/* default focus state */
.btn-signup-mktg:focus-visible {
outline: 2px solid var(--focus-outlineColor);
outline-offset: 2px;
box-shadow: none;
}
/* Size modifiers */
.btn-small-mktg {
/* stylelint-disable-next-line primer/spacing */
padding: 0.625rem 1rem 0.8125rem;
}
.btn-large-mktg {
/* stylelint-disable-next-line primer/spacing */
padding: 16px 30px 20px !important;
/* stylelint-disable-next-line primer/typography */
font-size: 1.25rem;
}