Skip to content

Commit

Permalink
fix: revert rem function
Browse files Browse the repository at this point in the history
  • Loading branch information
dkireev committed Oct 8, 2020
1 parent ba7d583 commit 1daaa60
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/utils/src/rem/rem.ts
Expand Up @@ -2,15 +2,6 @@ import polishedRem from 'polished/lib/helpers/rem';
import { sharedTokens } from '@heathmont/moon-themes';

const rem = (value: string | number, baseFontSize: string | number = 16) => {
if (
![10, 14, 18, '10px', '14px', '18px'].includes(value) &&
(typeof value === 'number' && value % 4 !== 0)
) {
// eslint-disable-next-line no-console
console.warn(
`ATTENTION! You've used rem(${value}) which is out of Moon DS range! Please use 4px-step approach instead!`
);
}
return polishedRem(value, baseFontSize || sharedTokens.base.fontSize);
};

Expand Down

0 comments on commit 1daaa60

Please sign in to comment.