We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You are not able to override fontWeight in your styled() component when you use createInterFont
export default createInterFont({ family: 'Roboto', weight: { 6: 'normal', }, });
import { SizableText } from 'tamagui'; export const ExtendedSizableText = styled(SizableText, { name: 'ExtendedSizableText', variants: { bold: { true: { fontWeight: 'bold', }, false: { fontWeight: 'normal', }, }, });
When you try to use prop bold, it will be "ignored." Not ignored but overridden by element style object, which has higher priority.
return ( <ExtendedSizableText bold /> );
I used "temp hack" with an undefined value, but it is not working from version 56 because of typescript.
export default createInterFont({ family: 'Roboto', weight: { 6: undefined, }, });
I also tried to use !important but there is no support for it :)
export const ExtendedSizableText = styled(SizableText, { name: 'ExtendedSizableText', variants: { bold: { true: { fontWeight: 'bold !important', }, false: { fontWeight: 'normal', }, }, });
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered:
Tested this on the upcoming release and not seeing the bug compiler/not-compiled, likely fixed with the fix to styled(Input).
Sorry, something went wrong.
No branches or pull requests
You are not able to override fontWeight in your styled() component when you use createInterFont
When you try to use prop bold, it will be "ignored." Not ignored but overridden by element style object, which has higher priority.
I used "temp hack" with an undefined value, but it is not working from version 56 because of typescript.
I also tried to use !important but there is no support for it :)
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: