summaryrefslogtreecommitdiff
path: root/node_modules/postcss-merge-longhand/src/lib/parseTrbl.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-merge-longhand/src/lib/parseTrbl.js')
-rw-r--r--node_modules/postcss-merge-longhand/src/lib/parseTrbl.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/postcss-merge-longhand/src/lib/parseTrbl.js b/node_modules/postcss-merge-longhand/src/lib/parseTrbl.js
new file mode 100644
index 00000000..3ebb6c91
--- /dev/null
+++ b/node_modules/postcss-merge-longhand/src/lib/parseTrbl.js
@@ -0,0 +1,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
+ ];
+};