import type { SourceRule } from "../../rule" import { darkBackground, resolveValues } from "./support/css-effects" import { componentExtensions, pageSource, sourceHit } from "./support/source-text" import { sourceShadows } from "./support/source-shadow" export const darkGlow: SourceRule = { meta: { id: "dark-glow", name: "Glowing shadow accents", category: "slop", severity: "warning", engine: "source", description: "A colored blurred shadow creates a visible glow.", fixHint: "Use neutral elevation shadows instead of chromatic halos." }, extensions: componentExtensions, check: (context) => { const text = pageSource(context) if (text === null) return [] const dark = darkBackground(text) for (const m of resolveValues(text).matchAll(/(?