From 6fb11e864cd566cd44342baed1d7291414864328 Mon Sep 17 00:00:00 2001 From: Tsukina-7mochi Date: Tue, 11 Jun 2024 18:07:23 +0900 Subject: [PATCH 1/3] fix: set overflow-wrap for long description --- src/repositoryCardDisplay.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/repositoryCardDisplay.ts b/src/repositoryCardDisplay.ts index 3edafc9..3339bfd 100644 --- a/src/repositoryCardDisplay.ts +++ b/src/repositoryCardDisplay.ts @@ -86,6 +86,7 @@ export class RepositoryCardDisplay extends LitElement { #description { margin: 0; + overflow-wrap: anywhere; } #source { From fa6bbb0447334f61ad8d86aabd0fbb4cd79a945d Mon Sep 17 00:00:00 2001 From: Tsukina-7mochi Date: Tue, 11 Jun 2024 18:12:05 +0900 Subject: [PATCH 2/3] fix: replace ids into classes --- src/repositoryCardDisplay.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/repositoryCardDisplay.ts b/src/repositoryCardDisplay.ts index 3339bfd..b792bce 100644 --- a/src/repositoryCardDisplay.ts +++ b/src/repositoryCardDisplay.ts @@ -50,7 +50,7 @@ export class RepositoryCardDisplay extends LitElement { color: #646cff; } - a#wrapper { + a.wrapper { display: flex; flex-direction: column; gap: 0.35em; @@ -79,22 +79,22 @@ export class RepositoryCardDisplay extends LitElement { gap: 1em; } - #avatar { + img.avatar { height: 3.5em; border-radius: 4px; } - #description { + p.description { margin: 0; overflow-wrap: anywhere; } - #source { + div.source { font-size: 0.9em; color: var(--c-fg-2); } - #topics > span { + div.topics > span { margin-right: 0.5em; } `; @@ -142,18 +142,18 @@ export class RepositoryCardDisplay extends LitElement { render() { const avatar = this.avatarUrl !== null - ? html`${this.owner}` + ? html`${this.owner}` : nothing; const forkSource = this.forkSource !== null - ? html`` + ? html`` : nothing; - const description = this.description !== null ? html`

${this.description}

` : nothing; + const description = this.description !== null ? html`

${this.description}

` : nothing; const language = this.language !== null - ? html`
${languageColorElement(this.language)} ${this.language}
` + ? html`
${languageColorElement(this.language)} ${this.language}
` : nothing; - const stars = this.stars !== null ? html`
${starIcon} ${this.stars}
` : nothing; - const forks = this.forks !== null ? html`
${forkIcon} ${this.forks}
` : nothing; - const license = this.license !== null ? html`
${licenseIcon} ${this.license}
` : nothing; + const stars = this.stars !== null ? html`
${starIcon} ${this.stars}
` : nothing; + const forks = this.forks !== null ? html`
${forkIcon} ${this.forks}
` : nothing; + const license = this.license !== null ? html`
${licenseIcon} ${this.license}
` : nothing; const topicSpans = html`${map(this.topics, (topic) => html`${topic}`)}`; const topicIcon = this.topics.length > 0 ? tagIcon : nothing; @@ -161,7 +161,7 @@ export class RepositoryCardDisplay extends LitElement { return html` - +
${avatar}
@@ -176,7 +176,7 @@ export class RepositoryCardDisplay extends LitElement { ${forks} ${license}
-
+
${topicIcon} ${topicSpans}
From 6ea67c0164b4ae7c05fa34809bab4705aa6fd77a Mon Sep 17 00:00:00 2001 From: Tsukina-7mochi Date: Tue, 11 Jun 2024 18:30:58 +0900 Subject: [PATCH 3/3] fix: add overflow: hidden for wrapper --- src/repositoryCardDisplay.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/repositoryCardDisplay.ts b/src/repositoryCardDisplay.ts index b792bce..0881538 100644 --- a/src/repositoryCardDisplay.ts +++ b/src/repositoryCardDisplay.ts @@ -59,6 +59,7 @@ export class RepositoryCardDisplay extends LitElement { color: var(--c-fg); line-height: 1.5; text-indent: 0; + overflow: hidden; } h2 {