Best For
杂志 / 多栏 / 新闻
Magazine Grid
Multi-column grid layout inspired by print magazines, creating rich visual hierarchy through varied content block sizes. Ideal for news, blogs, and content aggregation.
Best For
杂志 / 多栏 / 新闻
Primary Move
Use CSS Grid to create complex grids grid-template-areas
Watch Out
Do not make all content blocks the same size
Showcase Entry
Live preview of the showcase page. Click to explore the full experience.
Color Palette
Primary
#1a1a1a
Secondary
#fafafa
Accent 1
#e63946
Accent 2
#2a9d8f
AI Implementation
Use the Hard Prompt by default to generate UI. Use the Design Spec to understand, modify, and review the style. Use the Creative Brief for early exploration.
Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.
When to use
How to use
STYLEKIT_STYLE_REFERENCE
style_name: Magazine Grid
style_slug: magazine-grid
style_source: /styles/magazine-grid
# Hard Prompt
## When To Use
Use this when you want AI to generate code with strict style consistency. It is the safest default for production UI.
## How To Use
- Copy the full prompt into ChatGPT, Claude, Cursor, or another coding assistant.
- Append the concrete product/page requirement after the prompt.
- After generation, check the forbidden rules and interaction states before accepting the output.
Strictly follow the style rules below and maintain consistency. No style drift allowed.
## Requirements
- Prioritize style consistency first, then creative extension.
- When conflicts arise, treat prohibitions as the highest priority.
- Self-check before output: verify colors, typography, spacing, and interactions still match this style.
## Style Rules
You are a frontend expert specializing in Magazine Grid layout. All generated code must strictly follow these constraints:
## Absolute Prohibitions
- Do NOT make all content blocks same size
- Do NOT ignore mobile responsive layout
- Do NOT overcrowd content without whitespace
- Do NOT use inconsistent category styling
- Do NOT ignore image aspect ratios
## Must Follow
- Use CSS Grid: grid-cols-1 md:grid-cols-2 lg:grid-cols-4
- Featured content: col-span-2 row-span-2
- Consistent gaps: gap-6
- Category labels on all articles
- Image hover effects
- Line clamping for excerpts
## Grid Structure
Desktop (4 columns):
- Featured: 2x2 grid area
- Regular: 1x1 grid cells
- Mix large and small for variety
Tablet (2 columns):
- Featured: 2x1 or 1x2
- Regular: 1x1
Mobile (1 column):
- All items full width
- Stack vertically
## Article Card
Required elements:
1. Image with aspect ratio
2. Category label (colored)
3. Title (clamped)
4. Excerpt (optional, clamped)
5. Meta (author, date, read time)
## Category Colors
Use distinct colors per category:
- Tech: blue
- Business: green
- Culture: amber
- Opinion: purple
- Featured: red
## Animation & Interaction Rules
- Color Awakening: Default images can have slight grayscale (e.g. grayscale-[20%]), restoring full color and scale-105 on hover.
- Editorial Stretch: Category label decorative line can smoothly extend from w-4 to w-12, emphasizing typographic skeleton.
- Crisp Typographic Shift: Title hover directly switches to primary color (e.g. red-600), using duration-200 ease-out.
- Readability First: Body text paragraphs must not have displacement animations, ensuring reading stability and scanning efficiency.
## Self-Check
After generating code, verify:
1. Featured item is larger
2. Grid has visual variety
3. Categories are labeled
4. Mobile layout works
5. Images have proper ratiosComponent Templates
文章分类的标签按钮,带有 Editorial Stretch 装饰线延伸效果
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
51%
Fallback
Dark Mode
0%
MissingUI States
79%
PartialMotion
70%
PartialA11y
70%
PartialPerformance
35%
FallbackButton
Default / Hover / Focus Visible / Active / Disabled
Input
Default / Hover / Focus Visible / Disabled / Error
Card
Default / Hover / Focus Visible / Loading / Skeleton
Form
Default / Focus Visible / Disabled / Loading / Error
/* Magazine Grid Global Styles */
/* Base magazine grid */
.magazine-grid {
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;
}
@media (min-width: 768px) {
.magazine-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.magazine-grid {
grid-template-columns: repeat(4, 1fr);
}
}
/* Featured item spans */
.magazine-featured {
grid-column: span 2;
grid-row: span 2;
}
@media (max-width: 767px) {
.magazine-featured {
grid-column: span 1;
grid-row: span 1;
}
}
/* Article card styles */
.magazine-article {
position: relative;
}
.magazine-article img {
transition: transform 0.3s ease;
}
.magazine-article:hover img {
transform: scale(1.05);
}
/* Category tags */
.magazine-category {
display: inline-block;
padding: 0.25rem 0.75rem;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
border-radius: 0.25rem;
}
/* Category colors */
.magazine-category-tech { color: #3b82f6; background: #eff6ff; }
.magazine-category-business { color: #10b981; background: #ecfdf5; }
.magazine-category-culture { color: #f59e0b; background: #fffbeb; }
.magazine-category-opinion { color: #8b5cf6; background: #f5f3ff; }
.magazine-category-featured { color: white; background: #dc2626; }
/* Line clamp for excerpts */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Magazine Grid Design Tokens */
:root {
--magazine-grid-primary: #1a1a1a;
--magazine-grid-secondary: #fafafa;
--magazine-grid-accent: #e63946;
--magazine-grid-glow: rgba(26, 26, 26, 0.3);
}
@keyframes magazine-grid-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes magazine-grid-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.magazine-grid-card {
position: relative;
overflow: hidden;
}
.magazine-grid-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(26, 26, 26, 0.05), transparent);
pointer-events: none;
}
.magazine-grid-card:hover::before {
opacity: 1;
}
.magazine-grid-gradient {
background: linear-gradient(135deg, #1a1a1a, #e63946);
}
.magazine-grid-gradient-text {
background: linear-gradient(135deg, #1a1a1a, #e63946);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.magazine-grid-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(26, 26, 26, 0.08);
}
.magazine-grid-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.magazine-grid-animate-in {
animation: magazine-grid-fade-in 0.5s ease-out both;
}Compatible Visual Styles
杂志网格布局 is a layout pattern that can be paired with the following visual styles.
IDE Integration
Download configuration files for AI coding assistants to generate code in this style.
Style Pack
Get complete machine-readable style assets including design tokens, Tailwind presets, CSS variables, and shadcn/ui themes.
Metadata
Style metadata including version information
Design Tokens
Compatible with Figma / Style Dictionary / Tokens Studio
Tailwind Preset
Tailwind CSS theme preset, import directly in config
Global CSS
CSS variables and base styles
shadcn Theme
shadcn/ui theme configuration
CSS Variables
Pure CSS variables, works with any project
SKILL.md
Loadable skill pack for Cursor / Claude Code / VS Code
Magazine Grid borrows the typographic wisdom of traditional print magazines, creating professional editorial effects through multi-column and mixed-size content blocks.
WCAG 2.1 compliance analysis based on color contrast and typography readability.
Overall Score
Grade: C - Fair
Contrast Ratios
| Context | Colors | Ratio | AA | AAA |
|---|---|---|---|---|
| Text on background | /#18181b / #ffffff | 17.72:1 | ||
| Button primary | /#ffffff / #e63946 | 4.17:1 | ||
| Text on accent 1 | /#18181b / #e63946 | 4.25:1 | ||
| Text on accent 2 | /#18181b / #2a9d8f | 5.33:1 | ||
| Text on accent 3 | /#18181b / #e9c46a | 10.6:1 | ||
| Text on accent 4 | /#18181b / #264653 | 1.76:1 |
Readability
Score
82/100
Font Size
text-sm md:text-base
Font Weight
font-bold tracking-tight
Line Height
default
Scoring is based on WCAG 2.1 standards. AA requires 4.5:1 contrast for normal text, 3:1 for large text; AAA requires 7:1 for normal text, 4.5:1 for large text.
Design Recipes
These curated recipes combine this style with layouts and animations, optimized for specific use cases.