In several instances, I repeat a set of css styles, for example for a button I will have a set of css rules which will also be used for a anchor tag as well. Ex:
const commonStyles = `
padding: 1em;
`
const Button = () => {
css` button { ${commonStyles} }`
return <button></button>
}
const AButton = () => {
css` a { ${commonStyles} }`
return <a></a>
}
However, trying to accomplish this with solid-styled I run into the problem that the inserted string is converted to a variable.
Note that I will also have some specific styles in the css (not shown in example) so using a dynamic component doesn't make sense. (Ex: sharing border and focus styles between input and textarea, but adding additional styling in the respective components themselves)
Is there a way to compose styles (or insert style strings inside the css)?
In several instances, I repeat a set of css styles, for example for a button I will have a set of css rules which will also be used for a anchor tag as well. Ex:
However, trying to accomplish this with solid-styled I run into the problem that the inserted string is converted to a variable.
Note that I will also have some specific styles in the css (not shown in example) so using a dynamic component doesn't make sense. (Ex: sharing border and focus styles between input and textarea, but adding additional styling in the respective components themselves)
Is there a way to compose styles (or insert style strings inside the css)?