-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
A collection of website polishing #4784
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
Conversation
Previously, the site would render one way in prod and another in dev! The issue was that vite was tree-shaking CSS and wound up re-ordering things in a way it thought was permissible, whereas in dev, without that optimization, the CSS was actuallys sequenced differently. This led to a noticable huge margin in dev, but not in prod. This commit asserts the official ordering the CSS layers, and then adds a fix for the left-margin issue. This should now standard dev and prod.
Use more readable line height and paragraph separation.
📝 WalkthroughWalkthroughReorganizes CSS layers in docs-starlight global stylesheet, updates import layering for component styles, adjusts sidebar structure and spacing selectors, adds main pane typography/layout rules, and removes specific sidebar list item padding. Changes
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
docs-starlight/src/styles/global.css (4)
291-293
: Simplify font-size; prefer tokens/utilities for consistency.
calc(16 / 16 * 1rem)
is1rem
. Consider a simpler value or a design token.Apply:
-#starlight__sidebar ul li a { - font-size: calc(16 / 16 * 1rem); -} +#starlight__sidebar ul li a { + font-size: 1rem; /* or var(--sl-text-sm) if desired */ +}
295-298
: Sidebar details/summary spacing: add focus-visible to preserve keyboard a11y.Padding/margins look fine; add a clear focus style to maintain accessibility after spacing tweaks.
#starlight__sidebar summary { margin-top: 5px; padding-left: 0; } +#starlight__sidebar summary:focus-visible { + outline: 2px solid var(--sl-color-accent); + outline-offset: 2px; +}Also applies to: 300-303
305-308
: Depth-coupled selectors are brittle; reduce specificity with :is/:where.Hard-coding three-level
details
depth may break with structure changes. Prefer structural targeting that’s less fragile.-#starlight__sidebar details details details { - margin-bottom: 0; -} -#starlight__sidebar details details details summary { - margin-top: 0; - padding: 0.3em var(--sl-sidebar-item-padding-inline); -} +#starlight__sidebar :is(details details details) { + margin-bottom: 0; +} +#starlight__sidebar :is(details details details) > summary { + margin-top: 0; + padding: 0.3em var(--sl-sidebar-item-padding-inline); +}If you want even lower specificity, wrap with
:where(...)
instead of:is(...)
.Also applies to: 309-313
322-340
: Main pane tweaks: tighten scope of.code
and guard small-screen gutters.
.code
is generic and may collide with other components. Scope to elements in markdown content.- Removing container inline margins can push text to screen edges on narrow viewports.
.main-pane .sl-container { - margin-inline: 0; + margin-inline: 0; + padding-inline: clamp(1rem, 4vw, 2rem); /* keep gutters on small screens */ } -.main-pane .code { - font-size: calc(14 / 16 * 1rem); -} +.main-pane :where(pre, code) { + font-size: 0.875rem; /* 14px */ +}Please confirm
.main-pane
is consistently applied to doc pages. You can grep templates/layouts forclass="main-pane"
to ensure styling attaches everywhere intended.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
docs-starlight/src/styles/global.css
(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-27T18:40:35.247Z
Learnt from: karlcarstensen
PR: gruntwork-io/terragrunt#4753
File: docs-starlight/src/components/dv-Hero.astro:36-37
Timestamp: 2025-08-27T18:40:35.247Z
Learning: Projects using tailwindcss/vite with Tailwind CSS v4 and astrojs/starlight-tailwind integration automatically have access to extended utility classes including line-height utilities.
Applied to files:
docs-starlight/src/styles/global.css
🔇 Additional comments (2)
docs-starlight/src/styles/global.css (2)
1-1
: Good call: explicit cascade layer order to stabilize dev vs prod.This should fix ordering drift. One thing to verify: is Tailwind Preflight/base included elsewhere (via the Starlight Tailwind integration)? If not, consider importing
tailwindcss/base.css
into an appropriate early layer to avoid browser-default inconsistencies.Run a quick check that Preflight is present in the built CSS (dev and prod) and that no duplicate resets are applied.
6-8
: Imports intolayer(components)
look right.Scoping these CSS files to the components layer reduces cascade surprises and should keep parity between environments.
Also applies to: 11-11
|
||
#starlight__sidebar details summary { | ||
#starlight__sidebar ul li a { | ||
font-size: calc(16 / 16 * 1rem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not seen this before - why is it done this way vs. just setting it to 1rem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to think in px, but it’s important to use rem whenever we want the thing to scale as the user increases their default font size. So by using calc(14 / 16 * 1rem)
I can say “make this font-size 14px
, but express it in rem
.”
But admittedly 16 / 16
is a bit strange.
FYI, I do just want to acknowledge that I didn't do sufficient QA testing for mobile here. I'll tackle that shortly in a separate PR. |
* Tighten up sidebar. * Standardize CSS ordering between dev and prod. Previously, the site would render one way in prod and another in dev! The issue was that vite was tree-shaking CSS and wound up re-ordering things in a way it thought was permissible, whereas in dev, without that optimization, the CSS was actuallys sequenced differently. This led to a noticable huge margin in dev, but not in prod. This commit asserts the official ordering the CSS layers, and then adds a fix for the left-margin issue. This should now standard dev and prod. * Reduce code font-size from 16px to 14px. * Improve main paragraph text rendering. Use more readable line height and paragraph separation. * Improve spacing after file tree. * Fix sidebar inconsistencies on 3rd level of nav.
* Backend bootstrap only by explicit flag * Cleanup * lint issues * Updated error explainer error * Documentation update * Improved errors detection * GCP bootstrap flags * Tests update * Bootstrap flags update * Updated --backend-bootstrap to OIDC * GCP cleanup * Backend update * GCP tests cleanup * AWS tests update * AWS docs update * Docs bootstrap fix * Tests simplification * docs: Add Terralith to Terragrunt guide (#4709) * feat: Adding fixture for Terralith to Terragrunt guide * feat: Adding Terralith to Terragrunt walkthrough * fix: Use Asides where possible * fix: Moving import up to avoid breaking list formatting * fi:x Removing incorrect tip * fix: Fixing asset links * fix: The `gitignore` syntax highlight doesn't exist * fix: Moving fixtures to the `docs-starlight` directory * fix: Adjusting path * fix: Removing `package-lock.json` entry in `.vercelignore` * Revert "fix: Adjusting path" This reverts commit 62e6d2d. * fix: Removing duplicate fixtures * Update docs-starlight/src/content/docs/02-guides/01-terralith-to-terragrunt/05-step-2-refactoring.mdx Co-authored-by: Zach Goldberg <zach@gruntwork.io> * fix: Fixing link for fixture code --------- Co-authored-by: Zach Goldberg <zach@gruntwork.io> * Updated form link (#4771) * Polish to contact form (#4769) * Pricing Page Launch (#4772) * New supercharge module * Updates to links etc * Update copy * Update docs-starlight/src/components/dv-PetAdvertise.astro Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs-starlight/src/components/dv-PetAdvertise.astro Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs-starlight/src/components/dv-PetAdvertise.astro Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Polish (#4773) * fix: ensure custom API endpoints are set correctly (#4756) * fix: ensure custom API endpoints are set correctly * refactor: ensure consistent use of awshelper.CreateS3Client * chore: fix runner-pool experiment tests (#4770) * Group tests update * Added checking for group tests * chore: lint fixes * runner-pool handling of TestOutputModuleGroups * Bypass partytown (#4783) * Bypass partytown * GTM in header * fix: Only override ref when not set (#4781) * A collection of website polishing (#4784) * Tighten up sidebar. * Standardize CSS ordering between dev and prod. Previously, the site would render one way in prod and another in dev! The issue was that vite was tree-shaking CSS and wound up re-ordering things in a way it thought was permissible, whereas in dev, without that optimization, the CSS was actuallys sequenced differently. This led to a noticable huge margin in dev, but not in prod. This commit asserts the official ordering the CSS layers, and then adds a fix for the left-margin issue. This should now standard dev and prod. * Reduce code font-size from 16px to 14px. * Improve main paragraph text rendering. Use more readable line height and paragraph separation. * Improve spacing after file tree. * Fix sidebar inconsistencies on 3rd level of nav. * feat: Generate stacks in topological order (#4786) * feat: Finalizing topological generation of stacks * feat: Adding tests for topological stack generation * fix: Address race condition in warning suppression * feat: Set name of test to `TestStackGenerationWithNestedTopologyWithRacing` to ensure it's caught by race test * feat: Adding extra generate at the end for confirmation * fix: Updating expected log messages in tests * fix: Fixing AWS Account ID w/ Provider CMD (#4779) * test: Attempting to reproduce issue with OIDC * fix: Fixing `get_aws_account_id()` when using AuthProviderCmd * fix: Addressing lint findings * fix: Adding fixture for backend with OIDC * fix: Adding integration test for OIDC with backend * fix: Consolidating logic for AWS credential acquisition * fix: Addressing lint findings * test: Removing cleanup to fix this * fix: Fixing delete bucket cleanup * fix: Fixing role assumption when env creds aren't fetched from auth provider * fix: Removing unnecessary debug * fix: Skipping failing test for now * Fixed failing OIDC tests * Tests cleanup * chore: aws helper complexity reduction * Updated cleanup order * enabled build tags --------- Co-authored-by: Denis O <denis.o@linux.com> * chore: experiments tests improvements (#4782) * Group tests update * Added checking for group tests * chore: lint fixes * runner-pool handling of TestOutputModuleGroups * Updated plan path save file * Improved FAIL errors * IsExperimentMode() simplification * Discovery include flags * Added passing of discovery include/exclude directories * Fixed discovery flags passing * Improved parsing of tests * docs: Updating migration docs (#4711) * Added --non-interactive * Market strict control as completed * fix: Fixing failing OIDC test (#4791) --------- Co-authored-by: Yousif Akbar <11247449+yhakbar@users.noreply.github.com> Co-authored-by: Zach Goldberg <zach@gruntwork.io> Co-authored-by: Karl Carstensen <karl.carstensen@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: AJ (.jASM) <aj@48k.io> Co-authored-by: Rodin Velichkov <148242776+rvelichkov@users.noreply.github.com> Co-authored-by: Josh Padnick <josh@gruntwork.io>
This makes a collection of small polish improvements to the Terragrunt website. I have not QA'd this on mobile yet, though I wouldn't expect any of these changes to negatively affect mobile since I'd used
rem
for most changes (which will scale with default font size).The changes include:
Summary by CodeRabbit