containers / containers/podman.io

[Bug]: Navbar logo and text collapse on theme toggle

Closed Beginner friendly
#702 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
108
Forks
188
Avg merge
6d 22h
Merged PRs (30d)
12

Description

Hi,mentors- @ashley-cui @TomSweeneyRedHat
When toggling between light and dark theme, the navbar logo and "podman" text briefly collapse/shrink, appearing unstable. The image and text momentarily misalign before settling.
### Steps to reproduce
1. Go to podman.io
2. Click the theme toggle button (light/dark)
3. Observe the navbar logo and text
4. Repeat multiple times

->Expected behavior -Logo and text should remain stable and properly aligned when toggling theme — no collapse, shrinking, or layout shift.

->Actual behavior - Logo container loses explicit width during re-render - "podman" text collapses into logo space Layout momentarily breaks before correcting .

->Root cause -The `.navbar__logo` container has only `height` but no explicit `width` constraint. During theme toggle, the brief re-render causes the image to lose its computed width, triggering the collapse. The `img` element inside also lacks fixed dimensions.

Environment - Browser: Chrome, Safari, Firefox (all affected) - Device: Desktop and mobile

### Upload screenshots or screen recordings

## Before fix (bug visible)

https://github.com/user-attachments/assets/04765d12-fe43-4e9b-95bd-94fb7c674c67

## After fix (stable)

https://github.com/user-attachments/assets/fc95a0dc-3e20-43ff-ba32-3d37cfcc91dd

### LLM Policy

- [x] This issue is human-written, and folow up comments will also be human-written

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the navbar implementation for the `.navbar__logo` selector and the theme toggle entry point, then inspect how the logo image and text are sized during theme changes. Reproduce the toggle in Chrome, Safari, or Firefox; done means the logo and “podman” text stay aligned without shrinking or layout shift.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.