by Flenser · 8y ago · 0 comments
If your class names are semantic like profile-card it's easy to have a branding css file for each client.
If your class names are functional like m-5 p-5 text-gray-light bg-gray-darker border border-gray-light you're going to... what? make code changes for each client?
Obviously if the website is only going to have one branding, this isn't an issue, but advice like "use semantic css" or "use functional css" needs to be put in context. What you do in an agency context for content sites would be different from an in-house web-app context, or a web-app for SAAS context.
And if you had a bug related to profile-card styling, are you going to find all cards to update the styling? Are you sure you didn't forget some?
This approach seems to be based on the idea that design is completely immutable after the initial conception. This is... not how design usually works :)
Is that the problem you were addressing or did you have something different in mind?
So, yes, semantic names matter, and functional names are a bad idea in the long run, because they shatter maintainability.