3 ms·
For those critical applications where typing out inline styles is just too many characters, I guess.
by al2o3cr 10y ago
For those critical applications where typing out inline styles is just too many characters, I guess.
- cel1ne 10y agoTachyons' main-purpose is not abbreviating inline-styles, but providing the developer with a consistent and scalable layouting-system for spacing and typography, which, at the end, is what arrives at the user. If you love your inline-styles you can keep them and use tachyons just for the scale: import { sizes } from "react-native-style-tachyons <MyComp style={{ fontSize: sizes.f2, height: sizes.h1, paddingTop: sizes.pt1, backgroundColor: "#232323" }} /> Though I still think <MyComp cls="f2 h1 pt1 bg-#232323" /> /* string is checked for validity of course */ is much cleaner.