A platform for community discussion. Free, open, simple.
UX: prevent title edit icon from wrapping onto its own line (#36709)
Kris21a628ac06d1
diff --git a/app/assets/stylesheets/common/base/topic.scss b/app/assets/stylesheets/common/base/topic.scssindex e569245a984..42d18096924 100644--- a/app/assets/stylesheets/common/base/topic.scss+++ b/app/assets/stylesheets/common/base/topic.scss@@ -197,10 +197,12 @@width: 100%;}- .fancy-title {- .d-icon-pencil {- font-size: var(--font-down-3);- }+ .edit-topic__wrapper {+ // managing whitespace to prevent the edit icon from wrapping to a new line+ white-space: nowrap;+ font-size: var(--font-down-3);+ vertical-align: 0.125em;+ margin-left: var(--space-1);}html.discourse-no-touch & {diff --git a/frontend/discourse/app/templates/topic.gjs b/frontend/discourse/app/templates/topic.gjsindex a2a4f5c65a1..820e8f528f0 100644--- a/frontend/discourse/app/templates/topic.gjs+++ b/frontend/discourse/app/templates/topic.gjs@@ -234,11 +234,12 @@ export default <template>{{on "click" @controller.handleTitleClick}}class="fancy-title">- {{htmlSafe @controller.model.fancyTitle}}-- {{#if @controller.model.details.can_edit}}- {{icon "pencil" class="edit-topic"}}- {{/if}}+ {{htmlSafe @controller.model.fancyTitle~}}+ {{~#if @controller.model.details.can_edit~}}+ <span class="edit-topic__wrapper">+ {{icon "pencil" class="edit-topic"}}+ </span>+ {{~/if}}</a>{{/if}}