Skip to content

fix: add missing .logoImage CSS class in CNCFInfo component#330

Open
shubhtrek wants to merge 1 commit into
kmesh-net:mainfrom
shubhtrek:fix/cncf-logo-image-css-class
Open

fix: add missing .logoImage CSS class in CNCFInfo component#330
shubhtrek wants to merge 1 commit into
kmesh-net:mainfrom
shubhtrek:fix/cncf-logo-image-css-class

Conversation

@shubhtrek

Copy link
Copy Markdown
Contributor

Hey,

While going through the codebase I noticed that in the CNCFInfo component,
the <img> tag for the CNCF logo has className={styles.logoImage} applied
to it, but if you check styles.module.css — the .logoImage class is
simply not there.

So basically the styling was being referenced but never defined, meaning the
logo just renders at whatever default size the SVG falls back to. Not great.

Added the class with some straightforward responsive styles:

  • width: 100% so it fills its container
  • max-width: 400px to keep it from going too wide
  • height: auto to maintain aspect ratio
  • display: block + margin: 0 auto to center it properly

Tested locally, logo looks fine on the homepage in both light and dark mode.

Closes #326

Copilot AI review requested due to automatic review settings July 9, 2026 11:05
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for kmesh-net ready!

Name Link
🔨 Latest commit b42d718
🔍 Latest deploy log https://app.netlify.com/projects/kmesh-net/deploys/6a4f821c2b81630008f05dd8
😎 Deploy Preview https://deploy-preview-330--kmesh-net.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.

@kmesh-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jayesh9747 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new .logoImage CSS class to the CNCFInfo styles module to manage image sizing and centering. The review feedback suggests a cleaner approach by letting the parent container handle the maximum width and centering, which simplifies the child image's styles and improves maintainability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +28 to +34
.logoImage {
width: 100%;
max-width: 400px;
height: auto;
display: block;
margin: 0 auto;
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a mismatch between the max-width of the parent container .cncfLogo (500px) and the child image .logoImage (400px). Because of this, margin: 0 auto is required on .logoImage to keep it centered within the parent when the viewport is between 400px and 500px.

A cleaner and more maintainable approach is to let the parent container .cncfLogo handle the sizing and centering, and keep the image styles simple. You can update .cncfLogo (on line 16) to max-width: 400px (or keep it at 500px if that was the intended size) and simplify .logoImage as suggested below. This also ensures there is a newline at the end of the file.

  .logoImage {
    width: 100%;
    height: auto;
    display: block;
  }

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a missing CSS Module class referenced by the CNCFInfo component so the CNCF logo image is styled consistently and responsively on the homepage.

Changes:

  • Adds the missing .logoImage class to src/components/CNCFInfo/styles.module.css.
  • Applies responsive sizing and centering rules to prevent the logo from rendering at default SVG dimensions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shubhtrek shubhtrek force-pushed the fix/cncf-logo-image-css-class branch from 711d2f5 to 9d08bed Compare July 9, 2026 11:07
@shubhtrek shubhtrek force-pushed the fix/cncf-logo-image-css-class branch from 9d08bed to 79c054d Compare July 9, 2026 11:10
Copilot AI review requested due to automatic review settings July 9, 2026 11:10
The CNCFInfo component applies styles.logoImage to the CNCF logo
img element, but the corresponding .logoImage class was not defined
in styles.module.css. This caused the image to fall back to its
default SVG dimensions instead of rendering with consistent sizing.

Add the missing .logoImage class with responsive styling:
- width: 100% for full container width
- max-width: 400px to cap the logo size
- height: auto to preserve aspect ratio
- display: block + margin: 0 auto for centering

Signed-off-by: Shubh Pingale <135618936+shubhtrek@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +28 to +32
.logoImage {
width: 100%;
height: auto;
display: block;
} No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][UI] logoImage CSS class is referenced but not defined in styles.module.css

3 participants