I am faced with a scenario where I have around 6 components in HTML that share the same styling, such as:
<headertag>Some Content</headertag> <headertag>Some subtitle</headertag> Here there might be different content or svg/img or input fields. <button>accept</button> <button>cancel</button>
How can I implement a common style for all these components?
For example, each stylesheet contains:
h2 { margin-top: 0; margin-bottom: 30px; color: Blue; } button { display: flex; flex-direction: column; }
Is there a way to eliminate the repetitive styles from each stylesheet? We are using SCSS. Any advice would be greatly appreciated. Thank you
I have considered mixins as a solution, but I am not convinced it is the best option.