canvas-styling-conventions

Enforce Tailwind CSS 4 theme tokens and CVA variants for Canvas components.

14|2|Updated Feb 14, 2025
One-click install
npx skills add https://github.com/balintbrews/canvas-starter --skill canvas-styling-conventions-balintbrews
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canvas-styling-conventions
Source: https://github.com/balintbrews/canvas-starter/tree/main/.agents/skills/canvas-styling-conventions
Command: npx skills add https://github.com/balintbrews/canvas-starter --skill canvas-styling-conventions-balintbrews

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Canvas projects often suffer from inconsistent styling across components. This Skill provides a standardized approach using Tailwind CSS 4 theme tokens, CVA-based variants, and the cn() utility to ensure cohesive visuals and reusable patterns.

Core Features & Use Cases

  • Enforces Tailwind 4 design tokens from global.css to ensure consistent color, spacing, and typography.
  • Introduces a standardized approach to component variants and props via CVA, preventing hard-coded values.
  • Documents and educates developers on best practices for design tokens, theming, and token-driven styling.

Quick Start

Apply the styling conventions to a new or updated component by using Tailwind tokens from global.css and cn() for class merging.

Frequently Asked Questions about canvas-styling-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent Tailwind CSS design tokens across Canvas components?

To enforce consistent Tailwind CSS design tokens across Canvas components, apply standardized styling conventions using theme tokens from global.css and the cn() utility for class merging. This prevents hard-coded values and ensures cohesive visuals across projects.

What is the best way to manage component variants with CVA and Tailwind CSS?

The best way to manage component variants with CVA and Tailwind CSS is to define variant properties through CVA and map them to Tailwind 4 theme tokens. This standardized approach prevents hard-coded values and ensures reusable, token-driven styling patterns.

Why should I avoid hard-coded values in Tailwind component styling?

You should avoid hard-coded values in Tailwind component styling because it leads to inconsistent visuals across projects. Using Tailwind 4 theme tokens from global.css instead ensures consistent color, spacing, and typography throughout your design system.

Can I use CVA variants with Tailwind CSS 4 theme tokens for design systems?

Yes, you can use CVA variants with Tailwind CSS 4 theme tokens for design systems. This combination enforces a standardized approach to component variants and props, ensuring cohesive styling and reusable patterns across your Canvas components.

How do I document design token usage in global.css for Canvas components?

To document design token usage in global.css for Canvas components, establish styling conventions that specify required tooling and constraints, including theme tokens and the cn() utility, then describe these rules in SKILL.md to educate developers on best practices.