Skip to content

Make hero-text on landing page bigger and becoming two rows#70

Open
hyddeos wants to merge 1 commit intowithstudiocms:mainfrom
hyddeos:main
Open

Make hero-text on landing page bigger and becoming two rows#70
hyddeos wants to merge 1 commit intowithstudiocms:mainfrom
hyddeos:main

Conversation

@hyddeos
Copy link
Contributor

@hyddeos hyddeos commented Mar 9, 2026

Description

  • Closes #
  • What does this PR change? Give us a brief description.
    Simple update to make the Header hero text be bigger and two lines instead of one. Also a font-size change on smaller screens so it keeps looking good.
Skärmavbild 2026-03-09 kl  15 25 46

Summary by CodeRabbit

Release Notes

  • Style
    • Refined hero headline typography with adjusted sizing and enhanced text wrapping for improved visual balance across desktop layouts.
    • Optimized responsive design to ensure consistent headline appearance and presentation on mobile devices and smaller screens.

@hyddeos hyddeos requested a review from a team as a code owner March 9, 2026 14:26
@htg-1-studiocms-cloud
Copy link

htg-1-studiocms-cloud bot commented Mar 9, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
StudioCMS Website ✅ Done Preview URL 2026-03-11T06:56:57.478Z

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

The hero headline in the index page has been restyled with increased font size (from 2.5em to 4.8em), text-wrap balance applied, and a responsive breakpoint added (3em at max-width 640px) for smaller screens. No functional changes.

Changes

Cohort / File(s) Summary
Hero Typography Styling
www/src/pages/index.astro
Increased hero headline font-size from 2.5em to 4.8em, added text-wrap: balance for large screens, and added responsive override to 3em at max-width 640px.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • Adammatthiesen

Poem

🐰 The hero title now stands tall and proud,
At 4.8em, speaking clear and loud,
With text-wrap balance, oh so divine,
Responsive at 640, it shrinks just fine,
A typographic leap makes the page shine! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making the hero text larger and causing it to wrap into two rows, which matches the CSS adjustments in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
www/src/pages/index.astro (1)

661-664: Make the hero title fluid instead of width-only.

Line 662 hard-codes a very large jump to 4.8em, and Lines 1221-1223 only reduce it below 640px. Because the hero is still fixed at 60vh, short-but-wide viewports can end up with a title/CTA stack taller than the hero, and text-wrap: balance still does not guarantee exactly two lines. A fluid size plus a line-length constraint would make this much more robust.

Suggested CSS direction
 .hero h1 {
-		font-size: 4.8em;
+		font-size: clamp(3rem, 6vw, 4.8rem);
+		max-inline-size: 12ch;
+		line-height: 1.05;
 		text-wrap: balance;
 	}

-	`@media` screen and (max-width: 640px) {
-    .hero h1 {
-		  font-size: 3em;
-	  }
+	`@media` screen and (max-width: 640px), screen and (max-height: 700px) {
+		.hero {
+			height: auto;
+			min-height: 60vh;
+		}
 		.target-group-div,
 		.target-group-div.enterprise {
 			--reason-cols: 1;
 		}

Also applies to: 1220-1223

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@www/src/pages/index.astro` around lines 661 - 664, The hero title currently
uses a fixed large font-size in .hero h1 (and the smaller breakpoint rules
later) which can overflow the fixed hero height (60vh); change to a fluid
responsive size using clamp() or a vw-based formula (e.g., clamp(min, preferred
vw-based, max)) for .hero h1 so it scales with viewport width and has sensible
min/max limits, and add a line-length constraint (max-width in ch or px, or a
container width cap) to force 2-line wrapping consistency; update the
corresponding smaller-breakpoint rules (the later .hero h1 overrides) to match
the fluid approach so both desktop and mobile use the same clamp-based sizing
and the hero content stays inside the 60vh container.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@www/src/pages/index.astro`:
- Around line 661-664: The hero title currently uses a fixed large font-size in
.hero h1 (and the smaller breakpoint rules later) which can overflow the fixed
hero height (60vh); change to a fluid responsive size using clamp() or a
vw-based formula (e.g., clamp(min, preferred vw-based, max)) for .hero h1 so it
scales with viewport width and has sensible min/max limits, and add a
line-length constraint (max-width in ch or px, or a container width cap) to
force 2-line wrapping consistency; update the corresponding smaller-breakpoint
rules (the later .hero h1 overrides) to match the fluid approach so both desktop
and mobile use the same clamp-based sizing and the hero content stays inside the
60vh container.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b1311cc1-91f9-4771-b06f-17b3713390be

📥 Commits

Reviewing files that changed from the base of the PR and between eedcc17 and 49a4d80.

📒 Files selected for processing (1)
  • www/src/pages/index.astro

@louisescher
Copy link
Member

Alright, appreciate the change! This is a little too big, for example, here's what it looks like on my 13" MacBook:
image

If you could adjust this just a bit, that'd be great!

@Adammatthiesen
Copy link
Member

image

@louisescher interesting, Chrome linux 1080p monitor 🤔

@louisescher
Copy link
Member

image

@louisescher interesting, Chrome linux 1080p monitor 🤔

So, funny thing, the deploy preview is borked! I cloned it to see that change.

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.

3 participants