Skip to content
Back to skills

Css Selectors Has Content Aware Layout

ASecurity

Use CSS :has() and :not(:has()) to adapt layout to child content without JavaScript, Angular bindings, or class toggles.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
developmentjavascriptgojavareactangulartesting

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add janpereira-dev/ngAutoPilot --skill css--selectors--has-content-aware-layout --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Css Selectors Has Content Aware Layout?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Css  Selectors  Has Content Aware Layout
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/janpereira-dev-css-selectors-has-content-aware-layout/badge)](https://www.skillsdirectory.com/skills/janpereira-dev-css-selectors-has-content-aware-layout)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: css.selectors.has-content-aware-layout
name: CSS Has Content Aware Layout
description: "Use CSS :has() and :not(:has()) to adapt layout to child content without JavaScript, Angular bindings, or class toggles."
stack:
  - CSS
category: selectors
status: stable
version: 0.10.0
owner: NgAutoPilot
triggers:
  - css has
  - content aware layout
  - quantity query
---

# CSS Has Content Aware Layout

Use this skill when CSS can react to the DOM structure on its own.

## Purpose

Create layout rules that respond to child presence or quantity without JavaScript.

## When to Use

Use this skill when layout depends on visible DOM content and the condition is purely visual.

## Do

- keep selectors structural and readable
- use `:has()` as an enhancement
- keep Angular out of purely visual decisions

## Do Not

- move business logic into CSS
- depend on fragile third-party DOM
- hide accessibility behavior inside selectors

## Review Checklist

- [ ] The default layout works without `:has()`.
- [ ] The condition is purely visual.
- [ ] The selector is scoped and readable.
- [ ] Browser support was checked.

## Expected Output

Return:

1. The layout condition being modeled.
2. The CSS selector strategy.
3. The fallback/default layout.
4. Browser support or testing risks.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…