migrar-a-css

Migrates React inline styles to className-based CSS with custom property bridges.

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/saulo-fl/armado-en-mexico --skill migrar-a-css-saulo-fl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migrar-a-css
Source: https://github.com/saulo-fl/armado-en-mexico/tree/main/.claude/skills/migrar-a-css
Command: npx skills add https://github.com/saulo-fl/armado-en-mexico --skill migrar-a-css-saulo-fl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inline styles in React components cannot receive hover states, focus rings, pseudo-elements, media queries, or animations because they generate no CSS selector. This Skill provides a safe, incremental procedure to move a component's decorative styling from style={{}} objects into a shared stylesheet without breaking layout or duplicating properties. ## Core Features & Use Cases - Split rule for inline vs CSS: Defines exactly which properties move to the stylesheet (pseudo-classes, pseudo-elements, media queries, surfaces, typography) and which stay inline (data-driven values, computed widths, grid positions). - Custom property bridge: Passes dynamic values from React into CSS via style={{ '--estado': color }} and var(--estado) so data still drives visuals while states live in CSS. - Negative-diff verification: Requires deleting replaced inline properties, obsolete mouse listeners, and decorative DOM nodes, then validates with build, contrast checks, and keyboard focus parity. - Use Case: A card component needs a hover shadow and keyboard focus ring. Apply the procedure to add an amx- prefixed class, write the CSS first, bridge the dynamic border color with a custom property, and remove the old onMouseEnter/onMouseLeave handlers. ## Quick Start Migrate the ArmaCard component's hover and focus styles from inline style objects to an amx-prefixed CSS class following this skill's procedure.

Frequently Asked Questions about migrar-a-css

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

FAQPage Schema
How do I add hover styles to React inline styles?▼

Inline styles cannot express :hover because they produce no CSS selector. Move the decorative properties to a class in a stylesheet, keep data-driven values inline, and bridge dynamic values with CSS custom properties like var(--estado).

How to migrate inline styles to CSS without breaking layout?▼

Migrate one reusable primitive at a time rather than whole screens, write the CSS before touching the JSX, and delete each property from the style object as it moves. A correct migration produces a negative diff; growth means duplication.

Can React pass dynamic values to CSS classes?▼

Yes, React passes custom properties through the style object unchanged, so style={{ '--estado': color }} combined with var(--estado, fallback) in CSS lets JavaScript data drive visuals while states like hover live in the stylesheet.

Should I migrate all inline styles in a codebase at once?▼

No. Mass rewrites of thousands of inline styles are not viable and are explicitly out of scope here. Migrate only the shared primitives that need pseudo-classes, pseudo-elements, or media queries, and leave layout and data-dependent values inline.

Why does my focus ring disappear after using clip-path?▼

clip-path can clip the element's outline, hiding the keyboard focus indicator. Use a negative outline-offset or an alternative focus treatment, and always verify :focus-visible by keyboard navigation after the migration.