Skip to content

Commit a5a3bec

Browse files
committed
style: support css variable defintion color.
1 parent 3f5419e commit a5a3bec

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/style/index.less

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
height: 100%;
55
display: flex;
66
flex-direction: row;
7+
--w-split-bar-shadow: #d5d5d5;
8+
--w-split-bar-shadow-disable: #d5d5d5;
79
&-bar {
810
z-index: 10;
911
position: relative;
1012
justify-content: center;
1113
display: flex;
12-
background: rgb(248, 248, 249);
14+
background: var(--w-split-bar-background, rgb(248, 248, 249));
1315
user-select: none;
1416
&::before, &::after {
1517
content: '';
@@ -21,7 +23,7 @@
2123
}
2224
&:hover:not(.disable) {
2325
transition: background-color .3s;
24-
background: #ecf7ff;
26+
background: var(--w-split-bar-hover-background, #ecf7ff);
2527
}
2628
}
2729
&.dragging &-pane {
@@ -45,11 +47,11 @@
4547
cursor: col-resize;
4648
width: 5px;
4749
flex-direction: column;
48-
box-shadow: inset 1px 0 0 0 #d5d5d5, 1px 0 0 0 #d5d5d5;
50+
box-shadow: inset 1px 0 0 0 var(--w-split-bar-shadow), 1px 0 0 0 var(--w-split-bar-shadow);
4951
&::before, &::after {
5052
height: 3px;
5153
width: 100%;
52-
box-shadow: inset 0 1px 0 0 #d5d5d5, 0 1px 0 0 #d5d5d5;
54+
box-shadow: inset 0 1px 0 0 var(--w-split-bar-shadow), 0 1px 0 0 var(--w-split-bar-shadow);
5355
}
5456
&::before {
5557
margin-top: -1px;
@@ -58,7 +60,7 @@
5860
margin-top: 3px;
5961
}
6062
&.disable {
61-
box-shadow: inset 1px 0 0 0 #e6e6e6, 1px 0 0 0 #eaeaea !important;
63+
box-shadow: inset 1px 0 0 0 var(--w-split-bar-shadow-disable), 1px 0 0 0 var(--w-split-bar-shadow-disable) !important;
6264
}
6365
}
6466
&-vertical {
@@ -70,14 +72,14 @@
7072
height: 5px;
7173
align-items: center;
7274
flex-direction: row;
73-
box-shadow: inset 0 1px 0 0 #d5d5d5, 0 1px 0 0 #d5d5d5;
75+
box-shadow: inset 0 1px 0 0 var(--w-split-bar-shadow), 0 1px 0 0 var(--w-split-bar-shadow);
7476
&.disable {
75-
box-shadow: inset 0 1px 0 0 #e6e6e6, 0 1px 0 0 #eaeaea !important;
77+
box-shadow: inset 0 1px 0 0 var(--w-split-bar-shadow-disable), 0 1px 0 0 var(--w-split-bar-shadow-disable) !important;
7678
}
7779
&::before, &::after {
7880
height: 100%;
7981
width: 3px;
80-
box-shadow: inset 1px 0 0 0 #d5d5d5, 1px 0 0 0 #d5d5d5;
82+
box-shadow: inset 1px 0 0 0 var(--w-split-bar-shadow), 1px 0 0 0 var(--w-split-bar-shadow);
8183
}
8284
&::before {
8385
margin-left: -1px;
@@ -98,7 +100,7 @@
98100
&-vertical > &-line-bar:hover,
99101
&-horizontal > &-line-bar:hover {
100102
&::before {
101-
border-color: #008EF0;
103+
background: var(--w-split-line-bar-hover-border-color, #008EF0);
102104
}
103105
}
104106
&-vertical > &-line-bar {
@@ -114,7 +116,7 @@
114116
margin-bottom: -6px;
115117
height: 6px;
116118
&::after {
117-
background-color: #008EF0;
119+
background: var(--w-split-line-bar-active-background, #008EF0);
118120
}
119121
}
120122
&::after {
@@ -136,7 +138,7 @@
136138
margin-right: -6px;
137139
width: 6px;
138140
&::after {
139-
background-color: #008EF0;
141+
background: var(--w-split-line-bar-active-background, #008EF0);
140142
}
141143
}
142144
&::after {
@@ -158,7 +160,7 @@
158160
&::after {
159161
content: '';
160162
display: block;
161-
background-color: #d5d5d5;
163+
background-color: var(--w-split-line-bar-background, #d5d5d5);
162164
}
163165
}
164166
}

0 commit comments

Comments
 (0)