Skip to content

Commit d94ff46

Browse files
committed
fix #42
1 parent b4c3916 commit d94ff46

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

src/App.vue

+13-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121
<div>
2222
<button @click="populate()">populate tree</button>
23-
<ul class="g8-tree-view g8-tree__highlight_hover">
23+
<ul class="g8-tree-view g8-tree__dark g8-tree__highlight_hover">
2424
<g8-tree-view
2525
checker="1"
2626
:item="item"
@@ -43,12 +43,12 @@
4343
"
4444
>
4545
<template #default="{ item }">
46-
<span :class="{ blue: !item.color }">
46+
<span :class="{ tint: !item.color }">
4747
{{ item.name }} (default slot)
4848
</span>
4949
</template>
5050
<template #tag="{ tag }">
51-
<span :class="{ blue: !tag.color }">
51+
<span :class="{ tint: !tag.color }">
5252
{{ tag.label }} (tag slot)
5353
</span>
5454
</template>
@@ -129,11 +129,18 @@ body {
129129
height: 100%;
130130
}
131131

132+
html,
133+
body,
134+
button,
135+
#app {
136+
color: #888888;
137+
background: #333333;
138+
}
139+
132140
#app {
133141
font-family: Avenir, Helvetica, Arial, sans-serif;
134142
-webkit-font-smoothing: antialiased;
135143
-moz-osx-font-smoothing: grayscale;
136-
color: #2c3e50;
137144
display: flex;
138145
height: 100%;
139146
flex-direction: column;
@@ -151,7 +158,7 @@ span[id] {
151158
display: inline-block;
152159
}
153160

154-
.blue {
155-
color: blue;
161+
.tint {
162+
color: lightseagreen;
156163
}
157164
</style>

src/components/tree-view.scss

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $g8-tree-fg: #333 !default;
2727

2828
.g8-tree__node {
2929
list-style: none;
30-
padding: .1rem 0 .1rem 1rem;
30+
padding: 0.1rem 0 0.1rem 1rem;
3131
}
3232

3333
.g8-tree__node_label {
@@ -41,7 +41,7 @@ $g8-tree-fg: #333 !default;
4141

4242
.g8-tree__toggle,
4343
.g8-tree__checker {
44-
font-size: .8rem;
44+
font-size: 0.8rem;
4545
width: 1rem;
4646
text-align: center;
4747
}
@@ -99,7 +99,7 @@ $g8-tree-fg: #333 !default;
9999
font-weight: bold;
100100

101101
.g8-tree__toggle:before {
102-
padding-right: .5rem;
102+
padding-right: 0.5rem;
103103
content: '\25ba';
104104
}
105105
}
@@ -110,12 +110,12 @@ $g8-tree-fg: #333 !default;
110110
}
111111

112112
.g8-tree__node_tag {
113-
margin-left: .5rem;
114-
padding: 0 .2rem;
115-
font-size: .6rem;
113+
margin-left: 0.5rem;
114+
padding: 0 0.2rem;
115+
font-size: 0.6rem;
116116
font-weight: normal;
117117
max-width: 6rem;
118-
border-radius: .2rem;
118+
border-radius: 0.2rem;
119119
background: $g8-tree-bg;
120120
overflow: hidden;
121121
text-overflow: ellipsis;
@@ -169,8 +169,8 @@ $g8-tree-fg: #333 !default;
169169
}
170170
}
171171

172-
.g8-tree__highlight_hover .g8-tree__node_label:hover,
173-
.g8-tree__highlight_hover .g8-tree__node_label:focus {
174-
background: $g8-tree-fg;
172+
&.g8-tree__highlight_hover .g8-tree__node_label:hover,
173+
&.g8-tree__highlight_hover .g8-tree__node_label:focus {
174+
background: lighten($g8-tree-fg, 10%);
175175
}
176176
}

0 commit comments

Comments
 (0)