summaryrefslogtreecommitdiff
path: root/node_modules/postcss-merge-longhand/src/lib/parseTrbl.js
blob: 3ebb6c91f4146f5e27c889956f62d84369a43b1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'use strict';
const { list } = require('postcss');
/** @type {(v: string | string[]) => [string, string, string, string]} */
module.exports = (v) => {
  const s = typeof v === 'string' ? list.space(v) : v;
  return [
    s[0], // top
    s[1] || s[0], // right
    s[2] || s[0], // bottom
    s[3] || s[1] || s[0], // left
  ];
};