Skip to content

Commit 1ce7b21

Browse files
committed
CSS 颜色全部迁移至 UI 库
1 parent 469f050 commit 1ce7b21

9 files changed

Lines changed: 10 additions & 101 deletions

File tree

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ s-page {
210210
display: flex;
211211
}
212212
#editor {
213-
border-right: var(--c-border) 1px solid;
213+
border-right: var(--s-color-outline-variant) 1px solid;
214214
position: relative;
215215
display: flex;
216216
flex-direction: column;
@@ -253,7 +253,7 @@ s-page {
253253
top: 0;
254254
bottom: 0;
255255
width: 5px;
256-
background: var(--c-accent);
256+
background: var(--s-color-secondary);
257257
z-index: 999;
258258
opacity: 0;
259259
transition: opacity 0.1s;

src/components/codeDisplay.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const collapse = ref(true);
4343

4444
<style>
4545
.plot-data.output {
46-
border-top: var(--c-border) 1px solid;
46+
border-top: var(--s-color-outline-variant) 1px solid;
4747
padding: 15px 15px;
4848
height: 260px;
4949
display: flex;
@@ -71,8 +71,7 @@ const collapse = ref(true);
7171
float: right;
7272
height:100%;
7373
padding:0 10px;
74-
background: var(--c-bk3);
75-
border:var(--c-border) 1px solid;
74+
border:var(--s-color-outline-variant) 1px solid;
7675
border-radius: 5px;
7776
opacity: 0.75;
7877
}

src/components/dataBlock.vue

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -178,35 +178,11 @@ const allowedGraphType = computed(() =>
178178

179179
<style>
180180
.plot-data {
181-
border-bottom: var(--c-border) 1px solid;
181+
border-bottom: var(--s-color-outline-variant) 1px solid;
182182
position: relative;
183183
padding: 20px 15px;
184184
overflow-x: hidden;
185185
}
186-
.blockBtn {
187-
color: var(--c-text);
188-
padding: 0 15px;
189-
border: none;
190-
background: var(--c-bk3);
191-
border-radius: 5px;
192-
opacity: 0.75;
193-
border: var(--c-border) 1px solid;
194-
flex-shrink: 0;
195-
}
196-
.delete {
197-
background: var(--c-red);
198-
border-color: var(--c-red2);
199-
}
200-
.blockBtn.active {
201-
background: var(--c-bk1);
202-
}
203-
.blockBtn:hover {
204-
opacity: 1;
205-
}
206-
.blockBtn:active {
207-
opacity: 1;
208-
filter: brightness(0.5);
209-
}
210186
.selectors {
211187
margin-bottom: 10px;
212188
position: relative;
@@ -231,7 +207,7 @@ const allowedGraphType = computed(() =>
231207
}
232208
233209
.sortable-chosen .datablock-drag {
234-
background: var(--c-border);
210+
background: var(--s-color-outline-variant);
235211
}
236212
.sortable-chosen {
237213
z-index: 999;

src/components/dataBlockInner/coordArrInputs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ onMounted(() => {
119119
}
120120
121121
.sortable-chosen > .coordarr-drag {
122-
background: var(--c-border);
122+
background: var(--s-color-outline-variant);
123123
z-index: 999;
124124
}
125125
.add-coord {

src/components/dataBlockInner/coordInputs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function handleCoordInput(
6565
display: flex;
6666
}
6767
.input-box.coord.optional {
68-
color: var(--c-text2);
68+
color: var(--s-color-on-surface-variant);
6969
}
7070
.coord-label {
7171
font-size: 20px;

src/components/dataBlockInner/optInputs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function handleCoordInput(
4141
<style>
4242
.input-box.opt-input {
4343
display: flex;
44-
color: var(--c-text2);
44+
color: var(--s-color-on-surface-variant);
4545
gap: 10px;
4646
justify-content: space-between;
4747
}

src/components/dataBlockInner/switchInputs.vue

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,49 +27,8 @@ const { dataItem, fnType } = defineProps<InputProps>();
2727
<style>
2828
.input-box.switches {
2929
align-items: center;
30-
gap: 10px;
30+
gap: 15px;
3131
padding-left: 5px;
3232
cursor: default;
3333
}
34-
.switch:before,
35-
.switch:after {
36-
position: absolute;
37-
transition: all 0.2s cubic-bezier(0, 0.48, 0.27, 0.98);
38-
}
39-
.switch {
40-
width: 40px;
41-
height: 20px;
42-
border-radius: 5px;
43-
position: relative;
44-
border-radius: 10px;
45-
border: none;
46-
}
47-
.switch.on {
48-
background: var(--c-accent);
49-
}
50-
.switch.off {
51-
background: var(--c-border);
52-
}
53-
.switch:after {
54-
content: "";
55-
background: #fff;
56-
width: 12px;
57-
height: 12px;
58-
border-radius: 50%;
59-
top: 0;
60-
bottom: 0;
61-
margin: auto 0;
62-
}
63-
.switch.off:after {
64-
left: 4px;
65-
}
66-
.switch.on:after {
67-
left: 24px;
68-
}
69-
.switches:hover .switch {
70-
filter: brightness(110%);
71-
}
72-
.switches:active .switch {
73-
filter: brightness(90%);
74-
}
7534
</style>

src/components/nav.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,4 @@ const emit = defineEmits(["toggleDrawer"]);
7272
opacity: 0.5;
7373
font-size: 0.8em;
7474
}
75-
.link {
76-
opacity: 0.5;
77-
font-size: 0.8em;
78-
text-decoration: none;
79-
color: var(--c-text);
80-
}
81-
.link:hover {
82-
opacity: 0.8;
83-
text-decoration: underline;
84-
}
8575
</style>

src/style.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
:root {
2-
--c-bk1: #181818;
3-
--c-bk2: #1f1f1f;
4-
--c-bk3: #25292c;
5-
--c-border: #6a757a8a;
6-
--c-hr: #2b2b2b;
7-
--c-text: #fffe;
8-
--c-text2: #bbb;
9-
--c-accent: #398cab;
10-
--c-red: #800000;
11-
--c-red2: #8f4545;
12-
}
13-
141
:root {
152
color-scheme: dark;
163
line-height: 1.5;
174
font-weight: 400;
18-
color: var(--c-text);
19-
background-color: var(--c-bk1);
205
font-synthesis: none;
216
text-rendering: optimizeLegibility;
227
-webkit-font-smoothing: antialiased;

0 commit comments

Comments
 (0)