embedded-or-inline-css
What it does
This skill checks a web page for styles written directly inside its HTML. It is for developers who want cleaner, easier-to-maintain code.
When to use it
- ✓When a page has style attributes scattered through its HTML.
- ✓When a template contains large style blocks that are hard to update.
- ✓When you want the browser to reuse your styles across pages.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/embedded-or-inline-css/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you move the inline styles in my page into a separate stylesheet?”
5 new skills a week. 1 minute to read.
How it works
The agent finds inline and embedded styles and suggests moving them into external files. It keeps only critical above-the-fold styles and dynamic values inline.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Avoid embedded and inline CSS
Inline CSS cannot be cached separately, increases HTML payload, breaks separation of concerns, and is harder to maintain in large codebases.
Quick Reference
- Move inline styles to external CSS files or CSS-in-JS
- Exception: critical CSS should be inlined for performance
- Exception: dynamic values (CSS custom properties) can be inline
- Inline CSS breaks caching and increases HTML size
Check
Verify that inline CSS and embedded styles are avoided except for valid use cases like critical CSS, dynamic styles, or performance optimization.
Fix
Move inline and embedded CSS to external stylesheets, keeping only critical above-the-fold CSS inline for performance optimization.
Explain
Explain why external CSS is preferred for maintainability, caching, and separation of concerns, with exceptions for critical CSS and dynamic styles.
Code Review
Review stylesheets, component styles, and responsive states related to Avoid embedded and inline CSS. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/embedded-or-inline-css
FAQ
Why are external stylesheets better?
The browser can cache them separately, and the HTML stays smaller and easier to maintain.
When is inline CSS acceptable?
The skill allows critical above-the-fold styles and dynamic values, such as CSS custom properties.
Does it cover frameworks?
The skill mentions CSS-in-JS as an option in framework projects.
Details
Original description by the author
Use when reviewing stylesheets, component styles, and responsive behavior related to Avoid embedded and inline CSS. Check the rendered layout across breakpoints and interaction states before proposing a fix.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2830
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.