@wordpress/style-engine
Version:
A suite of parsers and compilers for WordPress styles.
44 lines (39 loc) • 782 B
text/typescript
/**
* Internal dependencies
*/
import type { Style, StyleOptions } from '../../types';
import { generateRule } from '../utils';
const minHeight = {
name: 'minHeight',
generate: ( style: Style, options: StyleOptions ) => {
return generateRule(
style,
options,
[ 'dimensions', 'minHeight' ],
'minHeight'
);
},
};
const aspectRatio = {
name: 'aspectRatio',
generate: ( style: Style, options: StyleOptions ) => {
return generateRule(
style,
options,
[ 'dimensions', 'aspectRatio' ],
'aspectRatio'
);
},
};
const width = {
name: 'width',
generate: ( style: Style, options: StyleOptions ) => {
return generateRule(
style,
options,
[ 'dimensions', 'width' ],
'width'
);
},
};
export default [ minHeight, aspectRatio, width ];