is it good approach or not?

Hello, I am a newbie, tell me if it is a good practice or not, if not please help me to improve, like before I start coding HTML CSS, writing colors, writing fonts family that we are gonna use, font sizes, font weights in variables, then if I have to use colors make a class of each color, so that I could assign the class in HTML when needed. Do the same with fonts as well, sometimes I need to use the class in HTML for color, and sometimes I need to use a variable for the same color in CSS, is this is ok or wrong to use? check the attached code, and tell me the wrong practices I have done, I really wanted to improve, thanks NOTE: If my question is confusing for you, just check the code and let me for the bad practices and mistakes I have done. https://codepen.io/hamzacodepen951/pen/QWzLZPP
2 Replies
Chooβ™šπ•‚π•šπ•Ÿπ•˜
This is the basis for how Tailwind works.
Augustos
Augustosβ€’17mo ago
It's not a bad practice, it's a god approach, very common, note that, give nthe right amount of css or html, the more u could repeat yourself, the better would be to have these patterns, so u could use it with anything like, padding, margin and etc... So it's fine, go on. Another css libraries(?)/frameworks use this approach as well
Want results from more Discord servers?
Add your server