3 ms·
Are you referring to styled-components and the like? What is exactly the problem with that?* * except media queries, those seem hard
by sebazzz 4y ago
Are you referring to styled-components and the like? What is exactly the problem with that?*
* except media queries, those seem hard
- zdragnar 4y agoMany prebuilt component libraries design for maintenance and all possible uses over being frugal. The actual markup can get really ugly with i.e. MUI. When you put in the effort to build the components yourself, you aren't trying to be everything for everyone, so you get to skip a lot of the cruft.
- taeric 4y agoExactly this. Is a large reason to not try to build the most general components, either. Build what you need, where you can. That all said, I also have to ack that the libraries are going to be hard to beat for speed of delivery. :(
- zdragnar 4y agoTo be honest, I think people tend to overestimate just how long it takes to make a nice looking button or write some flexbox styling. Even standard form components are really not too time consuming to style. What pushes me towards using third party code is stuff like autocomplete search with drop-down selects, mostly because I don't want to mess up on the accessibility front, either keyboard navigation or screen readers, and there's at least a few that have that part figured out already.
- taeric 4y agoThe idea of components is fine. I should have been clear, there. The problem typically comes from the authoring tools. To have the hooks necessary to put the decoration that we want, in html, they typically add a ton of div elements. When, realistically, you could almost certainly get what you want with very minimal markup. And being fair, I'm sure this has gotten a bit better in recent years. But the Rube Goldberg efforts people would put in to get the "flow" of the browser to automatically place things in locations that were easily calculated is frustrating.