Skip to content

feat: 🎨 Update Tailwind CSS configuration and guidelines#6

Merged
sizzlebop merged 1 commit intomainfrom
dev
Mar 1, 2026
Merged

feat: 🎨 Update Tailwind CSS configuration and guidelines#6
sizzlebop merged 1 commit intomainfrom
dev

Conversation

@sizzlebop
Copy link
Copy Markdown
Member

@sizzlebop sizzlebop commented Mar 1, 2026

  • Refactor postcss.config.js to use @tailwindcss/postcss plugin.
  • Update DashboardHeader component to reference logo from public directory.
  • Modify index.css to import Tailwind CSS directly and remove old directives.
  • Enhance tailwind.config.ts to include tailwindcss-animate plugin.
  • Add HTML CSS Style Color Guide for accessible design practices.
  • Introduce Web Design Reviewer skill for visual inspection and issue fixing.
  • Create Tailwind CSS v4+ installation instructions for Vite projects.

Summary by CodeRabbit

  • New Features

    • Added comprehensive HTML/CSS color style guidelines for design consistency
    • Introduced Web Design Reviewer skill documentation with detailed workflow guidance
  • Updates

    • Upgraded Tailwind CSS to v4 with native Vite plugin integration
    • Updated Progressive Web App plugin to the latest version
  • Bug Fixes

    • Corrected logo image path reference
  • Documentation

    • Added detailed configuration guide for Tailwind CSS v4 with Vite setup

- Refactor postcss.config.js to use @tailwindcss/postcss plugin.
- Update DashboardHeader component to reference logo from public directory.
- Modify index.css to import Tailwind CSS directly and remove old directives.
- Enhance tailwind.config.ts to include tailwindcss-animate plugin.
- Add HTML CSS Style Color Guide for accessible design practices.
- Introduce Web Design Reviewer skill for visual inspection and issue fixing.
- Create Tailwind CSS v4+ installation instructions for Vite projects.
Copilot AI review requested due to automatic review settings March 1, 2026 12:24
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 887b293 and b596828.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • .codex/html-css-style-color-guide.instructions.md
  • .codex/skills/web-design-review/SKILL.md
  • .codex/tailwind-v4-vite.instructions.md
  • .github/html-css-style-color-guide.instructions.md
  • .github/skills/web-design-review/SKILL.md
  • .github/tailwind-v4-vite.instructions.md
  • package.json
  • postcss.config.js
  • src/components/dashboard/DashboardHeader.tsx
  • src/index.css
  • tailwind.config.ts

📝 Walkthrough

Walkthrough

The PR adds comprehensive documentation for web design review skills and HTML/CSS color styling guidelines across multiple directories. It upgrades the project to Tailwind CSS v4 by updating dependencies, migrating from PostCSS-based configuration to CSS-first approach, and correcting a minor asset reference path.

Changes

Cohort / File(s) Summary
Documentation - HTML/CSS Color Style Guide
.codex/html-css-style-color-guide.instructions.md, .github/html-css-style-color-guide.instructions.md
New comprehensive color guidelines defining categories (Hot, Cool, Neutral, Binary), 60-30-10 usage rule, background/text prescriptions with explicit "Never Use" and "Recommended" lists, gradient best practices, and external resources.
Documentation - Web Design Review Skill
.codex/skills/web-design-review/SKILL.md, .github/skills/web-design-review/SKILL.md
New skill documentation detailing web design review workflow: information gathering, visual inspection with accessibility/responsive/consistency checklists, issue fixing with framework-specific strategies, and re-verification steps. Includes Playwright MCP reference implementation and troubleshooting guidance.
Documentation - Tailwind v4 Vite Setup
.codex/tailwind-v4-vite.instructions.md, .github/tailwind-v4-vite.instructions.md
New installation and configuration guide for Tailwind CSS v4+ with Vite's @tailwindcss/vite plugin, covering key v4 changes (CSS-first config, no PostCSS required), migration from v3, verification checklist, and troubleshooting.
Tailwind CSS v4 Migration
package.json, postcss.config.js, src/index.css, tailwind.config.ts
Coordinated migration to Tailwind v4: removed @types/bcryptjs and autoprefixer; added @tailwindcss/postcss; upgraded tailwindcss to ^4.2.1 and vite-plugin-pwa to ^1.2.0; replaced PostCSS plugin configuration; switched src/index.css to CSS-first @import syntax; converted tailwindcss-animate plugin to ES module import.
Minor Fix
src/components/dashboard/DashboardHeader.tsx
Updated Keyper logo image source path from "/logo.png" to "/public/logo.png".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop along to Tailwind's v4 dance,
Where CSS leads in a forward glance,
Colors dance true with designs so bright,
Web reviews shine with accessibility's light! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sizzlebop sizzlebop merged commit 30de6b8 into main Mar 1, 2026
6 of 7 checks passed
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly upgrades the project's frontend styling infrastructure by migrating to Tailwind CSS v4 and simplifying its configuration. It introduces new documentation for design best practices and a new web design reviewer skill, aiming to modernize the styling setup, improve design consistency, and enhance development workflows. Minor component and dependency adjustments were also made to align with these updates.

Highlights

  • Tailwind CSS Configuration Update: The project's Tailwind CSS setup has been modernized by refactoring postcss.config.js to use the new @tailwindcss/postcss plugin, updating tailwindcss to version 4.2.1, and streamlining index.css to use the simplified @import "tailwindcss"; directive.
  • New Design Guidelines and Documentation: A comprehensive 'HTML CSS Style Color Guide' has been introduced to promote accessible and professional design practices, alongside detailed 'Tailwind CSS v4+ Installation with Vite' instructions.
  • Web Design Reviewer Skill: Documentation for a new 'Web Design Reviewer' skill has been added, outlining its capabilities for visual inspection and fixing of design issues in web applications.
  • Dependency Management and Component Adjustments: Dependencies in package.json were updated to reflect the Tailwind CSS changes, an unnecessary @types/bcryptjs dependency was removed, and a serialize-javascript override was added. The DashboardHeader component was also updated to correctly reference the logo from the public directory.
  • Animation Plugin Integration: The tailwindcss-animate plugin has been integrated into tailwind.config.ts to enable enhanced UI animations.
Changelog
  • .codex/html-css-style-color-guide.instructions.md
    • Added comprehensive guidelines for color usage and styling rules to ensure accessible and professional HTML/CSS designs.
  • .codex/skills/web-design-review/SKILL.md
    • Introduced a new skill definition for a web design reviewer, detailing its scope, workflow, inspection items, and fixing phases for visual and accessibility issues.
  • .codex/tailwind-v4-vite.instructions.md
    • Added detailed instructions for installing and configuring Tailwind CSS v4+ in Vite projects, highlighting key changes and migration steps.
  • .github/html-css-style-color-guide.instructions.md
    • Added comprehensive guidelines for color usage and styling rules to ensure accessible and professional HTML/CSS designs.
  • .github/skills/web-design-review/SKILL.md
    • Introduced a new skill definition for a web design reviewer, detailing its scope, workflow, inspection items, and fixing phases for visual and accessibility issues.
  • .github/tailwind-v4-vite.instructions.md
    • Added detailed instructions for installing and configuring Tailwind CSS v4+ in Vite projects, highlighting key changes and migration steps.
  • package.json
    • Removed @types/bcryptjs dependency.
    • Added @tailwindcss/postcss to devDependencies.
    • Updated tailwindcss from 3.4.11 to 4.2.1.
    • Removed autoprefixer from devDependencies.
    • Updated vite-plugin-pwa from 0.19.8 to 1.2.0.
    • Added an overrides entry for serialize-javascript.
  • postcss.config.js
    • Refactored the PostCSS configuration to use @tailwindcss/postcss plugin, removing explicit tailwindcss and autoprefixer entries.
  • src/components/dashboard/DashboardHeader.tsx
    • Updated the image source path for the logo to correctly point to /public/logo.png.
  • src/index.css
    • Replaced the old @tailwind directives (base, components, utilities) with a single @import "tailwindcss"; and added @config "../tailwind.config.ts";.
  • tailwind.config.ts
    • Imported and registered the tailwindcss-animate plugin.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This PR migrates the project from Tailwind CSS v3 to v4, updating configuration files and imports accordingly. Most changes are correctly implemented for the v4 migration.

Critical Issue Found

Resource Loading Error: The logo path in DashboardHeader.tsx has been changed to /public/logo.png, which will cause a 404 error. In Vite projects, static assets in the public directory must be referenced without the /public/ prefix (e.g., /logo.png).

Changes Validated

The following migrations are correctly implemented:

  • PostCSS configuration updated to use @tailwindcss/postcss plugin
  • CSS imports migrated to new @import "tailwindcss" syntax with @config directive
  • Tailwind config updated to use ES6 imports instead of require()

Please address the critical logo path issue before merging.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

<div className="p-1 bg-cyan-500/20 rounded-lg border border-cyan-500/30">
<img
src="/logo.png"
src="/public/logo.png"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛑 Resource Loading Error: Incorrect public asset path will cause a 404 error. In Vite projects, static assets in the public directory are served from the root path. The /public/ prefix should not be included in the src attribute, as Vite automatically serves files from the public directory at the root level.

Suggested change
src="/public/logo.png"
src="/logo.png"

@sizzlebop sizzlebop deleted the dev branch March 1, 2026 12:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the project’s Tailwind tooling toward Tailwind CSS v4, updates the PostCSS integration accordingly, and adds internal guidance/docs for Tailwind v4 + Vite and web design review workflows.

Changes:

  • Upgrade to Tailwind CSS v4 and switch PostCSS to @tailwindcss/postcss.
  • Update global CSS to Tailwind v4-style @import "tailwindcss" (+ @config).
  • Add internal instruction/skill documents for Tailwind v4/Vite and design review practices.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tailwind.config.ts Switches Tailwind animate plugin loading to ESM import.
src/index.css Moves from @tailwind directives to Tailwind v4 @import + @config.
src/components/dashboard/DashboardHeader.tsx Updates logo path used by the dashboard header.
postcss.config.js Replaces tailwindcss/autoprefixer plugins with @tailwindcss/postcss.
package.json Bumps Tailwind to v4, adds @tailwindcss/postcss, updates vite-plugin-pwa, adds an override.
package-lock.json Lockfile update reflecting new Tailwind v4 toolchain and dependency graph.
.github/tailwind-v4-vite.instructions.md Adds Tailwind v4 + Vite installation guidance (internal instructions).
.github/skills/web-design-review/SKILL.md Adds internal “web design reviewer” skill documentation.
.github/html-css-style-color-guide.instructions.md Adds internal HTML/CSS color/style guidance.
.codex/tailwind-v4-vite.instructions.md Duplicate/internal copy of Tailwind v4 + Vite instructions.
.codex/skills/web-design-review/SKILL.md Duplicate/internal copy of the web design reviewer skill doc.
.codex/html-css-style-color-guide.instructions.md Duplicate/internal copy of the HTML/CSS color/style guide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div className="p-1 bg-cyan-500/20 rounded-lg border border-cyan-500/30">
<img
src="/logo.png"
src="/public/logo.png"
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

public/ assets in Vite are served from the site root, so /public/logo.png will 404 in production. Use /logo.png (consistent with other components) or import the image as a module if you want bundling behavior.

Suggested change
src="/public/logo.png"
src="/logo.png"

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines 143 to 145
"postcss": "^8.5.6",
"tailwindcss": "^3.4.11",
"tailwindcss": "^4.2.1",
"typescript": "^5.9.3",
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

Tailwind v4 brings in @tailwindcss/oxide, which declares engines.node >= 20 in the lockfile. Since this repo previously documented Node 18+ support, consider adding an explicit engines field (and aligning docs/CI) or pinning Tailwind/tooling to versions that still support Node 18 to avoid install/build failures.

Copilot uses AI. Check for mistakes.
Comment thread package.json
"wrangler": "^4.69.0"
},
"overrides": {
"serialize-javascript": "^7.0.3"
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The serialize-javascript override resolves to v7.x, which requires Node >=20 (per package-lock.json). If Node 18 support is still desired, this override will force an incompatible transitive version—either bump the project’s Node requirement or adjust the override to a Node-18-compatible range.

Suggested change
"serialize-javascript": "^7.0.3"
"serialize-javascript": "^6.0.1"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the project to Tailwind CSS v4 and introduces new documentation, guideline files, and AI skills. Critically, the 'Web Design Reviewer' skill definition in both .codex and .github directories contains a high-severity security flaw, allowing for Indirect Prompt Injection due to insufficient guardrails for file system modifications and network navigation. This could lead to repository compromise or SSRF attacks, necessitating mandatory user confirmation for code changes and strict URL validation. Other issues include duplicated documentation files, a potentially breaking major version upgrade of vite-plugin-pwa, an incorrect version in package.json overrides, and a likely incorrect image path.

Comment on lines +55 to +282
> Please provide the URL of the website to review (e.g., `http://localhost:3000`)

### 1.2 Understanding Project Structure

When making fixes, gather the following information:

| Item | Example Question |
|------|------------------|
| Framework | Are you using React / Vue / Next.js, etc.? |
| Styling Method | CSS / SCSS / Tailwind / CSS-in-JS, etc. |
| Source Location | Where are style files and components located? |
| Review Scope | Specific pages only or entire site? |

### 1.3 Automatic Project Detection

Attempt automatic detection from files in the workspace:

```
Detection targets:
├── package.json → Framework and dependencies
├── tsconfig.json → TypeScript usage
├── tailwind.config → Tailwind CSS
├── next.config → Next.js
├── vite.config → Vite
├── nuxt.config → Nuxt
└── src/ or app/ → Source directory
```

### 1.4 Identifying Styling Method

| Method | Detection | Edit Target |
|--------|-----------|-------------|
| Pure CSS | `*.css` files | Global CSS or component CSS |
| SCSS/Sass | `*.scss`, `*.sass` | SCSS files |
| CSS Modules | `*.module.css` | Module CSS files |
| Tailwind CSS | `tailwind.config.*` | className in components |
| styled-components | `styled.` in code | JS/TS files |
| Emotion | `@emotion/` imports | JS/TS files |
| CSS-in-JS (other) | Inline styles | JS/TS files |

---

## Step 2: Visual Inspection Phase

### 2.1 Page Traversal

1. Navigate to the specified URL
2. Capture screenshots
3. Retrieve DOM structure/snapshot (if possible)
4. If additional pages exist, traverse through navigation

### 2.2 Inspection Items

#### Layout Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Element Overflow | Content overflows from parent element or viewport | High |
| Element Overlap | Unintended overlapping of elements | High |
| Alignment Issues | Grid or flex alignment problems | Medium |
| Inconsistent Spacing | Padding/margin inconsistencies | Medium |
| Text Clipping | Long text not handled properly | Medium |

#### Responsive Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Non-mobile Friendly | Layout breaks on small screens | High |
| Breakpoint Issues | Unnatural transitions when screen size changes | Medium |
| Touch Targets | Buttons too small on mobile | Medium |

#### Accessibility Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Insufficient Contrast | Low contrast ratio between text and background | High |
| No Focus State | Cannot determine state during keyboard navigation | High |
| Missing alt Text | No alternative text for images | Medium |

#### Visual Consistency

| Issue | Description | Severity |
|-------|-------------|----------|
| Font Inconsistency | Mixed font families | Medium |
| Color Inconsistency | Non-unified brand colors | Medium |
| Spacing Inconsistency | Non-uniform spacing between similar elements | Low |

### 2.3 Viewport Testing (Responsive)

Test at the following viewports:

| Name | Width | Representative Device |
|------|-------|----------------------|
| Mobile | 375px | iPhone SE/12 mini |
| Tablet | 768px | iPad |
| Desktop | 1280px | Standard PC |
| Wide | 1920px | Large display |

---

## Step 3: Issue Fixing Phase

### 3.1 Issue Prioritization

```mermaid
block-beta
columns 1
block:priority["Priority Matrix"]
P1["P1: Fix Immediately\n(Layout issues affecting functionality)"]
P2["P2: Fix Next\n(Visual issues degrading UX)"]
P3["P3: Fix If Possible\n(Minor visual inconsistencies)"]
end
```

### 3.2 Identifying Source Files

Identify source files from problematic elements:

1. **Selector-based Search**
- Search codebase by class name or ID
- Explore style definitions with `grep_search`

2. **Component-based Search**
- Identify components from element text or structure
- Explore related files with `semantic_search`

3. **File Pattern Filtering**
```
Style files: src/**/*.css, styles/**/*
Components: src/components/**/*
Pages: src/pages/**, app/**
```

### 3.3 Applying Fixes

#### Framework-specific Fix Guidelines

See [references/framework-fixes.md](references/framework-fixes.md) for details.

#### Fix Principles

1. **Minimal Changes**: Only make the minimum changes necessary to resolve the issue
2. **Respect Existing Patterns**: Follow existing code style in the project
3. **Avoid Breaking Changes**: Be careful not to affect other areas
4. **Add Comments**: Add comments to explain the reason for fixes where appropriate

---

## Step 4: Re-verification Phase

### 4.1 Post-fix Confirmation

1. Reload browser (or wait for development server HMR)
2. Capture screenshots of fixed areas
3. Compare before and after

### 4.2 Regression Testing

- Verify that fixes haven't affected other areas
- Confirm responsive display is not broken

### 4.3 Iteration Decision

```mermaid
flowchart TD
A{Issues Remaining?}
A -->|Yes| B[Return to Step 2]
A -->|No| C[Proceed to Completion Report]
```

**Iteration Limit**: If more than 3 fix attempts are needed for a specific issue, consult the user

---

## Output Format

### Review Results Report

```markdown
# Web Design Review Results

## Summary

| Item | Value |
|------|-------|
| Target URL | {URL} |
| Framework | {Detected framework} |
| Styling | {CSS / Tailwind / etc.} |
| Tested Viewports | Desktop, Mobile |
| Issues Detected | {N} |
| Issues Fixed | {M} |

## Detected Issues

### [P1] {Issue Title}

- **Page**: {Page path}
- **Element**: {Selector or description}
- **Issue**: {Detailed description of the issue}
- **Fixed File**: `{File path}`
- **Fix Details**: {Description of changes}
- **Screenshot**: Before/After

### [P2] {Issue Title}
...

## Unfixed Issues (if any)

### {Issue Title}
- **Reason**: {Why it was not fixed/could not be fixed}
- **Recommended Action**: {Recommendations for user}

## Recommendations

- {Suggestions for future improvements}
```

---

## Required Capabilities

| Capability | Description | Required |
|------------|-------------|----------|
| Web Page Navigation | Access URLs, page transitions | ✅ |
| Screenshot Capture | Page image capture | ✅ |
| Image Analysis | Visual issue detection | ✅ |
| DOM Retrieval | Page structure retrieval | Recommended |
| File Read/Write | Source code reading and editing | Required for fixes |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-high high

The 'Web Design Reviewer' skill definition introduces a significant security risk by allowing an AI agent to navigate to arbitrary URLs and modify local source code based on the content of those websites. This workflow is vulnerable to Indirect Prompt Injection: a malicious website could contain hidden instructions that trick the AI agent into writing malicious code (e.g., backdoors or data exfiltration scripts) into the repository.

Furthermore, the skill grants 'File Read/Write' permissions without a mandatory requirement for human-in-the-loop approval for all changes. The browser_navigate tool also lacks URL validation, which could be exploited for Server-Side Request Forgery (SSRF) if the agent is running in a sensitive environment.

To remediate this, please update the instructions to:

  1. Mandatory Confirmation: Explicitly require user approval for every file modification proposed by the agent.
  2. URL Validation: Instruct the agent to validate URLs, ensuring they use safe protocols (http/https) and do not point to internal network resources (e.g., 169.254.169.254, localhost).
  3. Scope Restriction: Explicitly limit the agent's file system access to the project workspace.

Comment on lines +55 to +282
> Please provide the URL of the website to review (e.g., `http://localhost:3000`)

### 1.2 Understanding Project Structure

When making fixes, gather the following information:

| Item | Example Question |
|------|------------------|
| Framework | Are you using React / Vue / Next.js, etc.? |
| Styling Method | CSS / SCSS / Tailwind / CSS-in-JS, etc. |
| Source Location | Where are style files and components located? |
| Review Scope | Specific pages only or entire site? |

### 1.3 Automatic Project Detection

Attempt automatic detection from files in the workspace:

```
Detection targets:
├── package.json → Framework and dependencies
├── tsconfig.json → TypeScript usage
├── tailwind.config → Tailwind CSS
├── next.config → Next.js
├── vite.config → Vite
├── nuxt.config → Nuxt
└── src/ or app/ → Source directory
```

### 1.4 Identifying Styling Method

| Method | Detection | Edit Target |
|--------|-----------|-------------|
| Pure CSS | `*.css` files | Global CSS or component CSS |
| SCSS/Sass | `*.scss`, `*.sass` | SCSS files |
| CSS Modules | `*.module.css` | Module CSS files |
| Tailwind CSS | `tailwind.config.*` | className in components |
| styled-components | `styled.` in code | JS/TS files |
| Emotion | `@emotion/` imports | JS/TS files |
| CSS-in-JS (other) | Inline styles | JS/TS files |

---

## Step 2: Visual Inspection Phase

### 2.1 Page Traversal

1. Navigate to the specified URL
2. Capture screenshots
3. Retrieve DOM structure/snapshot (if possible)
4. If additional pages exist, traverse through navigation

### 2.2 Inspection Items

#### Layout Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Element Overflow | Content overflows from parent element or viewport | High |
| Element Overlap | Unintended overlapping of elements | High |
| Alignment Issues | Grid or flex alignment problems | Medium |
| Inconsistent Spacing | Padding/margin inconsistencies | Medium |
| Text Clipping | Long text not handled properly | Medium |

#### Responsive Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Non-mobile Friendly | Layout breaks on small screens | High |
| Breakpoint Issues | Unnatural transitions when screen size changes | Medium |
| Touch Targets | Buttons too small on mobile | Medium |

#### Accessibility Issues

| Issue | Description | Severity |
|-------|-------------|----------|
| Insufficient Contrast | Low contrast ratio between text and background | High |
| No Focus State | Cannot determine state during keyboard navigation | High |
| Missing alt Text | No alternative text for images | Medium |

#### Visual Consistency

| Issue | Description | Severity |
|-------|-------------|----------|
| Font Inconsistency | Mixed font families | Medium |
| Color Inconsistency | Non-unified brand colors | Medium |
| Spacing Inconsistency | Non-uniform spacing between similar elements | Low |

### 2.3 Viewport Testing (Responsive)

Test at the following viewports:

| Name | Width | Representative Device |
|------|-------|----------------------|
| Mobile | 375px | iPhone SE/12 mini |
| Tablet | 768px | iPad |
| Desktop | 1280px | Standard PC |
| Wide | 1920px | Large display |

---

## Step 3: Issue Fixing Phase

### 3.1 Issue Prioritization

```mermaid
block-beta
columns 1
block:priority["Priority Matrix"]
P1["P1: Fix Immediately\n(Layout issues affecting functionality)"]
P2["P2: Fix Next\n(Visual issues degrading UX)"]
P3["P3: Fix If Possible\n(Minor visual inconsistencies)"]
end
```

### 3.2 Identifying Source Files

Identify source files from problematic elements:

1. **Selector-based Search**
- Search codebase by class name or ID
- Explore style definitions with `grep_search`

2. **Component-based Search**
- Identify components from element text or structure
- Explore related files with `semantic_search`

3. **File Pattern Filtering**
```
Style files: src/**/*.css, styles/**/*
Components: src/components/**/*
Pages: src/pages/**, app/**
```

### 3.3 Applying Fixes

#### Framework-specific Fix Guidelines

See [references/framework-fixes.md](references/framework-fixes.md) for details.

#### Fix Principles

1. **Minimal Changes**: Only make the minimum changes necessary to resolve the issue
2. **Respect Existing Patterns**: Follow existing code style in the project
3. **Avoid Breaking Changes**: Be careful not to affect other areas
4. **Add Comments**: Add comments to explain the reason for fixes where appropriate

---

## Step 4: Re-verification Phase

### 4.1 Post-fix Confirmation

1. Reload browser (or wait for development server HMR)
2. Capture screenshots of fixed areas
3. Compare before and after

### 4.2 Regression Testing

- Verify that fixes haven't affected other areas
- Confirm responsive display is not broken

### 4.3 Iteration Decision

```mermaid
flowchart TD
A{Issues Remaining?}
A -->|Yes| B[Return to Step 2]
A -->|No| C[Proceed to Completion Report]
```

**Iteration Limit**: If more than 3 fix attempts are needed for a specific issue, consult the user

---

## Output Format

### Review Results Report

```markdown
# Web Design Review Results

## Summary

| Item | Value |
|------|-------|
| Target URL | {URL} |
| Framework | {Detected framework} |
| Styling | {CSS / Tailwind / etc.} |
| Tested Viewports | Desktop, Mobile |
| Issues Detected | {N} |
| Issues Fixed | {M} |

## Detected Issues

### [P1] {Issue Title}

- **Page**: {Page path}
- **Element**: {Selector or description}
- **Issue**: {Detailed description of the issue}
- **Fixed File**: `{File path}`
- **Fix Details**: {Description of changes}
- **Screenshot**: Before/After

### [P2] {Issue Title}
...

## Unfixed Issues (if any)

### {Issue Title}
- **Reason**: {Why it was not fixed/could not be fixed}
- **Recommended Action**: {Recommendations for user}

## Recommendations

- {Suggestions for future improvements}
```

---

## Required Capabilities

| Capability | Description | Required |
|------------|-------------|----------|
| Web Page Navigation | Access URLs, page transitions | ✅ |
| Screenshot Capture | Page image capture | ✅ |
| Image Analysis | Visual issue detection | ✅ |
| DOM Retrieval | Page structure retrieval | Recommended |
| File Read/Write | Source code reading and editing | Required for fixes |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-high high

The 'Web Design Reviewer' skill definition introduces a significant security risk by allowing an AI agent to navigate to arbitrary URLs and modify local source code based on the content of those websites. This workflow is vulnerable to Indirect Prompt Injection: a malicious website could contain hidden instructions that trick the AI agent into writing malicious code (e.g., backdoors or data exfiltration scripts) into the repository.

Furthermore, the skill grants 'File Read/Write' permissions without a mandatory requirement for human-in-the-loop approval for all changes. The browser_navigate tool also lacks URL validation, which could be exploited for Server-Side Request Forgery (SSRF) if the agent is running in a sensitive environment.

To remediate this, please update the instructions to:

  1. Mandatory Confirmation: Explicitly require user approval for every file modification proposed by the agent.
  2. URL Validation: Instruct the agent to validate URLs, ensuring they use safe protocols (http/https) and do not point to internal network resources (e.g., 169.254.169.254, localhost).
  3. Scope Restriction: Explicitly limit the agent's file system access to the project workspace.

Comment thread package.json
"typescript-eslint": "^8.56.1",
"vite": "^7.3.1",
"vite-plugin-pwa": "^0.19.8",
"vite-plugin-pwa": "^1.2.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The version of vite-plugin-pwa has been upgraded from ^0.19.8 to ^1.2.0. This is a major version update which often includes breaking changes. The changelog for vite-plugin-pwa indicates that v1 is a rewrite, which could break existing Progressive Web App functionality. This change should be accompanied by necessary code migrations and thorough testing to prevent regressions.

Comment thread package.json
Comment on lines +154 to 156
"overrides": {
"serialize-javascript": "^7.0.3"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The overrides section specifies version ^7.0.3 for serialize-javascript, but this version does not exist on npm. The latest version is 6.0.2. This override will not work as intended and may cause errors during package installation. To address potential security vulnerabilities, you should specify a valid, existing version.

Suggested change
"overrides": {
"serialize-javascript": "^7.0.3"
}
"overrides": {
"serialize-javascript": "^6.0.2"
}

<div className="p-1 bg-cyan-500/20 rounded-lg border border-cyan-500/30">
<img
src="/logo.png"
src="/public/logo.png"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The src attribute for the logo image has been changed to /public/logo.png. In a standard Vite project, files in the public directory are served from the root (/). This means the correct path to access public/logo.png would be /logo.png. The current path /public/logo.png will likely result in a 404 error as it would try to resolve to a file at public/public/logo.png in your project structure.

Suggested change
src="/public/logo.png"
src="/logo.png"

Comment on lines +1 to +104
---
description: 'Color usage guidelines and styling rules for HTML elements to ensure accessible, professional designs.'
applyTo: '**/*.html, **/*.css, **/*.js'
---

# HTML CSS Style Color Guide

Follow these guidelines when updating or creating HTML/CSS styles for browser rendering. Color names
represent the full spectrum of their respective hue ranges (e.g., "blue" includes navy, sky blue, etc.).

## Color Definitions

- **Hot Colors**: Oranges, reds, and yellows
- **Cool Colors**: Blues, greens, and purples
- **Neutral Colors**: Grays and grayscale variations
- **Binary Colors**: Black and white
- **60-30-10 Rule**
- **Primary Color**: Use 60% of the time (*cool or light color*)
- **Secondary Color**: Use 30% of the time (*cool or light color*)
- **Accent**: Use 10% of the time (*complementary hot color*)

## Color Usage Guidelines

Balance the colors used by applying the **60-30-10 rule** to graphic design elements like backgrounds,
buttons, cards, etc...

### Background Colors

**Never Use:**

- Purple or magenta
- Red, orange, or yellow
- Pink
- Any hot color

**Recommended:**

- White or off-white
- Light cool colors (e.g., light blues, light greens)
- Subtle neutral tones
- Light gradients with minimal color shift

### Text Colors

**Never Use:**

- Yellow (poor contrast and readability)
- Pink
- Pure white or light text on light backgrounds
- Pure black or dark text on dark backgrounds

**Recommended:**

- Dark neutral colors (e.g., #1f2328, #24292f)
- Near-black variations (#000000 to #333333)
- Ensure background is a light color
- Dark grays (#4d4d4d, #6c757d)
- High-contrast combinations for accessibility
- Near-white variations (#ffffff to #f0f2f3)
- Ensure background is a dark color

### Colors to Avoid

Unless explicitly required by design specifications or user request, avoid:

- Bright purples and magentas
- Bright pinks and neon colors
- Highly saturated hot colors
- Colors with low contrast ratios (fails WCAG accessibility standards)

### Colors to Use Sparingly

**Hot Colors** (red, orange, yellow):

- Reserve for critical alerts, warnings, or error messages
- Use only when conveying urgency or importance
- Limit to small accent areas rather than large sections
- Consider alternatives like icons or bold text before using hot colors

## Gradients

Apply gradients with subtle color transitions to maintain professional aesthetics.

### Best Practices

- Keep color shifts minimal (e.g., #E6F2FF to #F5F7FA)
- Use gradients within the same color family
- Avoid combining hot and cool colors in a single gradient
- Prefer linear gradients over radial for backgrounds

### Appropriate Use Cases

- Background containers and sections
- Button hover states and interactive elements
- Drop shadows and depth effects
- Header and navigation bars
- Card components and panels

## Additional Resources

- [Color Tool](https://civicactions.github.io/uswds-color-tool/)
- [Government or Professional Color Standards](https://designsystem.digital.gov/design-tokens/color/overview/)
- [UI Color Palette Best Practices](https://www.interaction-design.org/literature/article/ui-color-palette)
- [Color Combination Resource](https://www.figma.com/resource-library/color-combinations/)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There are three new markdown files in the .github directory that appear to be duplicates of files in the .codex directory:

  • .github/html-css-style-color-guide.instructions.md and .codex/html-css-style-color-guide.instructions.md
  • .github/skills/web-design-review/SKILL.md and .codex/skills/web-design-review/SKILL.md
  • .github/tailwind-v4-vite.instructions.md and .codex/tailwind-v4-vite.instructions.md

Having duplicate documentation can lead to maintenance issues, as changes might not be applied to both copies, leading to inconsistencies. Consider keeping only one version of each file or using symlinks to avoid duplication.

@devactivity-app
Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 1d 20h 57m Coding Time: 1d 20h 57m Comments: 1

Achievements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants