Unit

Documentation is WIP, check open issues and start improving!

Unit is a single measurement used across all Trafi platforms (iOS, Android and Web). We use this measurement in order to have a flexibility and power to change spacing / padding / margin / width / height properties and other metrics with single change. It also allows us to use more complex grid systems.

In the Styleguide we use measurement function, which multiplies default unit.

Documentation

Specifications

// Unit
$unit-base : 4px;

@function unit($multiplier) {
  @if type-of($multiplier) == 'number' {
    @return $unit-base * $multiplier
  }
}