3 ms·
Tachyons' main-purpose is not abbreviating inline-styles, but providing the developer with a consistent and scalable layouting-system for spacing and typography
by cel1ne 10y ago
Tachyons' 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.