diff --git a/lib/rules/function-no-unknown/__tests__/index.js b/lib/rules/function-no-unknown/__tests__/index.js index 3dab33c82e..4e62855a47 100644 --- a/lib/rules/function-no-unknown/__tests__/index.js +++ b/lib/rules/function-no-unknown/__tests__/index.js @@ -19,6 +19,12 @@ testRule({ { code: 'a { transform: scale(0.5) translate(-100%, -100%); }', }, + { + code: 'a { animation-timeline: scroll(); }', + }, + { + code: 'a { background: -webkit-gradient(linear, 0 50%, 0 100%, from(white), color-stop(0.5, yellow), to(red)); }', + }, ], reject: [ diff --git a/lib/rules/function-no-unknown/index.js b/lib/rules/function-no-unknown/index.js index 467a33a681..82a6699605 100644 --- a/lib/rules/function-no-unknown/index.js +++ b/lib/rules/function-no-unknown/index.js @@ -43,7 +43,16 @@ const rule = (primary, secondaryOptions) => { return; } - const functionsList = JSON.parse(fs.readFileSync(functionsListPath.toString(), 'utf8')); + const functionsList = [ + ...JSON.parse(fs.readFileSync(functionsListPath.toString(), 'utf8')), + // #5960 + '-webkit-gradient', + 'color-stop', + 'from', + 'to', + // #6537 + 'scroll', + ]; root.walkDecls((decl) => { const { value } = decl;