Skip to content
cccskills
FreePublished on GitHubEnglish overview

cascade-layers

Review conflicting CSS rules and organize styles with cascade layers, explicit groups that control override order. Define layers for resets, base styles, components, and utilities to make large stylesheets easier to reason about and maintain.

OriginalShow the original description

Use when reviewing a CSS architecture for specificity issues, setting up a design system, or migrating a large codebase from utility-first to a layered architecture.

AI rating100/ 100See how to install

Good for

  • Investigate recurring CSS override conflicts
  • Define style priority for a design system
  • Migrate utility-first CSS into a layered structure
  • Review complex selectors and excessive !important usage

Overview

What it does

Review CSS conflicts and make override order explicit with @layer. Cascade layers organize styles into groups whose order controls their priority. This skill examines existing CSS and helps assign rules to layers such as resets, base styles, components, and utilities. It also reviews !important, overly complex selectors, and inline styles used to override other rules.

When it helps

Use it when a large codebase makes it difficult to trace which rules determine an element’s appearance. It also supports building a design system or moving from utility-first CSS to a layered structure.

Example requests

  • “Investigate conflicting CSS overrides and propose a structure using @layer.”
  • “Assign the existing styles to reset, base, components, and utilities layers.”

Notes

Declare the layer order at the beginning of the main CSS file to reduce dependence on import order. Unlayered styles have higher priority, so during a gradual migration, check how rules that have not yet moved into layers affect the page’s appearance.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Objective evaluation

AI rated this skill on four points using only the contents of its SKILL.md. Stars and popularity are not taken into account.

Clear instructionsIs it clear when to use it and what it does?
AGoodThe description explicitly names specificity audits, design system setup, and migration to layered CSS as use cases.
Concrete stepsAre steps, inputs, outputs, and examples spelled out?
AGoodInstructions specify declaring layer order, assigning existing rules to layers, and checking !important and overly specific selectors.
SafetyAre sending data, deleting files, and running commands disclosed?
AGoodChanges concern CSS layer declarations and rule placement; no external transmission or deletion is instructed.
Easy setupDoes it need few tools or API keys, and are they documented?
AGoodThe work centers on reviewing and editing CSS, with no additional tools or API keys required.

The total counts each point as A = 25, B = 15, C = 5. Rated by AI (OpenAI Codex) as of Oct 23, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (2)

  • SKILL.md2.0 KB
  • references/rule.md6.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Use @layer to manage CSS cascade order explicitly

Specificity conflicts are one of the most common causes of CSS bugs in large codebases. Developers resort to !important, deeply nested selectors, or inline styles to win specificity wars, creating an unmaintainable arms race. Cascade layers move the source of truth for cascade order from selector specificity to explicit layer ordering, making the system predictable and easy to reason about.

Quick Reference

  • Declare your layer stack at the top of your main CSS file to fix order regardless of import sequence
  • Styles in later layers win over styles in earlier layers, regardless of selector specificity
  • Put third-party/reset styles in early layers so your own styles always override them
  • Unlayered styles (no @layer) have the highest priority — migrate gradually

Check

Check whether the CSS uses cascade layers to manage specificity, and whether the layer order is explicitly declared.

Fix

Introduce @layer declarations for reset, base, components, and utilities, and migrate existing styles into appropriate layers.

Explain

Explain how CSS Cascade Layers work, how layer order determines cascade priority, and why this is preferable to specificity-based overrides.

Code Review

Review the CSS for !important declarations, excessively specific selectors (more than two class selectors), and inline styles used to override component styles — all are signals that the cascade is not under control.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/cascade-layers

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

404-page

FreeSummary

Create and review custom 404 pages that help visitors recover from broken or moved links through search and navigation. Check the rendered page and HTTP response so missing content returns a proper 404 status.

  • Creating a helpful custom 404 page
  • Adding search and navigation for broken links
  • Checking missing pages that return HTTP 200
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

about-page

FreeSummary

Audit or create a dedicated About page that explains a website’s purpose and identifies its people or organization. Review the rendered output and supporting information, including expertise and contact details, to find gaps.

  • Reviewing a website’s About page
  • Creating a page about the organization and its mission
  • Checking how operator information appears in rendered output
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

accessibility-testing

FreeSummaryAI rating 80

Review and add automated accessibility checks for components, pages, and continuous integration workflows. Use axe-based tools to detect structural and attribute issues, while identifying checks that still need keyboard or screen reader testing.

  • Review accessibility coverage for shared components
  • Add accessibility checks to page flow tests
  • Run accessibility tests in CI
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

accessible-authentication

FreeSummaryAI rating 90

Review sign-in, registration, multi-factor authentication, and account recovery for accessibility barriers. Find blocked paste, difficult code entry, and inaccessible backup methods, then suggest authentication paths that support password managers, autofill, or device approval.

  • Reviewing accessibility across the sign-in process
  • Checking verification code paste and autofill
  • Inspecting password reset and account recovery
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

Review form errors, success messages, and live updates so screen reader users receive important notifications. Check the HTML delivered to the browser, announcement settings, display duration, and dismissal controls, then identify specific elements that need changes.

  • Reviewing form error announcements
  • Checking success message display duration
  • Auditing live update notifications
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

Review HTML tables so screen reader users can understand how headers and data relate. Check header markup, table descriptions, and merged cells, then identify specific fixes and ways to verify them.

  • Reviewing tables for screen reader accessibility
  • Checking header relationships in tables with merged cells
  • Reviewing table patterns in a design system
thedaviddias/Front-End-Checklist74.5KUpdated Oct 6, 2026

See all skills by thedaviddias

Report a problem with this skill