본문으로 건너뛰기
cccskills
무료GitHub에 공개

modern-css-native-expert

Expert guide for cutting-edge Native CSS (2026 Standard) — CSS Anchor Positioning, @starting-style, View Transitions Level 2, Container Queries, and :has() / Panduan ahli fitur CSS native modern 2026.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Modern Native CSS Expert (2026 Standard & Primitives)

English | Bahasa Indonesia


<a name="english"></a>

English

Purpose & Overview

Production-grade engineering guide for modern Native CSS features (2026 Edition) that replace cumbersome JavaScript libraries with pure browser-native primitives. Covers the CSS Anchor Positioning API for tooltips/popovers, @starting-style for smooth entry/exit animations on top-layer elements (<dialog>, popover), View Transitions API Level 2, Container Queries (@container), and the :has() relational selector.

Key Capabilities

  1. CSS Anchor Positioning: Eliminating Floating UI / Popper.js dependencies. Tether tooltips, menus, and popovers to trigger elements natively with auto-flip fallbacks (position-try-fallbacks).
  2. Smooth Top-Layer Transitions: Animating <dialog> and [popover] elements from display: none to visible with @starting-style and transition-behavior: allow-discrete.
  3. Container Queries (@container): Component-level responsive design based on parent container dimensions rather than viewport width.
  4. Relational :has() Selector: Styling parent containers or sibling trees based on nested child states without React/JS state overhead.
  5. Native CSS Nesting & @layer: Structuring clean, zero-build styles with cascade priority layers.

Production Implementation Recipes

Recipe 1: Pure Native Anchor Positioning for Tooltips & Dropdowns (No JS)

/* Define the anchor trigger button */
.anchor-trigger {
  anchor-name: --my-dropdown-anchor;
}

/* Tether the popover menu to the anchor trigger */
.dropdown-menu {
  position: fixed;
  position-anchor: --my-dropdown-anchor;
  
  /* Place below the anchor by default */
  top: anchor(bottom);
  left: anchor(left);
  margin-top: 8px;

  /* Automatic flip to top if screen boundary is reached */
  position-try-fallbacks: flip-block;
}

Recipe 2: Smooth <dialog> Entry/Exit Animation with @starting-style

/* Dialog element with discrete transition support */
dialog {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, display 0.25s allow-discrete;
}

/* Open state */
dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Starting style when transitioning from display: none to open */
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
}

/* Backdrop smooth fade */
dialog::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition: background-color 0.25s ease-out, display 0.25s allow-discrete;
}

dialog[open]::backdrop {
  background-color: rgb(0 0 0 / 50%);
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0%);
  }
}

Recipe 5: Material Design 3 (M3) Top-Layer Overlays with Emphasized Decelerate Easing

Implement M3 dialogs and modal bottom sheets natively using <dialog> and @starting-style with M3 Emphasized Decelerate Easing (cubic-bezier(0.05, 0.7, 0.1, 1.0)):

/* M3 Modal Dialog using Native CSS Top-Layer with M3 Tokens */
dialog.m3-dialog {
  border: none;
  border-radius: var(--md-sys-shape-corner-extra-large, 28px);
  background-color: var(--md-sys-color-surface-container-high, #ECE6F0);
  color: var(--md-sys-color-on-surface, #1D1B20);
  box-shadow: var(--md-sys-elevation-level3, 0 4px 12px rgba(0, 0, 0, 0.18));
  padding: 24px;
  max-width: 560px;
  opacity: 0;
  transform: scale(0.9) translateY(16px);
  transition: 
    opacity 0.4s cubic-bezier(0.05, 0.7, 0.1, 1.0),
    transform 0.4s cubic-bezier(0.05, 0.7, 0.1, 1.0),
    display 0.4s allow-discrete;
}

dialog.m3-dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@starting-style {
  dialog.m3-dialog[open] {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }
}

dialog.m3-dialog::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition: background-color 0.4s cubic-bezier(0.05, 0.7, 0.1, 1.0), display 0.4s allow-discrete;
}

dialog.m3-dialog[open]::backdrop {
  background-color: rgb(0 0 0 / 32%); /* M3 Scrim */
}

Implementation Checklist

  • Replace JS positioning libraries (Popper, Floating UI) with native anchor-name and position-anchor.
  • Use @starting-style and transition-behavior: allow-discrete for animating modals and popovers without JavaScript timers.
  • Use @container on modular components to allow seamless reuse across sidebars, grids, and modals.
  • Organize design tokens and reset styles into @layer (e.g. @layer base, components, utilities;).

Orchestration & Integration

  • Integrates with: design-system-architect, design-system-architect, senior-frontend, tailwind-expert, senior-frontend.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Tujuan & Gambaran Umum

Panduan rekayasa tingkat produksi untuk memanfaatkan Fitur CSS Native Modern (Standar 2026) yang menggantikan pustaka JavaScript berukuran besar dengan fitur asli browser. Mencakup CSS Anchor Positioning API untuk tooltip dan popover, @starting-style untuk animasi masuk dan keluar yang mulus pada elemen top-layer (<dialog>, popover), View Transitions API Level 2, Container Queries (@container), dan selektor relasional :has().

Kemampuan Utama

  1. CSS Anchor Positioning: Menghapus ketergantungan pada pustaka seperti Floating UI atau Popper.js. Mengikat tooltip, menu, dan popover ke tombol pemicu secara native dengan pembalikan posisi otomatis (position-try-fallbacks).
  2. Animasi Mulus Top-Layer: Menganimasikan dialog dari status display: none ke tampil menggunakan @starting-style dan transition-behavior: allow-discrete.
  3. Container Queries (@container): Desain responsif berbasis ukuran kontainer induk, bukan lebar layar viewport.
  4. Selektor Relasional :has(): Menata gaya elemen induk berdasarkan status elemen anak di dalamnya tanpa membutuhkan state JavaScript.
  5. Nesting Native & @layer: Mengatur hierarki gaya CSS tanpa alat build dan mengontrol urutan spesifisitas secara terstruktur.

Resep Implementasi Produksi

Resep 1: Anchor Positioning Murni untuk Menu Dropdown (Tanpa JavaScript)

/* Definisikan tombol pemicu sebagai jangkar (anchor) */
.tombol-pemicu {
  anchor-name: --jangkar-menu;
}

/* Hubungkan menu popover ke tombol pemicu */
.menu-dropdown {
  position: fixed;
  position-anchor: --jangkar-menu;
  
  /* Posisikan di bawah tombol pemicu */
  top: anchor(bottom);
  left: anchor(left);
  margin-top: 8px;

  /* Balik posisi ke atas jika terpotong batas layar */
  position-try-fallbacks: flip-block;
}

Resep 2: Animasi Modal <dialog> dengan @starting-style

dialog {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, display 0.25s allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
}

dialog::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition: background-color 0.25s ease-out, display 0.25s allow-discrete;
}

dialog[open]::backdrop {
  background-color: rgb(0 0 0 / 50%);
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0%);
  }
}

Checklist Implementasi

  • Ganti library positioning pihak ketiga dengan CSS anchor-name dan position-anchor.
  • Gunakan @starting-style dan transition-behavior: allow-discrete untuk animasi modal tanpa jeda JavaScript.
  • Gunakan @container pada komponen reusable agar adaptif di semua layout.
  • Tata arsitektur CSS menggunakan @layer base, components, utilities;.

Resep 5: Overlay Top-Layer Material Design 3 (M3) dengan Easing Emphasized

Implementasikan dialog M3 dan modal bottom sheet secara native menggunakan <dialog> dan @starting-style dengan kurva Emphasized Decelerate M3 (cubic-bezier(0.05, 0.7, 0.1, 1.0)):

  • Hubungkan token bentuk M3 (--md-sys-shape-corner-extra-large: 28px) dan surface container (--md-sys-color-surface-container-high).
  • Backdrop scrim M3 transparan bertransisi halus ke opasitas 32% hitam (rgb(0 0 0 / 32%)).

Integrasi Orkestrasi

  • Terintegrasi dengan: design-system-architect, design-system-architect, senior-frontend, tailwind-expert, senior-frontend.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

roedyrustam의 스킬 모두 보기

이 스킬의 문제 신고