Adds 404 page#26570
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a custom Docusaurus 404 (Not Found) page for the docs site, styled to match existing Fluid Framework website visuals.
Changes:
- Added a swizzled
NotFoundtheme component rendering a custom 404 layout and “Back to Home” call-to-action. - Added dedicated CSS for 404 page layout/typography/button styling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/src/theme/NotFound.tsx | New Docusaurus theme override that renders the custom 404 page content. |
| docs/src/css/notFound.css | New styling for the 404 page (layout, typography, and CTA link/button). |
| font-family: "Segoe UI"; | ||
| font-size: 18px; | ||
| color: #666c77; | ||
| max-width: 480px; | ||
| margin-bottom: 2rem; |
There was a problem hiding this comment.
The description text color is hard-coded. Since this site already defines theme-aware muted colors in custom.scss, consider using a CSS variable here (or introducing a --ffcom-muted-text-color) so the value stays consistent across components and themes.
| color: #666c77; | ||
| max-width: 480px; | ||
| margin-bottom: 2rem; | ||
| } | ||
|
|
||
| [data-theme="dark"] .ffcom-not-found-description { | ||
| color: #748497; |
There was a problem hiding this comment.
Dark-mode override uses a hard-coded hex color. Consider using a shared theme variable (or a dedicated --ffcom-muted-text-color override under [data-theme="dark"]) to avoid duplicating color values across the codebase.
| color: #666c77; | |
| max-width: 480px; | |
| margin-bottom: 2rem; | |
| } | |
| [data-theme="dark"] .ffcom-not-found-description { | |
| color: #748497; | |
| color: var(--ffcom-muted-text-color, #666c77); | |
| max-width: 480px; | |
| margin-bottom: 2rem; | |
| } | |
| [data-theme="dark"] { | |
| --ffcom-muted-text-color: #748497; |
| font-family: "Segoe UI"; | ||
| font-weight: 600; | ||
| font-size: 16px; | ||
| text-decoration: none; | ||
| transition: opacity 0.2s; | ||
| } |
There was a problem hiding this comment.
.ffcom-not-found-link { text-decoration: none; } will likely be overridden by the global rule main a { text-decoration: underline; } (higher selector specificity). As a result, the “Back to Home” link may still render underlined in the default state. Consider increasing specificity (e.g., scope the selector under .ffcom-not-found / main.ffcom-not-found) or otherwise overriding the main a rule for this link style.
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
|
|
||
| import "@site/src/css/notFound.css"; | ||
|
|
||
| export default function NotFound(): React.ReactElement { |
AB#52118
Description
This PR adds a 404 page matching the website's existing styling.