Skip to content

Commit 0df336f

Browse files
fix: improve filter and other style
1 parent 539be46 commit 0df336f

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

website/src/catalog/Option.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ defineProps({
2424
transition: all 0.25s;
2525
}
2626
.highlight {
27-
color: var(--catalog-filter-color);
28-
border-color: var(--catalog-filter-color);
29-
}
30-
.highlight-filter:hover {
31-
color: var(--catalog-filter-color);
27+
border-color: currentColor;
3228
}
3329
</style>

website/src/catalog/RuleFilter.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,12 @@ input[type="checkbox"] {
120120
min-width: 3em;
121121
}
122122
.filter-option:hover {
123+
color: var(--vp-c-brand-1);
123124
opacity: 1;
124-
color: var(--catalog-filter-color);
125125
}
126126
127127
input[type="checkbox"]:checked + code.option {
128128
opacity: 1;
129-
color: var(--catalog-filter-color);
130129
border-color: currentColor;
131130
}
132131

website/src/catalog/RuleItem.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const moreFeatures = computed(() => Math.max(meta.features.length - 2, 0))
3030
<div class="rule-badges">
3131
<a :href="`/catalog/${meta.language}/`" target="_blank">
3232
<Badge type="info" :class="filter.selectedLanguages.length && 'highlight-filter'">
33-
{{ languages[meta.language] }}
33+
📚 {{ languages[meta.language] }}
3434
</Badge>
3535
</a>
3636
<Badge v-if="meta.hasFix" type="tip">
@@ -62,7 +62,7 @@ const moreFeatures = computed(() => Math.max(meta.features.length - 2, 0))
6262
/>
6363
<Option v-if="moreFeatures" :text="`+${moreFeatures}`"/>
6464
</div>
65-
<a :href="meta.playgroundLink" class="playground" target="_blank">
65+
<a :href="meta.playgroundLink" class="playground link" target="_blank">
6666
Try in Playground →
6767
</a>
6868
</div>
@@ -140,11 +140,14 @@ a:hover {
140140
transition-property: all;
141141
transition-duration: 0.25s;
142142
}
143+
a > .VPBadge:hover {
144+
text-decoration: underline;
145+
}
143146
.highlight-filter {
144-
color: var(--catalog-filter-color);
145-
border-color: var(--catalog-filter-color);
147+
color: var(--vp-c-text-2);
148+
border-color: currentColor;
146149
}
147150
.highlight-filter:hover {
148-
color: var(--catalog-filter-color);
151+
color: var(--vp-c-text-2);
149152
}
150153
</style>

website/src/catalog/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ const filter = ref<Filter>({
2222
<style scoped>
2323
.catalog-filter {
2424
min-height: 300px;
25-
--catalog-filter-color: #407cb5;
2625
}
2726
</style>

0 commit comments

Comments
 (0)