
Pseudo Elements
- 152 installs
- 32 repo stars
- Updated March 17, 2026
- raphaelsalaja/skill
Pseudo-elements is an agent skill that audits CSS pseudo-elements and View Transitions usage with file:line findings.
About
Pseudo-elements is a frontend review skill for solo builders who want lint-like rigor on CSS decorations and page transitions without adopting a full design-system audit. The agent reads user-specified files or patterns, applies three rule families—before/after pseudo rules, View Transitions API usage, and native styling conventions—and returns pass/fail examples with concrete file:line locations. It fits when you are reviewing hover effects, decorative layers, or route-level transitions before merge, especially in React or CSS-module codebases where extra spans often replace ::before overlays. Complexity is intermediate because you must point the skill at the right stylesheets and components. Use during Ship review after feature work in Build frontend, or when iterating Operate-side UI regressions. It does not replace accessibility or performance budgets; it tightens pseudo and transition hygiene so agents and humans fix the same class of visual debt consistently.
- Three prioritized rule categories: Before/After (pseudo-), View Transitions (transition-), Native Styling (native-)
- Fails ::before/::after without content and nudges decorative layers off extra DOM nodes
- View Transitions API checks alongside pseudo-element hover and overlay patterns
- Outputs findings in strict file:line format for agent or human fix loops
- Grounded in pseudo-elements and View Transitions best-practice content (skill v2.0.0)
Pseudo Elements by the numbers
- 152 all-time installs (skills.sh)
- +11 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #374 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/raphaelsalaja/skill --skill pseudo-elementsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 152 |
|---|---|
| repo stars | ★ 32 |
| Security audit | 3 / 3 scanners passed |
| Last updated | March 17, 2026 |
| Repository | raphaelsalaja/skill ↗ |
What it does
Run a focused CSS and View Transitions audit that flags missing pseudo content, decorative DOM bloat, and transition API misuse with file:line citations.
Who is it for?
frontends polishing hover states, decorative buttons, and SPA route transitions with agent-assisted CSS review.
Skip if: Greenfield theme design from scratch or teams that only need color-token linting without pseudo or View Transitions scope.
When should I use this skill?
Reviewing hover effects, decorative layers, or page transitions; outputs file:line findings.
What you get
You receive categorized pseudo- and transition-rule violations at file:line so you can remove junk markup and add required content properties before shipping.
- File:line audit findings
- Pass/fail rule examples per violation type
- Category-tagged issue list (pseudo-, transition-, native-)
By the numbers
- 3 prioritized rule categories with distinct prefixes: pseudo-, transition-, native-
Files
Pseudo Elements
Review CSS and JavaScript for pseudo-element best practices and View Transitions API usage.
How It Works
1. Read the specified files (or prompt user for files/pattern) 2. Check against all rules below 3. Output findings in file:line format
Rule Categories
| Priority | Category | Prefix |
|---|---|---|
| 1 | Before/After | pseudo- |
| 2 | View Transitions | transition- |
| 3 | Native Styling | native- |
Rules
Before/After Rules
pseudo-content-required
::before and ::after require content property to render.
Fail:
.button::before {
position: absolute;
background: var(--gray-3);
}Pass:
.button::before {
content: "";
position: absolute;
background: var(--gray-3);
}pseudo-over-dom-node
Use pseudo-elements for decorative content instead of extra DOM nodes.
Fail:
<button className={styles.button}>
<span className={styles.background} /> {/* Unnecessary DOM node */}
Click me
</button>Pass:
<button className={styles.button}>
Click me
</button>.button::before {
content: "";
/* decorative background */
}pseudo-position-relative-parent
Parent must have position: relative for absolute pseudo-elements.
Fail:
.button::before {
content: "";
position: absolute;
inset: 0;
}
/* .button has no position */Pass:
.button {
position: relative;
}
.button::before {
content: "";
position: absolute;
inset: 0;
}pseudo-z-index-layering
Pseudo-elements need z-index to layer correctly with content.
Fail:
.button::before {
content: "";
position: absolute;
inset: 0;
background: var(--gray-3);
}
/* Covers button text */Pass:
.button {
position: relative;
z-index: 1;
}
.button::before {
content: "";
position: absolute;
inset: 0;
background: var(--gray-3);
z-index: -1;
}pseudo-hit-target-expansion
Use negative inset values to expand hit targets without extra markup.
Fail:
<div className={styles.wrapper}> {/* Extra wrapper for hit target */}
<a className={styles.link}>Link</a>
</div>Pass:
.link {
position: relative;
}
.link::before {
content: "";
position: absolute;
inset: -8px -12px;
}View Transitions Rules
transition-name-required
Elements participating in view transitions need view-transition-name.
Fail:
document.startViewTransition(() => {
// No view-transition-name assigned
targetImg.src = newSrc;
});Pass:
sourceImg.style.viewTransitionName = "card";
document.startViewTransition(() => {
sourceImg.style.viewTransitionName = "";
targetImg.style.viewTransitionName = "card";
});transition-name-unique
Each view-transition-name must be unique on the page during transition.
Fail:
.card {
view-transition-name: card;
}
/* Multiple cards with same name */Pass:
// Assign unique name only to transitioning element
element.style.viewTransitionName = `card-${id}`;transition-name-cleanup
Remove view-transition-name after transition completes.
Fail:
sourceImg.style.viewTransitionName = "card";
document.startViewTransition(() => {
targetImg.style.viewTransitionName = "card";
});
// sourceImg still has name, causes conflict on next transitionPass:
sourceImg.style.viewTransitionName = "card";
document.startViewTransition(() => {
sourceImg.style.viewTransitionName = "";
targetImg.style.viewTransitionName = "card";
});transition-over-js-library
Prefer View Transitions API over JavaScript animation libraries for page transitions.
Fail:
import { motion } from "motion/react";
function ImageLightbox() {
return (
<motion.img layoutId="hero" /> // JS-based shared element transition
);
}Pass:
function openLightbox(img: HTMLImageElement) {
img.style.viewTransitionName = "hero";
document.startViewTransition(() => {
// Native browser transition
});
}transition-style-pseudo-elements
Style view transition pseudo-elements for custom animations.
Fail:
document.startViewTransition(() => { /* ... */ });
// Uses default crossfadePass:
::view-transition-group(card) {
animation-duration: 300ms;
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}Native Styling Rules
native-backdrop-styling
Use ::backdrop pseudo-element for dialog/popover backgrounds.
Fail:
<>
<div className={styles.overlay} onClick={close} />
<dialog className={styles.dialog}>{children}</dialog>
</>Pass:
dialog::backdrop {
background: var(--black-a6);
backdrop-filter: blur(4px);
}native-placeholder-styling
Use ::placeholder for input placeholder styling, not wrapper elements.
Fail:
<div className={styles.inputWrapper}>
{!value && <span className={styles.placeholder}>Enter text...</span>}
<input value={value} />
</div>Pass:
input::placeholder {
color: var(--gray-9);
opacity: 1;
}native-selection-styling
Use ::selection for text selection styling.
Pass:
::selection {
background: var(--blue-a5);
color: var(--gray-12);
}Output Format
When reviewing files, output findings as:
file:line - [rule-id] description of issue
Example:
components/button/styles.module.css:12 - [pseudo-content-required] ::before missing content property
components/lightbox/index.tsx:45 - [transition-over-js-library] Using motion layoutId instead of View Transitions APISummary Table
After findings, output a summary:
| Rule | Count | Severity |
|---|---|---|
pseudo-content-required | 2 | HIGH |
pseudo-over-dom-node | 1 | MEDIUM |
transition-name-cleanup | 1 | MEDIUM |
References
Related skills
How it compares
Targeted pseudo/transition checker—not a broad ESLint or full accessibility audit suite.
FAQ
Who is pseudo-elements for?
Developers and small frontend teams reviewing CSS and TSX for pseudo-element and View Transitions best practices before release.
When should I use pseudo-elements?
Use it in Ship review when auditing hover effects or page transitions; in Build frontend when refactoring decorative layers; in Operate iterate when UI regressions involve ::before/::after or view-transition-name usage.
Is pseudo-elements safe to install?
The skill reads files you specify for static review; check the Security Audits panel on this Prism page before granting repository access to an agent.