diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 79eb9ccf45e7ff207ddff97ad71e338805fe764d..482a43f47481dde2aa3d32e2c1fe28dee946a78e 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -1,11 +1,11 @@ <template> -<div class="wrmlmaau" :class="{ collapsed }"> - <div class="body"> +<div :class="[$style.root, { [$style.collapsed]: collapsed }]"> + <div :class="$style.body"> <span v-if="note.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span> <span v-if="note.deletedAt" style="opacity: 0.5">({{ i18n.ts.deleted }})</span> - <MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA> + <MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA> <Mfm v-if="note.text" v-once :text="note.text" :author="note.user" :i="$i"/> - <MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA> + <MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA> </div> <details v-if="note.files.length > 0"> <summary>({{ $t('withNFiles', { n: note.files.length }) }})</summary> @@ -15,8 +15,8 @@ <summary>{{ i18n.ts.poll }}</summary> <MkPoll :note="note"/> </details> - <button v-if="collapsed" class="fade _button" @click="collapsed = false"> - <span>{{ i18n.ts.showMore }}</span> + <button v-if="collapsed" :class="$style.fade" class="_button" @click="collapsed = false"> + <span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span> </button> </div> </template> @@ -39,23 +39,10 @@ const collapsed = $ref( )); </script> -<style lang="scss" scoped> -.wrmlmaau { +<style lang="scss" module> +.root { overflow-wrap: break-word; - > .body { - > .reply { - margin-right: 6px; - color: var(--accent); - } - - > .rp { - margin-left: 4px; - font-style: oblique; - color: var(--renote); - } - } - &.collapsed { position: relative; max-height: 9em; @@ -70,7 +57,7 @@ const collapsed = $ref( height: 64px; background: linear-gradient(0deg, var(--panel), var(--X15)); - > span { + > .fadeLabel { display: inline-block; background: var(--panel); padding: 6px 10px; @@ -80,11 +67,26 @@ const collapsed = $ref( } &:hover { - > span { + > .fadeLabel { background: var(--panelHighlight); } } } } } + +.body { + +} + +.reply { + margin-right: 6px; + color: var(--accent); +} + +.rp { + margin-left: 4px; + font-style: oblique; + color: var(--renote); +} </style>