Skip to content

Commit

Permalink
Fix Profile URL truncation on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheringer committed Jan 7, 2025
1 parent 147d616 commit 0f1fd79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions web/packages/hovercards/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@ export default class Hovercards {
</a>
</div>
${
description &&
`<div class="gravatar-hovercard__body">
<p class="gravatar-hovercard__description">${ escHtml( description ) }</p>
</div>`
description
? `<div class="gravatar-hovercard__body">
<p class="gravatar-hovercard__description">${ escHtml( description ) }</p>
</div>`
: ''
}
<div class="gravatar-hovercard__social-links">
<a class="gravatar-hovercard__social-link" href="${ trackedProfileUrl }" target="_blank" data-service-name="gravatar">
Expand Down
8 changes: 5 additions & 3 deletions web/packages/hovercards/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ $font-sf-pro: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Robo
}

.gravatar-hovercard__profile-url {

@include ellipsis(1);

// webkit-box used by ellipsis mixin
// doesn't work well for URLs on Firefox
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: $color-gray;
}

Expand Down

0 comments on commit 0f1fd79

Please sign in to comment.