How to use css-unit-converter - 1 common examples

To help you get started, we’ve selected a few css-unit-converter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MoOx / reduce-css-calc / src / lib / convert.js View on Github external
function convertAbsoluteLength(left, right, precision) {
  if (right.type === left.type) {
    right = {
      type: left.type,
      value: convertUnits(right.value, right.unit, left.unit, precision),
      unit: left.unit
    }
  }
  return { left, right }
}

css-unit-converter

Converts CSS values from one unit to another

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis

Popular css-unit-converter functions