Skip to content

Improve Responsive Image Handling in Docs (Remove Inline Widths, Avoid Media Queries, No !important) #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zihanKuang opened this issue May 7, 2025 · 1 comment
Assignees
Labels
framework/hugo help wanted Extra attention is needed kind/enhancement Improvement in current feature language/css language/html language/javascript Javascript related

Comments

@zihanKuang
Copy link
Contributor

zihanKuang commented May 7, 2025

The current CSS solution relies on media queries and !important declarations, which can be fragile and harder to maintain. The goal of this issue is to refactor and optimize the current solution for better long-term maintainability and scalability.
Screenshots that are too low in quality should ideally be excluded from the docs or not used in figure components, to preserve visual clarity and professionalism.

Optimization Goals:

  1. Eliminate media queries

    • Replace fixed breakpoint rules with more adaptive techniques such as max-width, min-width, and calc() to allow fluid layouts across any screen size.
  2. Avoid !important usage

    • Refactor selectors and specificity to override inline styles cleanly without relying on !important.
  3. Improve scaling for various image types

    • Allow small but high-quality images to retain their native resolution.
    • Prevent large or low-resolution images from being upscaled and pixelated.
@zihanKuang
Copy link
Contributor Author

This issue is closed as it was resolved by Closed #551.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework/hugo help wanted Extra attention is needed kind/enhancement Improvement in current feature language/css language/html language/javascript Javascript related
Projects
None yet
Development

No branches or pull requests

1 participant