21 lines
632 B
JavaScript
21 lines
632 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const getPreviousNonSharedLineCommentNode = require('./getPreviousNonSharedLineCommentNode');
|
||
|
const isCustomProperty = require('./isCustomProperty');
|
||
|
const isStandardSyntaxDeclaration = require('./isStandardSyntaxDeclaration');
|
||
|
const { isDeclaration } = require('./typeGuards');
|
||
|
|
||
|
/**
|
||
|
* @param {import('postcss').Node} node
|
||
|
*/
|
||
|
module.exports = function isAfterStandardPropertyDeclaration(node) {
|
||
|
const prevNode = getPreviousNonSharedLineCommentNode(node);
|
||
|
|
||
|
return (
|
||
|
prevNode !== undefined &&
|
||
|
isDeclaration(prevNode) &&
|
||
|
isStandardSyntaxDeclaration(prevNode) &&
|
||
|
!isCustomProperty(prevNode.prop || '')
|
||
|
);
|
||
|
};
|