fix(docs): Mobile styling improvements for landing page#106
Conversation
- Add border to feature visuals for better definition at all sizes - Add padding to feature-visual for consistent margins around terminals - Fix main terminal bleeding to edges on mobile (keep border-radius) - Add mobile breakpoints for FeatureTerminal component - Add 480px breakpoint for smaller mobile devices Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The mobile "On this page" summary element was displaying with a white background when the user's system was in light mode, making text unreadable. Added CSS rules to directly target the summary element and force dark styling regardless of system preference.
- Make search bar compact (icon-only) on mobile screens - Style hamburger menu button for dark theme visibility - Increase header background opacity for better readability
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 1756 uncovered lines. Files with missing lines (24)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 66.66% 66.66% —%
==========================================
Files 45 45 —
Lines 5267 5267 —
Branches 0 0 —
==========================================
+ Hits 3511 3511 —
- Misses 1756 1756 —
- Partials 0 0 —Generated by Codecov Action |
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| --sl-color-gray-4: #555555 !important; | ||
| --sl-color-gray-5: #333333 !important; | ||
| --sl-color-gray-6: #1a1a1a !important; | ||
| } |
There was a problem hiding this comment.
Gray scale values override original "BOOSTED CONTRAST" design
Medium Severity
The new "Force Dark Mode Globally" CSS section uses the selector :root, :root[data-theme="light"] which includes plain :root that always matches. This causes the gray scale values with !important to always override the original "BOOSTED CONTRAST" values at the top of the file. The new --sl-color-gray-5: #333333 and --sl-color-gray-6: #1a1a1a have very low contrast against the #0a0a0f background, potentially making UI elements using these variables difficult to see. The original values (#94a3b8 and #64748b) were deliberately lighter for readability.
|
|
||
| :root { | ||
| color-scheme: dark !important; | ||
| } |
There was a problem hiding this comment.
Duplicate color-scheme declaration in CSS file
Low Severity
The declaration color-scheme: dark !important; is duplicated in the same file - once at line 10 within the original :root, html, html[data-theme="light"], html[data-theme="dark"] block, and again at line 1632 in a new :root block. This redundancy increases maintenance burden as both need to be updated together if changes are needed.
Additional Locations (1)
| border: 1px solid rgba(255, 255, 255, 0.1) !important; | ||
| border-radius: 8px !important; | ||
| color: #ffffff !important; | ||
| } |
There was a problem hiding this comment.
Redundant ID and attribute selectors target same element
Low Severity
The selectors use both summary#starlight__on-this-page--mobile and summary[id="starlight__on-this-page--mobile"] in the same comma-separated list. These target the exact same element - the attribute selector [id="..."] is functionally equivalent to the ID selector #.... This redundancy appears in multiple rule sets (lines 1692-1693, 1700-1701, 1706-1707, 1711-1714).
Additional Locations (1)
|
|
||
| mobile-starlight-toc a:hover { | ||
| color: #ffffff !important; | ||
| } |
There was a problem hiding this comment.
Overlapping mobile TOC styles target same elements
Low Severity
Two separate styling blocks target the mobile table of contents with overlapping selectors: mobile-starlight-toc styles (lines 1652-1689) and summary#starlight__on-this-page--mobile styles (lines 1691-1717). Both set similar properties like background-color, color, and border-color on the .toggle and .display-current elements, creating potential specificity conflicts and maintenance burden.
Summary
Changes
Test plan