Skip to content

Conversation

desmondcheongzx
Copy link
Collaborator

Changes Made

Apparently if your system settings is in dark mode, this interacted strangely with our docs.

@desmondcheongzx desmondcheongzx changed the title Docs: More fixes to the overview page in light mode docs: More fixes to the overview page in light mode Aug 30, 2025
@github-actions github-actions bot added the docs label Aug 30, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes CSS styling issues in the documentation overview page (docs/index.md) that were causing display problems when users had dark system settings but were viewing the documentation in light mode. The change completely restructures the CSS approach from using CSS custom properties (variables) to hardcoded color values.

The original implementation used CSS variables like --daft-text-color and --daft-bg-color to create a maintainable theming system. However, this variable-based approach was apparently not behaving correctly in certain browser/system combinations, particularly when system preferences were set to dark mode but the documentation was being viewed in light mode.

The fix involves three main changes:

  1. Removing all CSS custom property declarations and replacing them with direct color values (e.g., color: #1a1a1a instead of color: var(--daft-text-color))
  2. Duplicating dark mode styles for both system preference dark mode (@media (prefers-color-scheme: dark)) and Material for MkDocs slate theme ([data-md-color-scheme="slate"])
  3. Maintaining the same visual appearance but with more explicit, predictable color definitions

This change ensures consistent rendering across all viewing scenarios by explicitly defining styles for each mode rather than relying on CSS variables that may not cascade properly in certain configurations. The documentation structure and content remain unchanged - this is purely a CSS implementation detail that improves cross-browser compatibility.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it only affects CSS styling in documentation
  • Score reflects that this is a low-risk documentation-only change with no impact on application logic
  • No files require special attention - this is a straightforward CSS fix

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@desmondcheongzx desmondcheongzx enabled auto-merge (squash) August 30, 2025 10:21
@desmondcheongzx desmondcheongzx merged commit e13a579 into main Aug 30, 2025
29 of 30 checks passed
@desmondcheongzx desmondcheongzx deleted the desmond/fix-docs-overview-light-mode branch August 30, 2025 10:24
Jay-ju pushed a commit to Jay-ju/Daft that referenced this pull request Sep 1, 2025
## Changes Made

Apparently if your system settings is in dark mode, this interacted
strangely with our docs.
venkateshdb pushed a commit to venkateshdb/Daft that referenced this pull request Sep 6, 2025
## Changes Made

Apparently if your system settings is in dark mode, this interacted
strangely with our docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant