compiled
compiled copied to clipboard
Dynamic declarations that are expanded which have optional placements don't work
Describe the bug Declarations that are expanded with optional placement (such that they can be in any order) aren't being assigned.
const ClassNamesString = (props: { decoration: string }) => (
<ClassNames>
{({ css, style }) => (
<div
style={style}
className={css(`
color: red;
text-decoration: ${props.decoration}; // <-- doesnt work
text-decoration-line: ${props.decoration}; // <-- works
`)}>
hello world
</div>
)}
</ClassNames>
);
Work around
For now use the long hands instead.
text-decoration-line: ${props.decoration};