Your app looks AI-generated. Vincent Van Gogh noticed. An agent skill that finds and fixes AI-looking UI and UX in mobile apps, web apps, and websites.
JavaScript accessibilityagent-skillsagent-skills-toolsagentsagentskillsai-slopclaudeclaude-codeclaude-skillsexpoflutterfrontendionicjetpack-composemobilereact-nativeswiftuiuiuxvibe-coding
Fix hover-scale detection for standalone CSS scale (#118)
Prapathomsit-A2b2aac48f2bb
diff --git a/skills/unslop-anything/scripts/detect.js b/skills/unslop-anything/scripts/detect.jsindex a83b2bf..7155946 100644--- a/skills/unslop-anything/scripts/detect.js+++ b/skills/unslop-anything/scripts/detect.js@@ -926,7 +926,7 @@ const rules = [message: "Cards that grow on hover.",fix: "Show hover with a quick color or surface change. Keep scale for a small press-down on buttons.",find({ code }) {- return [...matches(/\b(?:group-)?hover:(?:-translate-y-\d|scale-1(?:0[2-9]|[1-9]\d)\b|scale-\[(?:1\.(?:0[2-9]\d*|[1-9]\d*)|[2-9]\d*(?:\.\d+)?)\])|:hover\s*\{[^}]*transform:\s*scale\(1\.(?:0[2-9]|[1-9])/, code)].map((m) => m.index);+ return [...matches(/\b(?:group-)?hover:(?:-translate-y-\d|scale-1(?:0[2-9]|[1-9]\d)\b|scale-\[(?:1\.(?:0[2-9]\d*|[1-9]\d*)|[2-9]\d*(?:\.\d+)?)\])|:hover\s*\{[^}]*transform:\s*scale\(1\.(?:0[2-9]|[1-9])|:hover\s*\{[^}]*?(?<![\w-])scale\s*:\s*(?:1\.0[2-9]\d*|1\.[1-9]\d*)\b/, code)].map((m) => m.index);},},{diff --git a/test/detect.test.js b/test/detect.test.jsindex b6c23c2..269d268 100644--- a/test/detect.test.js+++ b/test/detect.test.js@@ -992,6 +992,16 @@ test("hover-scale flags Tailwind arbitrary scale values of 1.02 and above", () =assert.deepStrictEqual(rulesFor('<div className="hover:scale-105">x</div>\n'), ["hover-scale"]);});+test("hover-scale flags standalone CSS scale at 1.02 and above, not neutral, shrinking, or similarly named properties", () => {+ const rulesFor = (src) => scanSource(src, "a.css", { kind: "web" }).map((f) => f.rule);+ assert.deepStrictEqual(rulesFor(".card:hover { scale: 1.02; }\n"), ["hover-scale"]);+ assert.deepStrictEqual(rulesFor(".card:hover { scale: 1.1 1; }\n"), ["hover-scale"]);+ assert.deepStrictEqual(rulesFor(".card:hover { scale: 1; }\n"), []);+ assert.deepStrictEqual(rulesFor(".button:hover { scale: 0.98; }\n"), []);+ assert.deepStrictEqual(rulesFor(".card:hover { scaleX: 1.1; }\n"), []);+ assert.deepStrictEqual(rulesFor(".card:hover { custom-scale: 1.1; }\n"), []);+});+test("glow-shadow catches Android shadowColor on one line or with alpha", () => {const oneLine = '<TextView android:shadowColor="#7C3AED" android:shadowRadius="20" />';const multiLine = '<TextView\n android:shadowColor="#807C3AED"\n android:shadowRadius="20" />';