forked from hackclub/sprig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.js
108 lines (92 loc) 路 1.84 KB
/
style.js
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
export const style = `
:root { box-sizing: border-box; }
* { box-sizing: inherit; }
.pixel-editor-container {
display: flex;
width: 100%;
height: 100%;
}
.canvas-container {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-overflow);
overflow: auto;
}
.drawing-canvas {
background: var(--bg-surface);
}
.toolbox {
display: flex;
width: var(--editor-sidebar-width);
flex-direction: column;
padding: 20px;
background: var(--bg-floating);
overflow: auto;
justify-content: space-between;
min-width: 100px;
}
.spacer {
flex: 1;
}
.tools {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 20px;
}
.tools button {
--shadow-color: var(--btn-inactive-shadow);
position: relative;
display: flex;
background: var(--btn-inactive);
box-shadow: 0 4px 0 var(--shadow-color);
border: none;
font-family: inherit;
font-size: inherit;
color: #ffffff;
border-radius: 4px;
cursor: pointer;
padding: 10px 14px;
align-items: center;
}
.tools button.active {
background: var(--pcb-trace-lighter);
--shadow-color: var(--pcb-trace);
}
.tools button:active {
top: 4px;
box-shadow: 0 0px 0 var(--shadow-color);
}
.tools button ion-icon {
display: block;
font-size: 1.25em;
}
.tools button div {
flex: 1;
}
.colors {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.colors div {
height: 40px;
width: 77px;
border: 2px solid transparent;
border-radius: 4px;
cursor: pointer;
}
.colors div.active {
border: 2px solid var(--switch-fg-high);
}
.gridsize {
width: 50px;
}
.view-window {
display: flex;
justify-content: center;
padding: 5px;
}
`