Component library authors struggle to package CSS cleanly
JavaScript component-library authors—especially those using Vite—want components to work with their default styles without asking consumers to manage a separate CSS import. But putting styles inline can break CSS features or transitions, while injecting them in JavaScript can cause problems during server-side rendering or lead to unwanted global styles. The signals also include related Angular and React styling concerns, but most center on packaging library CSS.
For javaScript component-library maintainers. Mentioned from Jun 2018 to Feb 2024 on GitHub and Hacker News.
10 different people described this problem in 5 separate discussions.
- Indie fit
- 5.0/10
- Pain
- 5.5/10
- Frequency
- 8.6/10
- Willingness to pay
- 0.0/10
- Momentum
- 5.0/10
- Who pays
- Professionals
- Competition
- Medium
- Build difficulty
- Medium
What people said
Quoted word for word. Follow a link to read the whole discussion.
Not all css can be inlined directly (pseduo, media query, '>' and many more), which require me to rewrite my entire component into render function
Requiring non-SSR users to manually import a CSS file to get a component's default style to work is suboptimal DX, and an unfamiliar surprise for anyone accustomed to importing components under Vue 2
Build brief
See what to build and who will buy it
- 1 product idea with the smallest useful version and pricing
- 4 places to find your first customers
- 9 more quotes from people who have this problem
- Current workarounds, existing solutions and risks