import postcss from 'postcss';

const postcssFlexibility = postcss.plugin('postcss-flexibility', () => css => {
	css.walkRules(rule => {
		const isDisabled = rule.some(({prop, text}) =>
			prop === '-js-display' || text === 'flexibility-disable' || text === '! flexibility-disable'
		);

		if (!isDisabled) {
			rule.walkDecls('display', decl => {
				const {value} = decl;
				if (value === 'flex') {
					decl.cloneBefore({prop: '-js-display'});
				}
			});
		}
	});
});

export default postcssFlexibility;

import postcss from 'postcss';

const postcssFlexibility = postcss.plugin('postcss-flexibility', () => css => {
	css.walkRules(rule => {
		const isDisabled = rule.some(({prop, text}) =>
			prop === '-js-display' || text === 'flexibility-disable'
		);

		if (!isDisabled) {
			rule.walkDecls('display', decl => {
				const {value} = decl;
				if (value === 'flex') {
					decl.cloneBefore({prop: '-js-display'});
				}
			});
		}
	});
});

export default postcssFlexibility;

--- 
+++ 
@@ -3,7 +3,7 @@
 const postcssFlexibility = postcss.plugin('postcss-flexibility', () => css => {
 	css.walkRules(rule => {
 		const isDisabled = rule.some(({prop, text}) =>
-			prop === '-js-display' || text === 'flexibility-disable' || text === '! flexibility-disable'
+			prop === '-js-display' || text === 'flexibility-disable'
 		);
 
 		if (!isDisabled) {
Add support for loud comments