Skip to content

fix layout balance for docs/home on tablet and mobile#52485

Open
ritorhymes wants to merge 1 commit intokubernetes:mainfrom
ritovision:fix/center-balance-docs-home
Open

fix layout balance for docs/home on tablet and mobile#52485
ritorhymes wants to merge 1 commit intokubernetes:mainfrom
ritovision:fix/center-balance-docs-home

Conversation

@ritorhymes
Copy link
Contributor

Description

  1. The cards on mobile are positioned to be centered but appear noticeably offset to the left due to padding applied on the right side only, throwing off the visual balance. Removing it on the tablet and mobile breakpoint so neither side has padding eliminates the offset to center the cards proportionally; there is already sufficient space around the cards, so adding proportional padding to the left side instead does not seem the preferred approach.

  2. Each card's button width is the same size on desktop, but on mobile and tablet screens, the button sizes vary, and especially since cards are generally expected to appear uniform, it looks visually unbalanced rather than a deliberate stylistic choice. On mobile and tablet, because all the cards' content are aligned to the left creating significant whitespace on the right side, I felt the natural solution in achieving uniformity is to allow all the buttons to span the entire card width and fill parts of that whitespace.

The result of the fixes should be a more purposeful and uniform card layout on tablet and mobile.

The fixes are in _documentation.scss to:

  • remove padding causing offset to properly center the cards on mobile.
  • make button width consistent on tablet and mobile screens by spanning full card width.

Before and After

Before - centering
docs-BEFORE-mobile

After - centering
docs-AFTER-mobile

Before - button width
docs-BEFORE-tablet

After - button width
docs-AFTER-tablet

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 22, 2025
@k8s-ci-robot
Copy link
Contributor

[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 lmktfy for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 22, 2025
@netlify
Copy link

netlify bot commented Sep 22, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 1c13cd5
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/68d12a0cf0810300085b6d26
😎 Deploy Preview https://deploy-preview-52485--kubernetes-io-main-staging.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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants