styled-jsx Migration Skill
Migrate styles safely to styled-jsx.
Steps
- •Identify current selectors, states, and variants.
- •Map to styled-jsx:
- •scoped styles: <style jsx>
- •global escapes: <style jsx global> with narrow selectors
- •dynamic values: CSS vars or class toggling
- •Remove dead selectors and reduce specificity.
- •Ensure the component remains accessible (roles/labels/focus styles).
- •Update tests/stories accordingly.
Output expectations
- •Provide:
- •Proposed refactor plan
- •New file structure and minimal diff summary
- •Test plan and any risks