From ab1124abba80bcd2c2c3882a4fd55d1463850827 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sat, 14 Jan 2023 15:05:23 +0900
Subject: refactor(client): use css modules

---
 .../frontend/src/components/MkSubNoteContent.vue   | 48 +++++++++++-----------
 1 file changed, 25 insertions(+), 23 deletions(-)

(limited to 'packages/frontend/src/components/MkSubNoteContent.vue')

diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue
index 79eb9ccf45..482a43f474 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>
-- 
cgit v1.2.3-freya

