This repository has been archived by the owner on Apr 18, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
source.scss
205 lines (178 loc) · 3.84 KB
/
source.scss
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
/**
* Hop on Discord
* v3.0 by @mistermantas
* hop-on-discord.netlify.com
*/
// Font
@import url('https://fonts.cdnfonts.com/css/whitney-2');
// Variables
$primary: #7289da;
$dark: true;
// Reset box sizing
.discord-dialog *, .discord-dialog *:before, .discord-dialog *:after {
box-sizing: inherit;
}
// Reset link styling
.discord-dialog a {
text-decoration: none;
}
// Style dialog transition upon click
@keyframes discord-dialog__transition {
0% {
opacity: 0;
transform: translateY(16px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
// Box
.discord-dialog {
-webkit-tap-highlight-color: rgba(0,0,0,0);
box-sizing: border-box;
display: none;
z-index: 2147483647;
position: fixed;
max-width: 288px;
right: 0;
bottom: 0;
margin: 18px;
border-radius: 10px;
font-family: 'Whitney', sans-serif;
@if $dark == true {
background: #2e3136;
color: #72767d;
} @else {
background: #fff;
color: #4f545c;
}
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);
transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
animation: discord-dialog__transition 0.2s;
// Show dialog
&--active {
display: block;
}
// Containers
&__container {
font-size: 14px;
line-height: 1.2;
color: #99aab5;
padding: 8px 28px 28px 28px;
}
// Logo
&__logo {
display: none;
width: auto;
margin-top: 5px;
height: 24px;
path { fill: #fff; }
}
}
.discord-dialog__close-button {
position: absolute;
right: 0;
padding: 16px;
cursor: pointer;
// Color & interactions
svg {
height: 20px;
width: 20px;
path { fill: #ccc; }
}
&:hover { opacity: 0.8; }
&:active { opacity: 0.4; }
}
// Box Sections
.discord-dialog__footer {
padding: 10px 20px;
}
// Box things
.discord-dialog__guild-icon {
border-radius: 50%;
width: 64px;
display: block;
height: auto;
margin: 16px 0;
}
.discord-dialog__guild {
font-size: 24px;
line-height: 30px;
margin-bottom: 12px;
font-weight: bold;
@if $dark == true {
color: #fff;
} @else {
color: #4f545c;
}
}
.discord-dialog__btn {
background: $primary;
color: #fff;
text-align: center;
display: block;
border-radius: 1px;
margin: 8px;
font-size: 16px;
line-height: 24px;
border-radius: 3px;
text-align: center;
padding: 12px 16px;
position: relative;
top: -6px;
box-shadow: 0 2px 4px rgba(#000, 0.3);
transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
&:hover { background: mix(#fff, $primary, 10%); }
&:active { background: mix(#000, $primary, 10%); }
}
.discord-dialog__explainer {
display: block;
margin: 2px 8px;
color: $primary;
font-size: 12px;
text-align: right;
top: -6px;
&:hover { opacity: 0.8; }
&:active { opacity: 0.6; }
}
// Action button
.discord-button {
-webkit-tap-highlight-color: rgba(0,0,0,0);
box-sizing: border-box;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
position: fixed;
bottom: 0;
right: 0;
z-index: 50;
margin: 23.5px;
padding: 15.5px;
border-radius: 50%;
background: $primary;
cursor: pointer;
transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
display: flex;
text-align: center;
align-items: center;
justify-content: center;
svg {
height: 28px;
width: 28px;
transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
path {
fill: #fff;
}
}
&:hover {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
svg {
opacity: 0.6;
}
}
&:active {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
svg {
opacity: 0.4;
}
}
}