Skip to content

Rebuild CSS so the tooltip's w-max takes effect - #67

Merged
methodofaction merged 2 commits into
mainfrom
tooltip-css-rebuild
Sep 1, 2026
Merged

Rebuild CSS so the tooltip's w-max takes effect#67
methodofaction merged 2 commits into
mainfrom
tooltip-css-rebuild

Conversation

@methodofaction

Copy link
Copy Markdown
Contributor

Summary

Tooltips were collapsing to one word per line (a tall, skinny pill) whenever the content was more than a couple of words.

Root cause: d4443e7 ("Let the tooltip card hug short content") switched the tooltip card from a fixed w-56 to w-max max-w-56, but only regenerated the templ files — assets/popui.css was never rebuilt, so .w-max didn't exist in the compiled stylesheet. Without width: max-content, the absolutely positioned card shrink-wrapped against its tiny trigger wrapper and collapsed to min-content.

Fix: rebuild the compiled CSS (go generate ./...). The only change is the missing .w-max{width:max-content} rule. No template changes.

Behavior after the fix (measured on the docs site)

  • Short tooltips hug their content (e.g. the "Bottom" position example renders 158px wide)
  • "Right — Shown to the right of the trigger." renders 201×58px instead of the collapsed pill
  • Long content caps at 224px (max-w-56) and wraps normally

Notes for reviewers

The process gap here was skipping step 3 of the repo workflow in CLAUDE.md: when a templ change introduces new utility classes, the checked-in assets/popui.css must be regenerated in the same commit.

🤖 Generated with Claude Code

d4443e7 switched the tooltip card to w-max max-w-56 but did not
regenerate assets/popui.css, so .w-max never existed in the compiled
stylesheet. Without width:max-content the absolutely positioned card
shrink-wrapped against the tiny trigger wrapper and collapsed to one
word per line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for popui-go ready!

Name Link
🔨 Latest commit 3c7e7af
🔍 Latest deploy log https://app.netlify.com/projects/popui-go/deploys/6a96fe7e40ff790007503de7
😎 Deploy Preview https://deploy-preview-67--popui-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@methodofaction

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	assets/popui.css

Co-authored-by: methodofaction <51445+methodofaction@users.noreply.github.com>

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. I merged main into this branch, fixed the conflict in assets/popui.css, and pushed merge commit 3c7e7af.

@methodofaction
methodofaction merged commit 5251c31 into main Sep 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants