xref: /expo/packages/html-elements/build/css/units.js (revision 55058f92)
1*55058f92SEvan Baconimport { PixelRatio, Platform } from 'react-native';
2*55058f92SEvan Baconexport function rem(value) {
3*55058f92SEvan Bacon    if (Platform.OS === 'web')
4*55058f92SEvan Bacon        return `${value}rem`;
5*55058f92SEvan Bacon    return PixelRatio.getFontScale() * 16 * value;
6*55058f92SEvan Bacon}
7*55058f92SEvan Baconexport function em(value) {
8*55058f92SEvan Bacon    if (Platform.OS === 'web')
9*55058f92SEvan Bacon        return `${value}em`;
10*55058f92SEvan Bacon    return rem(value);
11*55058f92SEvan Bacon}
12*55058f92SEvan Bacon//# sourceMappingURL=units.js.map