# Responsive Design Guidelines
**Target Users:** Students on Chromebooks
**Last Updated:** 2025-10-19
---
## Table of Contents
- [Overview](#overview)
- [Breakpoints](#breakpoints)
- [Touch Targets](#touch-targets)
- [Typography](#typography)
- [Spacing & Layout](#spacing--layout)
- [Tables](#tables)
- [Forms](#forms)
- [Images & Media](#images--media)
- [Navigation](#navigation)
- [Testing Requirements](#testing-requirements)
- [Common Patterns](#common-patterns)
- [Quick Reference](#quick-reference)
- [Checklist](#checklist)
- [Additional Resources](#additional-resources)
---
## Overview
> ✅ Use only `base` and `lg:` responsive tiers.
> Test all UI components at **375px** and **1366px** before submitting PRs.
These guidelines ensure a consistent, accessible responsive design across the **Stocks in the Future** application.
All contributors working on responsive features must follow these standards.
**Core Principles**
- 🎯 **Mobile-first:** Design for the smallest screen and scale up.
- 💻 **Chromebook-focused:** 1366×768 is our main target.
- ✋ **Touch-friendly:** Minimum 44px touch targets.
- 🎨 **Tailwind-only:** No custom CSS.
- ♿ **Accessible:** WCAG AA minimum compliance.
---
## Breakpoints
We only support **two responsive tiers**:
| Mode | Screen Size | Tailwind Prefix | Example Devices | Priority |
|------|--------------|----------------|------------------|-----------|
| **Base (mobile)** | up to 1023px | *(no prefix)* | Phones, tablets | Medium |
| **Chromebook/Desktop** | 1024px+ | `lg:` | Chromebooks, desktops | **CRITICAL** |
### Why Only Two?
- 1366×768 is the **most common Chromebook resolution**.
- Simplifies layout logic and testing.
- Matches real classroom usage.
- Keeps Tailwind classes minimal and maintainable.
### Example
```html
Mobile padding
Responsive padding
Mobile only
Desktop only
```
---
## Touch Targets
### Minimum Sizes
| Element | Minimum | Preferred | Notes |
|----------|----------|------------|--------|
| Buttons | 44×44px | 48×48px | Use `min-h-[44px]` or larger |
| Inputs | 44px height | 48px height | Use `py-3` minimum |
| Checkboxes | 24×24px | 32×32px | Make label clickable |
| Icon buttons | 44×44px | 48×48px | Hamburger, close, etc. |
### Spacing
```html
```
---
## Typography
| Element | Mobile (`base`) | Chromebook (`lg:`) |
|----------|------------------|--------------------|
| H1 | `text-2xl` (24px) | `lg:text-4xl` (36px) |
| H2 | `text-xl` (20px) | `lg:text-3xl` (30px) |
| Body | `text-base` (16px) | `lg:text-lg` (18px) |
| Small | `text-sm` (14px) | `lg:text-base` (16px) |
**Rules**
1. Never go below 14px (`text-sm`) for body text.
2. Use responsive Tailwind typography classes (`text-xl lg:text-3xl`).
3. Maintain heading hierarchy.
**Example**
```html
Welcome to Your Financial Journey
This is your launchpad to earn, invest, and grow.
```
---
## Spacing & Layout
### Container Padding
```html
```
### Grids and Flex Layouts
```html
```
---
## Tables
### Responsive Table Pattern
```html
| Stock |
Price |
Actions |
| AAPL |
$150.00 |
|
```
---
## Forms
```html
```
---
## Images & Media
```html
```
---
## Navigation
```html
```
---
## Testing Requirements
### Test at Two Sizes
- ✅ 375px — Mobile (base)
- ✅ 1366px — Chromebook (lg)
### Checklist
- [ ] No horizontal scroll
- [ ] Minimum text size 14px
- [ ] All touch targets ≥44px
- [ ] Forms and buttons are touch-friendly
- [ ] Navigation accessible
- [ ] Layout consistent on Chromebook
---
## Common Patterns
### Card
```html
```
### Button Group
```html
```
---
## Quick Reference
```
(no prefix) = up to 1023px (mobile-first)
lg: = 1024px+ (Chromebook/Desktop)
```
---
## Checklist
- [ ] Uses Tailwind-only classes
- [ ] Works at 375px and 1366px
- [ ] No horizontal scroll
- [ ] All touch targets ≥44px
- [ ] Accessible labels and contrast
---
## Additional Resources
- [Tailwind CSS Responsive Design](https://tailwindcss.com/docs/responsive-design)
- [WCAG Touch Target Guidelines](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html)
- [Mobile-First Design Principles](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Responsive/Mobile_first)
---