You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common to have a button that submits a form and a link that navigates to a different page have same or similar styles.
In these cases, the button would be a button element and link a a anchor tag. Which would have two definitions where the same set of styles are repeated.
It becomes hard to manage such a codebase as for every similarly styled element the styles are repeated.
Is there a way to define styles such that they can be inherited inside each other? There are concepts such as Sass Mixins that help manage similar styles from one place and only inherit styles as needed.
It is common to have a button that submits a form and a link that navigates to a different page have same or similar styles.
In these cases, the button would be a
button
element and link aa
anchor tag. Which would have two definitions where the same set of styles are repeated.Ex:
It becomes hard to manage such a codebase as for every similarly styled element the styles are repeated.
Is there a way to define styles such that they can be inherited inside each other? There are concepts such as Sass Mixins that help manage similar styles from one place and only inherit styles as needed.
One of the cool things could be:
Currently it can be done via just using a ``` string literal for static styles, but adding props etc to the mixin would help a long way.
The text was updated successfully, but these errors were encountered: