.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isStandardSyntaxAtRule.js
1 /* @flow */
2 "use strict";
3
4 /**
5  * Check whether a at-rule is standard
6  *
7  * @param {atRule} postcss at-rule node
8  * @return {boolean} If `true`, the declaration is standard
9  */
10 module.exports = function(atRule /*: postcss$atRule*/) /*: boolean*/ {
11   // Ignore scss `@content` inside mixins
12   if (!atRule.nodes && atRule.params === "") {
13     return false;
14   }
15
16   // Ignore detached ruleset `@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }`
17   if (
18     !atRule.nodes &&
19     atRule.raws.afterName === "" &&
20     atRule.params[0] === "("
21   ) {
22     return false;
23   }
24
25   return true;
26 };