Skip to content

Commit

Permalink
style: remove the use of has css selector
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Aug 22, 2023
1 parent be2ae7a commit b1ff151
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/components/Link/LinkAvatar.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<template>
<a
class="links-group-avatar h-[120px] w-[120px] flex items-center justify-center text-white text-6xl font-bold scale"
:href="link"
target="_blank"
:title="title"
>
<a :class="linkGroupClasses" :href="link" target="_blank" :title="title">
<img
v-if="source"
:class="avatarClasses"
Expand Down Expand Up @@ -40,6 +35,14 @@ export default defineComponent({
const appStore = useAppStore()
return {
linkGroupClasses: computed(() => {
return {
'links-group-avatar h-[120px] w-[120px] flex items-center justify-center text-white text-6xl font-bold':
true,
'diamond-shape':
appStore.themeConfig.theme.profile_shape === 'diamond-avatar'
}
}),
avatarClasses: computed(() => {
return {
'h-full w-full shadow-xl m-0 transform-gpu': true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/LinkBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default defineComponent({
.links-group-avatar:nth-child(even) {
@apply mt-4 transform-gpu;
transform: translate(-60px);
&:has(.diamond-avatar) {
&.diamond-shape {
@apply mt-0;
transform: translate(-66px);
}
Expand Down

0 comments on commit b1ff151

Please sign in to comment.