forked from XRPLF/xrpl-dev-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_diagrams.scss
343 lines (320 loc) · 8.08 KB
/
_diagrams.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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
// Diagram Styling =============================================================
//==============================================================================
// These styles control the display of diagrams in page contents.
.content {
// Shrink images that would overflow the main column.
img {
max-width: 100%;
height: auto;
.dactyl_badge {
// Exception: badges should be their original (small) size.
width: initial;
}
}
// Shrink or grow inlined SVG to fit the main column width.
svg {
max-width: 100%;
}
.floating-diagram {
margin: 0.5rem;
float: left;
}
li {
clear: left; // avoid spilling to the side with floating diagrams
}
}
html:not(.light) .content {
// Recolor UMLet diagrams for dark theme -------------------------------------
svg[fill="black"] {
fill: $white;
stroke: $white;
*[fill="white"] {
fill: $black;
}
*[stroke="white"] {
stroke: $black;
}
*[fill="black"] {
fill: $white;
}
*[stroke="black"] {
stroke: $white;
}
g[fill="blue"] {
fill: $blue-500;
}
g[stroke="blue"] {
stroke: $blue-500;
}
g[fill="rgb(120,120,120)"] {
fill: $gray-200;
}
g[stroke="rgb(120,120,120)"] {
stroke: $gray-200;
}
g[fill="rgb(200,200,200)"] {
fill: $gray-700;
}
g[fill="rgb(70,70,70)"] {
fill: $gray-500;
}
g[stroke="rgb(70,70,70)"] {
stroke: $gray-500;
}
g[fill="rgb(29,180,255)"] { // old Ripple blue. Change to green.
fill: $primary;
}
g[stroke="rgb(29,180,255)"] {
stroke: $primary;
}
rect[stroke="rgb(245,247,249)"] { // old off-white. change to black.
stroke: $black;
}
g[fill="lime"],
g[fill="rgb(0,255,0)"] { // standard green. change to primary green.
fill: $primary;
}
g[stroke="lime"] ,
g[stroke="rgb(0,255,0)"]{
stroke: $primary;
}
g[fill="yellow"],
g[fill="rgb(255,255,0)"] {
fill: $yellow-500;
// nested stroke should remain black so it's visible over yellow
path[stroke="black"] {
stroke: $black;
}
}
g[fill="red"],
g[fill="rgb(255,255,0)"] { // magenta-500 is our closest shade to pure red
fill: $magenta-500;
}
g[stroke="red"],
g[stroke="rgb(255,255,0)"] {
stroke: $magenta-500;
}
g[fill="yellow"] + g text,
g[fill="rgb(255,255,0)"] + g text { // On yellow notes, use black text
fill: $black;
}
g[fill="lime"] + g text { // same for green
fill: $black;
}
}
// Recolor Google Draw diagrams for dark theme, including ones using
// old Ripple color schemes. -------------------------------------------------
svg[fill="none"] {
path[fill="#000000"] { // white on black instead of black on white
fill: $white;
}
path[stroke="#000000"] {
stroke: $white;
}
path[fill="#ffffff"] {
fill: $black;
}
path[stroke="#ffffff"] {
stroke: $black;
}
path[fill="#23292f"],
path[fill="#23282f"] { // old XRP off-blacks: invert to white
fill: $white;
}
path[stroke="#23292f"],
path[stroke="#23282f"] {
stroke: $white;
}
path[fill="#2c3e50"],
path[fill="#2b3e51"] { // old dark blue-grays: change to light gray
fill: $secondary;
}
path[stroke="#2c3e50"],
path[stroke="#2b3e51"] {
stroke: $secondary;
}
path[fill="#1c2835"] { // old 90% gray; change to 10%
fill: $gray-100;
}
path[stroke="#1c2835"] {
stroke: $gray-100;
}
path[fill="#21aa47"] { // old green
fill: $green;
}
path[stroke="#21aa47"] {
stroke: $green;
}
path[fill="#e64b3b"] { // old red
fill: $red;
}
path[stroke="#e64b3b"] {
stroke: $red;
}
path[stroke="#27a2db"],
path[stroke="#00aae4"] { // old primary blues: change to primary green
stroke: $primary;
}
path[fill="#27a2db"],
path[fill="#00aae4"] {
fill: $primary;
}
path[fill="#e6e7e8"] { // old light gray: change to dark
fill: $gray-800;
}
path[stroke="#e6e7e8"] {
stroke: $gray-800;
}
path[stroke="#ffbf27"] { // old yellow-orange: change to red-purple
stroke: $red-purple-500; // (to complement green instead of blue)
}
path[fill="#00ff00"] { // standard "green"
fill: $green;
}
path[stroke="#00ff00"] {
stroke: $green;
}
path[fill="#ff00ff"] { // standard "magenta"
fill: $magenta;
}
path[stroke="#ff00ff"] {
stroke: $magenta;
}
linearGradient {
// White Box Top gradient: darken to dark gray
stop[stop-color="#ffffff"] {
stop-color: $gray-700;
}
stop[stop-color="#e6e7e8"] { // old gray-100
stop-color: $gray-800;
}
// White Box Side gradient: darken to near black
stop[stop-color="#dbdcdd"] { // old gray-200
stop-color: $black;
}
stop[stop-color="#b1b3b5"] { // old gray-300
stop-color: $gray-900;
}
// Primary Blue Side gradient: change to green
stop[stop-color="#29a1da"] {
stop-color: $green-600;
}
stop[stop-color="#2789b9"] {
stop-color: $green-400;
}
// Primary Blue Top gradient: change to green
stop[stop-color="#6bc1ec"] {
stop-color: $green-200;
}
stop[stop-color="#8ad6f4"] {
stop-color: $green-300;
}
// Secondary Y-O Top gradient: change to red-purple
stop[stop-color="#fab913"] {
stop-color: $red-purple-200;
}
stop[stop-color="#fad26b"] {
stop-color: $red-purple-300;
}
// Secondary Y-O Side gradient: change to red-purple
stop[stop-color="#f8a136"] {
stop-color: $red-purple-400;
}
stop[stop-color="#f7931a"] {
stop-color: $red-purple-600;
}
}
}
}
// Less significant tweaks to color schemes for diagrams in light mode
// Recolor UMLet diagrams for dark theme -------------------------------------
html.light {
svg[fill="black"] {
g[fill="blue"] {
fill: $blue-700;
}
g[stroke="blue"] {
stroke: $blue-500;
}
g[fill="rgb(120,120,120)"] {
fill: $gray-700;
}
g[stroke="rgb(120,120,120)"] {
stroke: $gray-700;
}
g[fill="rgb(200,200,200)"] {
fill: $gray-400;
}
g[fill="rgb(70,70,70)"] {
fill: $gray-700;
}
g[stroke="rgb(70,70,70)"] {
stroke: $gray-700;
}
g[fill="rgb(29,180,255)"] { // old Ripple blue.
fill: $blue-500;
}
g[stroke="rgb(29,180,255)"] {
stroke: $blue-700;
}
rect[stroke="rgb(245,247,249)"] { // old off-white.
stroke: $gray-050;
}
g[fill="lime"],
g[fill="rgb(0,255,0)"] { // standard green.
fill: $green-400; // lighten backgrounds a little
}
g[stroke="lime"] ,
g[stroke="rgb(0,255,0)"]{
stroke: $green-700; // darken strokes
}
g[fill="yellow"],
g[fill="rgb(255,255,0)"] {
fill: $yellow-300; // lighten up yellow BGs a little
}
g[fill="red"],
g[fill="rgb(255,255,0)"] { // magenta-500 is our closest shade to pure red
fill: $magenta-400; // ... but let's lighten it a little as a bg
}
g[stroke="red"],
g[stroke="rgb(255,255,0)"] {
stroke: $magenta-500;
}
}
// Recolor Figma diagrams for light mode ------------------------------------
svg[fill="none"] {
rect[fill="#111112"] {
fill: $light-bg;
}
path[fill="white"] {
fill: $black;
}
path[fill="#343437"] {
fill: $gray-300;
}
path[fill="#A2A2A4"],
rect[fill="#A2A2A4"],
ellipse[fill="#A2A2A4"] {
fill: $gray-600;
}
path[fill="#232325"] {
fill: $gray-200;
}
path[fill="#F5F5F7"] {
fill: $gray-900;
}
path[stroke="#F5F5F7"] {
stroke: $gray-900;
}
path[stroke="#FF198B"] {
// slightly darken up this magenta for more contrast in light mode
stroke: $magenta-700;
}
linearGradient stop[stop-color="#F5F5F7"] {
stop-color: $gray-900;
}
linearGradient stop[stop-color="#C1C1C2"] {
stop-color: $gray-700;
}
}
}