// Convert px to rem units
// ---- ---- ---- ---- ----

$base-size: 16; // base font-size to use in calculation (16 is default)
@function size($target, $context: $base-size) {
  @return calc($target / $context) * 1rem;
}

// Convert letter-spacing from Photoshop to Web format
// ---- ---- ---- ---- ----

@function ls($name) {
  $value: map_get($ls, $name);
  @return $value / 1000 * 1em;
}

// array of letter-spacing to call, change as necessary (add, remove)
$ls: (
  base: -10,
  heading: 10,
  paragraph: 10,
);

/*  examples
body {
    letter-spacing: ls(base);
}

h1, h2, h3 {
    letter-spacing: ls(heading);
}

p {
    letter-spacing: ls(paragraph);
}
*/
