rofrischmann/fela

View on GitHub
packages/fela-plugin-expand-shorthand/src/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import { expandWithMerge, expand } from 'inline-style-expand-shorthand'

function resolveShorthands(style, shouldMerge) {
  if (shouldMerge) {
    return expandWithMerge(style)
  }

  return expand(style)
}

export default function expandShorthand(merge = false) {
  return function expandShorthandPlugin(style) {
    return resolveShorthands(style, merge)
  }
}