graph TD
A["index.html"] --> B["styles.css"]
B --> C["common.css — variables, reset, nav"]
B --> D["layouts.css — cards, headers"]
B --> E["home.css"]
B --> F["fan.css"]
B --> G["battery.css"]
B --> H["performance.css"]
B --> I["monitor.css"]
B --> J["sync.css"]
B --> K["system.css"]
B --> L["security.css"]
B --> M["mcp.css"]
B --> N["dialogs.css"]
The app uses a fixed sidebar with a scrollable content area. Each page has its own CSS file scoped to that view.
graph LR
subgraph Window
Titlebar
Sidebar --> Content["Content View\n(page-specific CSS)"]
end
:root {
/* Theme Colors */
--red-primary
--red-hover
--red-light
--red-glow
/* Backgrounds */
--bg-primary
--bg-secondary
--bg-tertiary
--bg-elevated
--bg-card
/* Text */
--text-primary
--text-secondary
--text-tertiary
/* Borders & Effects */
--border-color
--border-light
--shadow-sm
--shadow-md
--shadow-lg
}| Breakpoint | Width |
|---|---|
| Desktop | > 1200px |
| Tablet | 768–1200px |
| Mobile | < 768px |
| Small Mobile | < 480px |
- Browser defaults
- CSS Reset (common.css)
- CSS Variables (common.css)
- Base styles (common.css)
- Layout components (layouts.css)
- Page-specific styles (individual page CSS)
- Responsive overrides (in each file)
| File | Lines | Purpose |
|---|---|---|
| common.css | ~620 | Shared styles, variables, navigation |
| layouts.css | ~690 | Reusable layout components |
| fan.css | ~715 | Fan control |
| security.css | ~790 | Security features |
| battery.css | ~500 | Battery management |
| home.css | ~470 | Home dashboard |
| monitor.css | ~340 | System monitoring |
| dialogs.css | ~290 | Modal dialogs |
| mcp.css | ~190 | MCP server management |
| sync.css | ~85 | Settings sync |
| performance.css | ~70 | CPU/Performance |
| system.css | ~60 | System information |
| Total | ~4,820 | All styles |
- Create
src/styles/newpage.css - Add page-specific styles
- Import in
src/styles.css:@import url('./styles/newpage.css');
- Identify the page/component
- Open corresponding CSS file
- Make changes
- Test in browser
- Add to
common.cssorlayouts.css - Use CSS variables for consistency
- Use CSS Variables: Always reference variables for colors, spacing
- Scope Styles: Keep page-specific styles in their files
- Avoid Duplication: Move repeated styles to common.css or layouts.css
- Naming Convention: Use descriptive, hierarchical class names (e.g.,
.fan-control-card) - Responsive: Include breakpoints in the same file as the component