Website: add CSS custom properties for theme support(CSS variables only) #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds CSS custom properties (variables) as the foundation for implementing dark mode theme support on the NuttX website. This is the first step in a 3-part implementation of dark mode functionality.
Changes Made
_sass/custom/_themes.scsswith CSS custom properties for both light and dark themes_sass/custom/_variables.scssfor SCSS theme variables_sass/custom/_mixins.scssfor theme-related mixinscss/main.scssto import the new theme filesTheme Variables Include:
Light Theme (default):
--color-background: #ffffff--color-text: #333333--color-primary: #0066cc--color-secondary: #6c757d--color-border: #dee2e6--color-card: #f8f9faDark Theme:
--color-background: #1a1a1a--color-text: #e6e6e6--color-primary: #4dabf7--color-secondary: #adb5bd--color-border: #495057--color-card: #2d2d2dImpact
Testing
bundle exec jekyll buildNotes
:rootand[data-theme="dark"]selectors for theme definitionRelated
Part of dark mode implementation addressing user experience and accessibility improvements.