css-marker-patterns — Claude Code rule: marker highlights in CSS and GSAP
The css-marker-patterns rule shows five ways to mark text with plain CSS and GSAP timelines: a marker sweep, wobbly circle, radiating lines, wavy underline, and cross-out.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/css-marker-patterns.mdWhat css-marker-patterns does
Each of the five MarkerHighlight.js drawing modes gets its own recipe here: markup with mh-* classes, the CSS that places it, and a tween you drop into a timeline. That covers a yellow bar behind a phrase, a hand-drawn ring, rays out of a word, a squiggle underneath, and hatch lines over text you want to play down.
The ring is a border-radius: 50% shape rotated a few degrees, with .tight, .rounded and .ellipse variants alongside. Rays are separate bars whose --angle and --len custom properties set direction and reach; the notes suggest lengths between 40 and 80px so the fan looks drawn rather than machined. The squiggle is an SVG path sized with getTotalLength and revealed through stroke-dashoffset.
Nothing moves until GSAP is on the page and you build the tl timeline yourself: the snippets call tl.to and gsap.set, but the timeline object is yours to create. Swap in your own ids and classes too — this is a template, not a packaged component.
What it helps with
- sweep a marker behind a headline in a composition
- ring a keyword with a hand-drawn circle
- draw a wavy SVG underline as text appears
- cross out an old price with angled lines
- fan rays around a word using CSS variables
Example prompts for the agent
- Add a marker sweep with
mh-highlight-wrapand tween#hl-1inside the GSAP timeline. - Wrap the word
IMPORTANTinmh-circle-ringand use the.tightvariant. - Animate
#scribble-1by measuringgetTotalLengthand easingstrokeDashoffsetto zero.
How to install css-marker-patterns
Manually: put the files in place
.claude/rules/css-marker-patterns.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/css-marker-patterns.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/css-marker-patterns.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/css-marker-patterns.mdManually: put the files in place
.clinerules/css-marker-patterns.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about css-marker-patterns
How to install css-marker-patterns in Claude Code?
Put the file at .claude/rules/css-marker-patterns.md in your project. Claude Code then reads it as a project rule.
What does css-marker-patterns do?
It supplies markup, CSS and GSAP tweens for five marker effects: highlight, circle, burst, scribble and sketchout. Aimed at deterministic rendering in HyperFrames compositions.
Does it need GSAP?
Yes. Every animation shown is a gsap.set or tl.to call, and the tl timeline has to be created in your own composition code.