Skip to content

fix: constrain decorative code snippets to hero section#488

Open
nishtha-agarwal-211 wants to merge 2 commits into
steam-bell-92:mainfrom
nishtha-agarwal-211:fix/decorative-code-overlapping-474
Open

fix: constrain decorative code snippets to hero section#488
nishtha-agarwal-211 wants to merge 2 commits into
steam-bell-92:mainfrom
nishtha-agarwal-211:fix/decorative-code-overlapping-474

Conversation

@nishtha-agarwal-211
Copy link
Copy Markdown
Contributor

@nishtha-agarwal-211 nishtha-agarwal-211 commented May 20, 2026

Describe the changes

Fixes #474

DOM Restructure

  • Wrapped the landing page hero components (.hero-background, .hero-code-snippets, .container) inside a .hero-section container in web-app/index.html.

CSS Fix

  • Restored and defined .hero-section in web-app/css/styles.css with:
    • position: relative
    • overflow: hidden

This constrains all absolutely positioned decorative elements within the hero section and prevents overlap with the projects section.

Visual Improvements

  • Reduced code snippet opacity from 0.5/0.42 to a subtle 0.15 - 0.22 range for improved readability and reduced visual clutter.

JavaScript Fix

  • Restored .hero-section to resolve the IntersectionObserver console error in main.js.

How to test

  1. Open the homepage locally.
  2. Verify that floating code snippets remain inside the hero section.
  3. Ensure decorative elements no longer overlap project cards.
  4. Confirm background visuals remain subtle and readable.
  5. Check the browser console to verify there are no IntersectionObserver errors.

Copilot AI review requested due to automatic review settings May 20, 2026 10:45
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@nishtha-agarwal-211 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 reintroduces a dedicated .hero-section wrapper and styling so that absolutely positioned decorative elements (background + floating code snippets) are constrained to the landing-page hero, preventing overlap into the projects section.

Changes:

  • Wraps the hero DOM content in a new <section class="hero-section"> container.
  • Restores/enables the .hero-section CSS (positioning + overflow clipping) and adjusts hero padding.
  • Lowers decorative code snippet opacity values to reduce visual clutter.

Reviewed changes

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

File Description
web-app/index.html Wrapes hero elements in a .hero-section container to constrain decorative positioning.
web-app/css/styles.css Enables .hero-section styling (relative + overflow hidden) and tunes snippet opacity/padding.

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

Comment thread web-app/css/styles.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Issue: Decorative background code text overlaps project cards on homepage

2 participants