Problems I am facing in current projects are
Naming convention for that I am following BEM.
Being specific with units usability i.e for font size,letter spacing,line height,width, height etc..
Any thoughts on this?
Do you mean incorporating sizing into the BEM naming classes? It depends if you're going full-in on a completely utility library similar to Tailwind or if you're supplying a few classes for properties that enhance components in predictable ways, like elevation and spacing from Material.
Most sizing is a number that is either an arbitrary scale that says nothing obvious about the result, or is implied as a multiplier (like x * 8px for an 8px baseline grid) or involves some type of metaphor, the popular one being "t-shirt sizing" (xs, sm, md, lg, xl). And then there may be breakpoint modifiers thrown in depending on what the sizing is in relation to. They all have their place, but ultimately being sure to document and being consistent will help. You may want to do some comparison of existing frameworks and design systems. Viewing sizing in context of a mature component system may help identify what will work for your project. Good luck!
No that's not what I meant.
It's regqrding the units use px,vh,vw,rem,em etc.
For font size I can use px, rem, em but don't know why to choose particular unit.
Problems I am facing in current projects are
Naming convention for that I am following BEM.
Being specific with units usability i.e for font size,letter spacing,line height,width, height etc..
Any thoughts on this?
Do you mean incorporating sizing into the BEM naming classes? It depends if you're going full-in on a completely utility library similar to Tailwind or if you're supplying a few classes for properties that enhance components in predictable ways, like elevation and spacing from Material.
Most sizing is a number that is either an arbitrary scale that says nothing obvious about the result, or is implied as a multiplier (like x * 8px for an 8px baseline grid) or involves some type of metaphor, the popular one being "t-shirt sizing" (xs, sm, md, lg, xl). And then there may be breakpoint modifiers thrown in depending on what the sizing is in relation to. They all have their place, but ultimately being sure to document and being consistent will help. You may want to do some comparison of existing frameworks and design systems. Viewing sizing in context of a mature component system may help identify what will work for your project. Good luck!
No that's not what I meant.
It's regqrding the units use px,vh,vw,rem,em etc.
For font size I can use px, rem, em but don't know why to choose particular unit.
Gotcha! Then the article I linked will provide some additional info on spacing for typography and other scenarios: Guide to CSS Units for Relative Spacing
Thanks