{"ava":{"failFast":false,"files":["dist/tests/**/*.js","!dist/tests/**/fixtures/**/*.js"],"timeout":"1m","workerThreads":false},"dependencies":{"@hint/utils-css":"^1.0.15","@hint/utils-debug":"^1.0.11","@hint/utils-fs":"^1.0.16","@hint/utils-i18n":"^1.0.15","@hint/utils-types":"^1.2.1","postcss":"^8.4.23"},"description":"Let the developers know of what operations will be triggered by changes on the css properties","devDependencies":{"@hint/parser-css":"^3.0.39","@hint/parser-sass":"^1.0.31","@hint/utils-create-server":"^3.4.26","@hint/utils-tests-helpers":"^6.5.6","@types/node":"^20.1.1","@typescript-eslint/eslint-plugin":"^5.59.2","@typescript-eslint/parser":"^4.33.0","ava":"^4.3.3","copyfiles":"^2.4.1","eslint":"^7.32.0","eslint-plugin-markdown":"^2.2.1","npm-run-all":"^4.1.5","nyc":"^15.1.0","postcss":"^8.4.23","rimraf":"^5.0.0","typescript":"^4.5.5"},"homepage":"https://webhint.io/","keywords":["hint","detect-css-reflows","detect-css-reflows-hint"],"license":"Apache-2.0","main":"dist/src/index.js","name":"@hint/hint-detect-css-reflows","nyc":{"extends":"../../.nycrc"},"peerDependencies":{"@hint/parser-css":"^3.0.0","hint":"^7.0.0"},"repository":{"directory":"packages/hint-detect-css-reflows","type":"git","url":"git+https://github.com/webhintio/hint.git"},"private":false,"scripts":{"build":"npm run i18n && npm-run-all build:*","build-release":"npm run clean && npm run i18n && npm run build:assets && tsc --inlineSourceMap false --removeComments true","build:assets":"copyfiles \"./{src,tests}/**/{!(*.ts),.!(ts)}\" dist","build:ts":"tsc -b","clean":"rimraf dist","i18n":"node ../../scripts/create-i18n.js","lint":"npm-run-all lint:*","lint:js":"eslint . --cache --ext .js,.md,.ts --ignore-path ../../.eslintignore","lint:dependencies":"node ../../scripts/lint-dependencies.js","lint:md":"node ../../scripts/lint-markdown.js","test":"npm run i18n && npm run lint && npm run build && npm run test-only","test-only":"nyc ava","test-release":"npm run i18n && npm run lint && npm run build-release && ava","init":"npm install && npm run build","watch":"npm run build && npm-run-all --parallel -c watch:*","watch:assets":"npm run build:assets -- -w --no-initial","watch:test":"ava --watch","watch:ts":"npm run build:ts -- --watch"},"version":"1.0.6","types":"./dist/src/index.d.ts","gitHead":"89eff1633735f4669156dd0b2d093697f458aea7","bugs":{"url":"https://github.com/webhintio/hint/issues"},"_id":"@hint/hint-detect-css-reflows@1.0.6","_nodeVersion":"14.20.0","_npmVersion":"8.14.0","dist":{"integrity":"sha512-oM7r3ZgjBm3GFzPK9MekriODtueZwlXXhT8kBTWNB656rBCkAHjSNB4QMc/CTNLOE8TQTyWufHoC9a6JIOIwQQ==","shasum":"33fd6a35eb7b7c94c13889cc73f0da5429695cfd","tarball":"http://registry-npm.ywwl.com/@hint/hint-detect-css-reflows/download/@hint/hint-detect-css-reflows-1.0.6.tgz","fileCount":36,"unpackedSize":59178,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIJr3R+5kNdf/pr8rF/S7LsFEq8WZm1D9MoFQHOP3oDQIhANuU3GWc8cGtP4rr7T/uvDObFNuZnFUiagGzkW7yCXVO"}],"size":11128,"noattachment":false,"key":"/@hint/hint-detect-css-reflows/-/@hint/hint-detect-css-reflows-1.0.6.tgz"},"_npmUser":{"name":"vidorteg","email":"vidorteg@microsoft.com"},"directories":{},"maintainers":[{"name":"leotlee","email":"leolee@microsoft.com"},{"name":"vidorteg","email":"vidorteg@microsoft.com"},{"name":"oaflynn","email":"flynnolivia@microsoft.com"},{"name":"molant","email":"amolleda@gmail.com"},{"name":"antross","email":"antross@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hint-detect-css-reflows_1.0.6_1687907323888_0.4532669856976026"},"_hasShrinkwrap":false,"readme":"# Detect CSS Reflows (`detect-css-reflows`)\n\nLet the developers know if changes to a specific CSS property inside @keyframes\nwill trigger changes on the Layout, Composite or Paint rendering pipeline.\n\n## Why is this important?\n\nUnderstanding what rendering pipeline operations will be triggered by changes\non specific CSS properties can prevent users from introducing unintentional\nperformance hits. `Paint` and `Layout` operations should be minimized or avoided\nwhen combined with animations.\n\n## What does the hint check?\n\nIt scans the css properties inside @keyframes property against a defined\nset of properties and associated rendering triggers.\n\n### Examples that **trigger** the hint\n\n`left` property triggers a `Layout` operation its use should be minimized inside\n`@keyframes` to avoid jankiness or slow animations.\n\n```css\n@keyframes performance-with-layout-trigger {\n    0% {\n        left: 0;\n\n    }\n    100% {\n        left: 400px;\n    }\n}\n```\n\n### Examples that **pass** the hint\n\nA better approach is to use `translate` which will trigger only once, at the\nend of the animation.\n\n```css\n@keyframes performance-without-layout-trigger {\n    0% {\n        transform: translateX(0);\n\n    }\n    100% {\n        transform: translateX(400px);\n    }\n}\n```\n\n## Can the hint be configured?\n\nYou can decide the granularity and severity of your reports up to the\nfollowing categories:\n\n- detect-css-reflows/composite\n- detect-css-reflows/layout\n- detect-css-reflows/paint\n\n## How to use this hint?\n\nTo use it you will have to install it via `npm`:\n\n```bash\nnpm install hint --save-dev\n```\n\nNote: You can make `npm` install it as a `devDependency` using the `--save-dev`\nparameter, or to install it globally, you can use the `-g` parameter. For\nother options see\n[`npm`'s documentation](https://docs.npmjs.com/cli/install).\n\nAnd then activate it via the [`.hintrc`][hintrc]\nconfiguration file:\n\n```json\n{\n    \"connector\": {...},\n    \"formatters\": [...],\n    \"parsers\": [...],\n    \"hints\": {\n        \"detect-css-reflows/composite\": \"off\",\n        \"detect-css-reflows/layout\": \"hint\",\n        \"detect-css-reflows/paint\": \"off\"\n    },\n    ...\n}\n```\n\n## Further Reading\n\n<!-- Link labels: -->\n\n[hintrc]: https://webhint.io/docs/user-guide/configuring-webhint/summary/\n[understanding-critical-path]: https://developer.mozilla.org/en-US/docs/Web/Performance/Critical_rendering_path\n","publish_time":1687907324087,"_cnpm_publish_time":1687907324087,"dist-tags":{"latest":"1.0.7"}}