Designer News is where the design community meets.
over 7 years ago from Adam Silver, Interaction designer focused on inclusive design and design systems
Its better to use hyphens as you wrote in your CSS. or underscores like BEM.
camelCase is often used in JS :)
"better" is quite subjective to whom is writing the CSS and what team is reading it.
I use a very similar naming convention as the Author and prefer it to BEM, neither methods are incorrect and both should be appreciated.
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
© 2023 Designer News Ltd.