Remove structural CSS from docs, delegate layout to Starlight#3736
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot Remove the screenshot files from this PR |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR successfully refactors the documentation CSS by removing ~566 lines of structural layout code (positioning, sizing, spacing, flexbox, grid) and delegating all layout concerns to the Starlight theme framework. The remaining ~400 lines focus purely on theme styling (colors, gradients, typography, animations, visual effects). Additionally, it includes test improvements, workflow enhancements, and adds a new Multi-Device Docs Tester to the status page.
Key Changes:
- Removed structural CSS properties while preserving GitHub brand theming
- Fixed Playwright test strict mode violation with
.first()selector - Enhanced workflow with patch detection and fingerprinting capabilities
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/styles/custom.css | Removed ~566 lines of structural CSS (layout, positioning, sizing) while preserving ~400 lines of theme styling (colors, animations, typography) |
| docs/tests/mobile-responsive.spec.ts | Fixed strict mode violation by adding .first() to content panel selector |
| docs/.gitignore | Added test artifacts and screenshots to ignore list (contains duplicate entries) |
| docs/src/content/docs/status.mdx | Added Multi-Device Docs Tester workflow to status table |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Updated dependencies, added patch detection output, fingerprint functionality, and workflow name environment variables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1300,6 +958,7 @@ html { | |||
| font: #ffffff; | |||
There was a problem hiding this comment.
Invalid CSS property usage: font: #ffffff; should be color: #ffffff;. The font shorthand property does not accept a color value alone - colors should use the color property.
See below for a potential fix:
color: #ffffff;
}
.hero .action.primary:hover {
background: linear-gradient(180deg, #e5c7ff 0%, #8250df 100%);
border-color: #e5c7ff;
color: #ffffff;
Remove Structural Custom CSS from Documentation
Summary
Successfully removed all structural CSS (layout, positioning, sizing, spacing) from
docs/src/styles/custom.csswhile maintaining all theme-related styling (colors, gradients, backgrounds, typography). The Starlight theme framework now handles all layout concerns, making the documentation more maintainable and responsive.Changes Made
CSS Refactoring
Removed Structural CSS (~566 lines):
display,position,flex,grid,z-index,top,left,right,bottomwidth,height,padding,margin,max-width,min-widthtransform,overflow,gap,align-items,justify-contentKept Theme CSS (~400 lines):
color,background,background-color, CSS variables (--sl-color-*)border,border-color,border-radius,box-shadow,backdrop-filterfont-family,font-size,font-weight,line-height,letter-spacinganimation,transition,@keyframes:hover,:focus-visible, theme selectorsTest Results
✅ All 12 mobile responsive tests pass successfully:
Technical Details
The documentation now uses Starlight's built-in responsive layout system for all structural concerns, while custom CSS provides:
This separation improves maintainability and ensures the documentation responds properly to all screen sizes using Starlight's proven responsive patterns.
Files Changed
docs/src/styles/custom.css- Refactored to theme-only CSSdocs/tests/mobile-responsive.spec.ts- Fixed strict mode violationdocs/.gitignore- Added temp/test files and screenshotsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.