Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/CNCFInfo/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@
.cncfLine2 {
font-size: 1.8rem;
}


.logoImage {
width: 100%;
height: auto;
display: block;
}
Comment on lines +28 to +32

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;
  }

Comment on lines +28 to +32
Loading