3 ms·
(Note: There's a duplicate of this comment) Check out http://tachyons.io http://tachyons.io. It has a scale for widths, margins, paddings and fontsizes. Spec
by cel1ne 10y ago
(Note: There's a duplicate of this comment)
Check out http://tachyons.io http://tachyons.io.
It has a scale for widths, margins, paddings and fontsizes.
Specify pl1 to pl7 and get padding-left from 0.25 to 16rem.
w1 to w5 for width of 1,2,4,8,16rem.
f1 to f6 and f-headline for a proven typographic scale that makes sense.
Everything is relative to the fontsize. No more magic values!
Plus the scale are powers of two so integers only and everything always adds up. No more off-by-1-pixel errors!
And there's even a port for react-native: http://github.com/fab1an/react-native-style-tachyons http://github.com/fab1an/react-native-style-tachyons.