Skip to content

Commit c556234

Browse files
committed
Move some hardcoded colors to CSS
1 parent 51badc8 commit c556234

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

graphtool.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ doc.html(`
99
<g id="hide-icon">
1010
<path d="M2 6Q7 0 12 6Q7 12 2 6Z" stroke-width="1" stroke="currentColor" fill="none"/>
1111
<circle cx="7" cy="6" r="2" stroke="none" fill="currentColor"/>
12-
<line stroke-width="1" x1="4.4" y1="10.3" x2="10.4" y2="2.3" stroke="white"/>
12+
<line stroke-width="1" x1="4.4" y1="10.3" x2="10.4" y2="2.3" class="keyBackground"/>
1313
<line stroke-width="1" x1="3.6" y1= "9.7" x2= "9.6" y2="1.7" stroke="currentColor"/>
1414
</g>
1515
<g id="pin-icon" text-anchor="middle" font-size="100px" fill="currentColor">
@@ -106,7 +106,7 @@ let gr = doc.select("#fr-graph"),
106106

107107

108108
gr.append("rect").attrs({x:0, y:pad.t-8, width:W0, height:H0-22, rx:4,
109-
fill:"white"});
109+
"class":"graphBackground"});
110110
watermark(gr);
111111

112112

@@ -1001,7 +1001,6 @@ function updatePhoneTable() {
10011001
.attr("viewBox","0 0 280 145")
10021002
.insert("path").attrs({
10031003
fill:"none",
1004-
stroke:"#445",
10051004
"stroke-width":30,
10061005
"stroke-linecap":"round",
10071006
d:"M265 110V25q0 -10 -10 -10H105q-24 0 -48 20l-24 20q-24 20 -2 40l18 15q24 20 42 20h100"

style.css

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
noscript { position:absolute; left:0; right:0; font-size:6em; text-align:center; }
22
html { background:#e5e5e5; }
3+
.graphBackground { fill:white; }
34
.main { height:100vh; display:flex; flex-direction:column; color:black; }
45
.graphBox { margin:0.25em auto 0.75em; }
56
#fr-graph { width:calc((100vh - 13.5em) * 800 / 346); max-width:100%; }
@@ -102,8 +103,10 @@ td.remove { width:1.4em; font-size:120%; padding-left:0.08em; }
102103
.keySel rect,.keySelBoth { cursor:pointer; }
103104

104105
.pinMark { float:right; width:80%; margin-right:-8.6%; margin-bottom:0.6em; }
106+
.pinMark path { stroke:#445; }
105107

106108
tr { background:#f9fcfc; }
109+
.keyBackground { stroke:#f9fcfc; }
107110
.scrollOuter { flex:1; position:relative; }
108111
.scroll {
109112
position:absolute; left:0; right:0; top:0; bottom:0;

styles/dark.css

+2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ html,.addPhone { background:#191b1f; }
66
.addLock { color:#778; }
77
.addPhone.locked:after { border-color:#375b0b; }
88
tr { background:#d7e0e0; }
9+
.keyBackground { stroke:#d7e0e0; }
910
.search { background:#e3e2e1; }
11+
.pinMark path { stroke:#726d63; }
1012
.scroll div { border-left-color:#101112; }
1113
.select { border-bottom-color:#101112; }
1214
.chevron,.stop { fill:#101112; }

styles/white.css

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ html,.addPhone { background:white; }
33
.button { border-left-color:white; }
44
.tools { background:#ebf0ed; }
55
tr { background:#ebeeee; }
6+
.keyBackground { stroke:#ebeeee; }
67
button { background:#dddbce; }
78
button:before,button:after { border-color:#dde4a0; }
89
.button.selected { background-color: #e4eb6c; }

0 commit comments

Comments
 (0)