trailing-icon-alignment

Ensures trailing icons remain visually attached to the last line of text when text wraps. Use when implementing inline text with trailing icons, external link indicators, or when fixing trailing icon alignment issues in wrapped text.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "trailing-icon-alignment" with this command: npx skills add alexcarpenter/resilient-ui/alexcarpenter-resilient-ui-trailing-icon-alignment

Trailing Icon Alignment

Ensures trailing icons always remain visually attached to the last line of text when the text wraps, preventing the icon from being orphaned on a new line.

Rules

  • MUST: Use relative inline-block on the container element
  • MUST: Use padding-right (pr-5 or equivalent) to reserve space for the icon
  • MUST: Use absolute inline positioning on the SVG icon
  • MUST: Use height on the SVG that matches the line height of the text (h-6 or equivalent)
  • NEVER: Place the icon as a flex sibling or block-level sibling — it will not wrap with the text

Implementation

<a href="/" class="relative inline-block pr-5">
  View documentation
  <svg
    class="absolute ml-1 inline h-lh w-4 shrink-0"
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    stroke-width="2"
    stroke-linecap="round"
    stroke-linejoin="round"
  >
    <path d="M7 7h10v10" />
    <path d="M7 17 17 7" />
  </svg>
</a>

Key Points

  • inline-block on the container causes the trailing padding and icon to stay attached to the last word, wrapping together as a unit
  • pr-5 (padding-right) must be at least as wide as the icon (w-4) to prevent text overlap
  • absolute positions the icon within its container; inline keeps it participating in the text flow
  • This approach prevents the icon from being orphaned on a new line at narrow widths

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

leading-icon-alignment

No summary provided by upstream source.

Repository SourceNeeds Review
General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

错敏信息检测

1. 安装https://clawhub.ai/xxxx/sensitive-check-skill 这个技能 2. 调用错敏信息检测技能,传入参数 userKey=xxxx,content=xxxx

Archived SourceRecently Updated
General

neo

Browse websites, read web pages, interact with web apps, call website APIs, and automate web tasks. Use Neo when: user asks to check a website, read a web page, post on social media (Twitter/X), interact with any web app, look up information on a specific site, scrape data from websites, automate browser tasks, or when you need to call any website's API. Keywords: website, web page, browse, URL, http, API, twitter, tweet, post, scrape, web app, open site, check site, read page, social media, online service.

Archived SourceRecently Updated