grid

GitHub

指导多列网格布局的设计、实现与优化,涵盖CSS Grid使用、响应式断点设置及最佳实践,适用于产品、画廊等视觉内容的展示。

skills/components/layout/grid/SKILL.md kostja94/marketing-skills

Trigger Scenarios

用户需要设计或审计网格布局 提到 CSS grid、responsive grid、card grid 等关键词

Install

npx skills add kostja94/marketing-skills --skill grid -g -y
More Options

Non-standard path

npx skills add https://github.com/kostja94/marketing-skills/tree/main/skills/components/layout/grid -g -y

Use without installing

npx skills use kostja94/marketing-skills@grid

指定 Agent (Claude Code)

npx skills add kostja94/marketing-skills --skill grid -a claude-code -g -y

安装 repo 全部 skill

npx skills add kostja94/marketing-skills --all -g -y

预览 repo 内 skill

npx skills add kostja94/marketing-skills --list

SKILL.md

Frontmatter
{
    "name": "grid",
    "metadata": {
        "version": "1.0.1"
    },
    "description": "When the user wants to design, optimize, or audit grid layouts for content display. Also use when the user mentions \"grid layout,\" \"grid design,\" \"multi-column grid,\" \"CSS grid,\" \"responsive grid,\" \"card grid,\" \"product grid,\" or \"feature grid.\" For cards layout, use card."
}

Components: Grid Layout

Guides grid layout design for equal-hierarchy, multi-column content display. Grids display multiple items with equal emphasis; space-efficient and scannable. Used for products, templates, tools, features, blog indexes, and galleries.

When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.

When to Use Grid

Use grid when Use list when
Visual content (images, thumbnails) Text-heavy; scan by title
Equal emphasis across items Compact; many items; dense info
Products, templates, gallery, features Blog index, docs, search results
Browsing, discovery Reading, scanning

See list for list layout; card for card structure within grid.

Grid Structure

Element Purpose
Columns 1–4+ columns; adapt to viewport
Gap Consistent spacing between items
Items Equal or proportional sizing
Responsive 1 col mobile → 2–4 cols desktop

Implementation

  • CSS Grid: repeat(auto-fill, minmax(min, 1fr)) or repeat(auto-fit, minmax()) for fluid columns
  • Breakpoints: e.g., 1 col <768px; 2 cols 768–1024px; 3–4 cols >1024px
  • Consistency: Same padding, aspect ratios across items; see card for card structure

Best Practices

Principle Practice
Equal hierarchy Items compete equally; no single dominant item
Consistent sizing Same card/item dimensions in grid
Gap consistency Uniform gap (e.g., 16px, 24px)
No layout shift Reserve space for images; avoid CLS

Responsive

  • Mobile: Single column; full-width items
  • Tablet: 2 columns; touch targets ≥44×44px
  • Desktop: 3–4 columns; hover states OK

Infinite Scroll

If using infinite scroll with grid: crawlers cannot access content loaded on scroll. Provide paginated component pages for SEO-critical content. See site-crawlability for search-friendly implementation.

Related Skills

  • site-crawlability: Infinite scroll SEO; paginated component pages
  • card: Card structure within grid; product, template, tool cards
  • list: List layout vs grid; when to use each
  • masonry: Masonry for varying heights (Pinterest-style)
  • carousel: Carousel for slides/rotation; when grid is too dense
  • hero-generator: Hero above; grid below for content sections
  • products-page-generator: Product grid
  • template-page-generator: Template grid
  • features-page-generator: Feature grid

Version History

  • 70987ba Current 2026-07-06 00:04

Same Skill Collection

skills/analytics/seo/seo-monitoring/SKILL.md
skills/analytics/sources/ai-traffic/SKILL.md
skills/analytics/sources/traffic/SKILL.md
skills/analytics/tracking/SKILL.md
skills/channels/community/community-forum/SKILL.md
skills/channels/community/product-hunt-launch/SKILL.md
skills/channels/distribution/distribution-channels/SKILL.md
skills/channels/owned/email-marketing/SKILL.md
skills/channels/owned/employee-generated-content/SKILL.md
skills/channels/partnerships/affiliate-marketing/SKILL.md
skills/channels/partnerships/creator-program/SKILL.md
skills/channels/partnerships/education-program/SKILL.md
skills/channels/partnerships/influencer-marketing/SKILL.md
skills/channels/partnerships/public-relations/SKILL.md
skills/channels/partnerships/referral-program/SKILL.md
skills/components/branding/favicon/SKILL.md
skills/components/branding/hero/SKILL.md
skills/components/branding/logo/SKILL.md
skills/components/content/tab-accordion/SKILL.md
skills/components/conversion/cta/SKILL.md
skills/components/conversion/newsletter-signup/SKILL.md
skills/components/conversion/popup/SKILL.md
skills/components/conversion/testimonials/SKILL.md
skills/components/conversion/trust-badges/SKILL.md
skills/components/layout/card/SKILL.md
skills/components/layout/carousel/SKILL.md
skills/components/layout/list/SKILL.md
skills/components/layout/masonry/SKILL.md
skills/components/navigation/breadcrumb/SKILL.md
skills/components/navigation/footer/SKILL.md
skills/components/navigation/navigation-menu/SKILL.md
skills/components/navigation/sidebar/SKILL.md
skills/components/navigation/toc/SKILL.md
skills/components/utility/social-share/SKILL.md
skills/components/utility/top-banner/SKILL.md
skills/components/utility/url-slug/SKILL.md
skills/content/copywriting/SKILL.md
skills/content/podcast/SKILL.md
skills/content/translation/SKILL.md
skills/content/video/SKILL.md
skills/content/visual-content/SKILL.md
skills/pages/brand/about/SKILL.md
skills/pages/brand/contact/SKILL.md
skills/pages/brand/home/SKILL.md
skills/pages/content/api/SKILL.md
skills/pages/content/article/SKILL.md
skills/pages/content/blog/SKILL.md
skills/pages/content/docs/SKILL.md
skills/pages/content/faq/SKILL.md

Metadata

Files
0
Version
70987ba
Hash
f56328c7
Indexed
2026-07-06 00:04

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 20:33
浙ICP备14020137号-1 $bản đồ khách truy cập$