What happened?
I wanted to add a tall breakpoint, to target taller screens, like this:
@custom-variant tall (@media (min-height: 700px));
So that I could do stuff like text-md tall:text-lg
But it does not seem to work or be supported. Any plan to add it?
Meanwhile I went with a hook; it works too but is less gracious:
export function useIsTallScreen() {
const { height } = useWindowDimensions();
return height > 700;
}
const isTallScreen = useIsTallScreen();
return <Text className={cn("text-white", isTallScreen ? "text-lg" : "text-md")}>Hello, World!</Text>
Steps to Reproduce
- Add
@custom-variant tall (@media (min-height: 700px)); to your CSS file
- Add
text-md tall:text-lg to a Text
- Check on smaller and bigger screens: text size should vary
Snack or Repository Link (Optional)
No response
Uniwind version
Pro 1.4.0
React Native Version
0.85.3
Platforms
Android, iOS
Expo
Yes
Additional information
What happened?
I wanted to add a
tallbreakpoint, to target taller screens, like this:So that I could do stuff like
text-md tall:text-lgBut it does not seem to work or be supported. Any plan to add it?
Meanwhile I went with a hook; it works too but is less gracious:
Steps to Reproduce
@custom-variant tall (@media (min-height: 700px));to your CSS filetext-md tall:text-lgto a TextSnack or Repository Link (Optional)
No response
Uniwind version
Pro 1.4.0
React Native Version
0.85.3
Platforms
Android, iOS
Expo
Yes
Additional information