Files
rspade_system/node_modules/postcss-ordered-values/src/rules/flexFlow.js
root bd5809fdbd Reorganize RSpade directory structure for clarity
Improve Jqhtml_Integration.js documentation with hydration system explanation
Add jqhtml-laravel integration packages for traditional Laravel projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 09:41:48 +00:00

37 lines
710 B
JavaScript

'use strict';
// flex-flow: <flex-direction> || <flex-wrap>
const flexDirection = new Set([
'row',
'row-reverse',
'column',
'column-reverse',
]);
const flexWrap = new Set(['nowrap', 'wrap', 'wrap-reverse']);
/**
* @param {import('postcss-value-parser').ParsedValue} flexFlow
* @return {string}
*/
module.exports = function normalizeFlexFlow(flexFlow) {
let order = {
direction: '',
wrap: '',
};
flexFlow.walk(({ value }) => {
if (flexDirection.has(value.toLowerCase())) {
order.direction = value;
return;
}
if (flexWrap.has(value.toLowerCase())) {
order.wrap = value;
return;
}
});
return `${order.direction} ${order.wrap}`.trim();
};