Skip to content

Instantly share code, notes, and snippets.

@dennishn
Last active March 2, 2018 08:52
Show Gist options
  • Save dennishn/6ab0532b4d94de3a5881c04f250b406a to your computer and use it in GitHub Desktop.
Save dennishn/6ab0532b4d94de3a5881c04f250b406a to your computer and use it in GitHub Desktop.

There is quite a difference between old and new spacing rules. I fear that we will have some very inconsistent layout if we mix these values.

An option could be to ask the designer to map the old values to the new ones.

$newSizes: (
  5: 5px
);

$s1: map_get($newSizes, 5);

Also notice that the new values are using pixels units and no longer REM - how should we approach this?

This issue also goes for typography, and to some extend colors.

// OLD VALUES
$s1: 0.5rem; // 8px
$s2: 0.625rem; // 10px
$s3: 0.9375rem; // 15px
$s4: 1rem; // 16px
$s5: 1.25rem; // 20px
$s6: 1.875rem; // 30px
$s7: 2.5rem; // 40px
$s8: 3.125rem; // 50px
$s9: 3.75rem; // 60px
$s10: 4.6875rem; // 75px
$s11: 6.25rem; // 100px
$s12: 7.5rem; // 120px
// NEW VALUES
5: 5px,
10: 10px,
15: 15px,
20: 20px,
30: 30px,
40: 40px,
50: 50px,
60: 60px,
70: 70px,
80: 80px,
90: 90px,
100: 100px,
150: 150px,
200: 200px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment