3 const beforeBlockString = require("./beforeBlockString");
4 const hasBlock = require("./hasBlock");
5 const rawNodeString = require("./rawNodeString");
8 * Return a CSS statement's block -- the string that starts and `{` and ends with `}`.
10 * If the statement has no block (e.g. `@import url(foo.css);`),
13 * @param {Rule|AtRule} statement - postcss rule or at-rule node
14 * @return {string|undefined}
16 module.exports = function(
17 statement /*: postcss$rule | postcss$atRule*/
18 ) /*: string | boolean*/ {
19 if (!hasBlock(statement)) {
22 return rawNodeString(statement).slice(beforeBlockString(statement).length);