Repository navigation
Expand file tree
/
Copy pathgithub-brand.css
More file actions
232 lines (204 loc) · 4.62 KB
/
Copy pathgithub-brand.css
File metadata and controls
232 lines (204 loc) · 4.62 KB
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/*
* Reusable GitHub creator banner.
* Copy this file and the .github-brand element to any static app.
*/
.github-brand {
--github-ink: #0d1117;
--github-surface: #161b22;
--github-border: rgb(240 246 252 / 18%);
--github-accent: #8b5cf6;
position: relative;
isolation: isolate;
display: flex;
min-height: 82px;
align-items: center;
justify-content: space-between;
gap: 24px;
margin-bottom: 18px;
padding: 15px 18px;
overflow: hidden;
border: 1px solid var(--github-border);
border-radius: 18px;
color: #f0f6fc;
background:
radial-gradient(circle at 82% -40%, rgb(99 102 241 / 55%), transparent 45%),
radial-gradient(circle at 16% 160%, rgb(139 92 246 / 30%), transparent 38%),
linear-gradient(120deg, var(--github-ink), var(--github-surface));
box-shadow:
0 14px 35px rgb(13 17 23 / 18%),
inset 0 1px 0 rgb(255 255 255 / 7%);
transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.github-brand::before {
position: absolute;
z-index: -2;
inset: 0;
background-image:
linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
background-size: 22px 22px;
content: "";
mask-image: linear-gradient(90deg, #000, transparent 75%);
}
.github-brand::after {
position: absolute;
z-index: -1;
top: -120%;
left: -20%;
width: 25%;
height: 340%;
background: linear-gradient(90deg, transparent, rgb(255 255 255 / 8%), transparent);
content: "";
transform: rotate(18deg);
transition: left 500ms ease;
}
.github-brand:hover {
border-color: rgb(167 139 250 / 55%);
box-shadow:
0 18px 44px rgb(13 17 23 / 25%),
0 0 0 1px rgb(139 92 246 / 15%),
inset 0 1px 0 rgb(255 255 255 / 10%);
transform: translateY(-2px);
}
.github-brand:hover::after {
left: 112%;
}
.github-brand__identity,
.github-brand__action {
display: flex;
align-items: center;
color: inherit;
text-decoration: none;
}
.github-brand__profile-link {
position: absolute;
z-index: 1;
inset: 0;
border-radius: inherit;
}
.github-brand__identity {
min-width: 0;
gap: 13px;
}
.github-brand__profile-link:focus-visible {
outline: 3px solid rgb(139 92 246 / 45%);
outline-offset: -3px;
}
.github-brand__action:focus-visible {
outline: 3px solid rgb(139 92 246 / 45%);
outline-offset: 3px;
}
.github-brand__mark {
display: grid;
width: 48px;
height: 48px;
flex: 0 0 48px;
place-items: center;
border: 1px solid rgb(255 255 255 / 14%);
border-radius: 14px;
background: rgb(255 255 255 / 8%);
box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}
.github-brand__mark svg {
width: 27px;
fill: currentcolor;
}
.github-brand__copy {
display: grid;
gap: 2px;
}
.github-brand__eyebrow {
color: #8c959f;
font-size: 0.68rem;
font-weight: 750;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.github-brand__copy strong {
overflow: hidden;
font-size: 1.08rem;
letter-spacing: -0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
.github-brand__links {
position: relative;
z-index: 2;
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 8px;
}
.github-brand__action {
flex: 0 0 auto;
gap: 8px;
padding: 8px 10px 8px 12px;
border: 1px solid rgb(255 255 255 / 12%);
border-radius: 999px;
color: #c9d1d9;
background: rgb(255 255 255 / 6%);
font-size: 0.78rem;
font-weight: 700;
transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}
.github-brand__action:hover {
border-color: rgb(255 255 255 / 24%);
color: #fff;
background: rgb(255 255 255 / 11%);
}
.github-brand__action svg {
width: 16px;
fill: none;
stroke: currentcolor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.8;
transition: transform 180ms ease;
}
.github-brand__action:hover svg {
transform: translateX(2px);
}
.github-brand__repository {
color: #fff;
background: rgb(139 92 246 / 32%);
}
.github-brand__glow {
position: absolute;
z-index: -1;
right: 18%;
bottom: -52px;
width: 150px;
height: 80px;
border-radius: 50%;
background: var(--github-accent);
filter: blur(58px);
opacity: 0.35;
pointer-events: none;
}
@media (max-width: 560px) {
.github-brand {
min-height: 72px;
gap: 12px;
padding: 12px;
border-radius: 15px;
}
.github-brand__mark {
width: 42px;
height: 42px;
flex-basis: 42px;
border-radius: 12px;
}
.github-brand__action {
padding: 8px;
}
.github-brand__links {
gap: 5px;
}
}
@media (prefers-reduced-motion: reduce) {
.github-brand,
.github-brand::after,
.github-brand__action svg {
transition: none;
}
}