Skip to content

Commit dd43e73

Browse files
author
reco_luan
committed
fix(vuepress-plugin-comments): comment cmpt doesn't inherit $accentColor
1 parent d3d41aa commit dd43e73

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

packages/@vuepress-reco/vuepress-plugin-comments/bin/Comments.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<div
33
class="comments-wrapper"
44
v-show="isShowComments">
5-
<component
6-
:is="componentName"
7-
:options="options" />
5+
<ClientOnly>
6+
<component
7+
:is="componentName"
8+
:options="options" />
9+
</ClientOnly>
810
</div>
911
</template>
1012

packages/@vuepress-reco/vuepress-plugin-comments/bin/Valine.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ export default {
9494
height: 2.8rem;
9595
border-radius: .25rem
9696
border: none
97+
.vhead .vnick
98+
color $accentColor
99+
&::before
100+
background $accentColor
97101
.vh
98102
border-bottom: none
99103
.vhead .vsys
@@ -122,7 +126,7 @@ export default {
122126
margin: 0 .3rem
123127
padding: .1rem .6rem .05rem .6rem
124128
p .at
125-
color: #1abc9c
129+
color: $accentColor
126130
&.expand:before
127131
z-index 1
128132
background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff)
@@ -137,4 +141,8 @@ export default {
137141
code, pre, .vbtn
138142
background var(--background-color)
139143
color var(--text-color)
144+
a
145+
color $accentColor
146+
&::before
147+
background $accentColor
140148
</style>

packages/@vuepress-reco/vuepress-plugin-comments/bin/Vssue.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ export default {
5959
</script>
6060

6161
<style lang="stylus">
62+
$vssue-theme-color ?= $accentColor
63+
$vssue-text-color ?= $textColor
64+
$vssue-border-color ?= $borderColor
65+
$vssue-breakpoint-mobile ?= $MQMobile
66+
67+
@import '~vssue/src/styles/index'
68+
@import '~github-markdown-css/github-markdown.css'
69+
6270
.vssue-wrapper.vssue
6371
color: #2c3e50
6472
color: var(--text-color)

0 commit comments

Comments
 (0)