mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-05-01 11:12:18 +08:00
17 lines
342 B
JavaScript
17 lines
342 B
JavaScript
import { isAtRule } from './typeGuards.mjs';
|
|
|
|
/**
|
|
* Check if a rule is a keyframe one
|
|
*
|
|
* @param {import('postcss').Rule} rule
|
|
* @returns {boolean}
|
|
*/
|
|
export default function isKeyframeRule(rule) {
|
|
const parent = rule.parent;
|
|
|
|
if (!parent) {
|
|
return false;
|
|
}
|
|
|
|
return isAtRule(parent) && parent.name.toLowerCase() === 'keyframes';
|
|
}
|