docs(10_Wiki): W3Schools 위키화 — HTML/CSS/JavaScript(core)
W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더). - Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외) - Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체) - Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속) 각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
---
|
||||
id: css-grid-items
|
||||
title: "CSS Grid Items"
|
||||
category: "Frontend"
|
||||
status: "draft"
|
||||
verification_status: "conceptual"
|
||||
canonical_id: ""
|
||||
aliases: ["grid-column", "grid-row", "grid-column-start", "grid-column-end", "grid item span", "CSS grid lines", "grid-area"]
|
||||
duplicate_of: ""
|
||||
source_trust_level: "B"
|
||||
confidence_score: 0.9
|
||||
created_at: 2026-06-23
|
||||
updated_at: 2026-06-23
|
||||
review_reason: ""
|
||||
merge_history: []
|
||||
tags: ["css", "web", "frontend", "w3schools", "grid", "layout"]
|
||||
raw_sources: ["https://www.w3schools.com/css/css_grid_item.asp"]
|
||||
applied_in: []
|
||||
github_commit: ""
|
||||
---
|
||||
|
||||
# [[CSS Grid Items]]
|
||||
|
||||
## 🎯 한 줄 통찰 (One-line insight)
|
||||
All direct children of a grid container automatically become grid items, and each item can span multiple columns or rows by referencing column-lines and row-lines through `grid-column-start/end` and `grid-row-start/end` (or their shorthands). [S1]
|
||||
|
||||
## 🧠 핵심 개념 (Core concepts)
|
||||
- **Grid items** — a grid container contains one or more grid items; all direct child elements of a grid container automatically become grid items. [S1]
|
||||
- **Spanning** — a grid item can span over multiple columns or rows by specifying where it starts and ends. [S1]
|
||||
- **Grid lines** — the lines between the columns are called column-lines, and the lines between the rows are called row-lines; line numbers are used to place a grid item in the container. [S1]
|
||||
|
||||
## 🧩 추출된 패턴 (Extracted patterns)
|
||||
- **Line-number placement** — set `grid-column-start`/`grid-column-end` (and the row equivalents) to numeric line indices to place and size an item. [S1]
|
||||
- **`/ span N` shorthand** — `grid-column: 1 / span 2;` starts at a line and spans a number of tracks instead of naming the end line. [S1]
|
||||
- **Combined placement** — apply both `grid-column` and `grid-row` to a single item to span across both axes simultaneously. [S1]
|
||||
|
||||
## 📖 세부 내용 (Details)
|
||||
**Grid items**
|
||||
A grid container contains one or more grid items. All direct child elements of a grid container automatically become grid items. A grid item can span over multiple columns or rows; we specify where to start and end a grid item by using placement properties. The lines between the columns in a grid are called column-lines, and the lines between the rows in a grid are called row-lines. We can refer to line numbers when placing a grid item in a grid container. [S1]
|
||||
|
||||
**Properties for placing grid items** [S1]
|
||||
|
||||
| Property | Purpose |
|
||||
|----------|---------|
|
||||
| `grid-column-start` | Specifies on which column-line the grid item will start |
|
||||
| `grid-column-end` | Specifies on which column-line the grid item will end |
|
||||
| `grid-column` | Shorthand property for `grid-column-start` and `grid-column-end` |
|
||||
| `grid-row-start` | Specifies on which row-line the grid item will start |
|
||||
| `grid-row-end` | Specifies on which row-line the grid item will end |
|
||||
| `grid-row` | Shorthand property for `grid-row-start` and `grid-row-end` |
|
||||
|
||||
Using `grid-column-start` and `grid-column-end` to make an item start at column-line 1 and end at column-line 3: [S1]
|
||||
```css
|
||||
.item1 {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 3;
|
||||
}
|
||||
```
|
||||
The same result with the `grid-column` shorthand using `/ span`: [S1]
|
||||
```css
|
||||
.item1 {
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
```
|
||||
Using `grid-row-start` and `grid-row-end` to make an item start at row-line 1 and end at row-line 3: [S1]
|
||||
```css
|
||||
.item1 {
|
||||
grid-row-start: 1;
|
||||
grid-row-end: 3;
|
||||
}
|
||||
```
|
||||
The same result with the `grid-row` shorthand using `/ span`: [S1]
|
||||
```css
|
||||
.item1 {
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
```
|
||||
Combining `grid-column` and `grid-row` so the item spans two columns and two rows: [S1]
|
||||
```css
|
||||
.item1 {
|
||||
grid-column: 1 / span 2;
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
```
|
||||
|
||||
**Complete CSS Grid Item properties reference** [S1]
|
||||
|
||||
| Property | Description |
|
||||
|----------|-------------|
|
||||
| `align-self` | Aligns the content for a specific grid item along the column axis |
|
||||
| `grid-area` | Shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end` |
|
||||
| `grid-column` | Shorthand property for `grid-column-start` and `grid-column-end` |
|
||||
| `grid-column-end` | Specifies where to end the grid item |
|
||||
| `grid-column-start` | Specifies where to start the grid item |
|
||||
| `grid-row` | Shorthand property for `grid-row-start` and `grid-row-end` |
|
||||
| `grid-row-end` | Specifies where to end the grid item |
|
||||
| `grid-row-start` | Specifies where to start the grid item |
|
||||
| `justify-self` | Aligns the content for a specific grid item along the row axis |
|
||||
| `place-self` | Shorthand property for `align-self` and `justify-self` |
|
||||
|
||||
## 🛠️ 적용 사례 (Applied in summary)
|
||||
The page's own examples are the applied cases: placing `.item1` by explicit start/end lines, by `/ span` shorthand, and spanning both columns and rows at once. No external project/commit applications found in the source.
|
||||
|
||||
## 💻 코드 패턴 (Code patterns)
|
||||
Explicit line placement (language: CSS):
|
||||
```css
|
||||
.item1 {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 3;
|
||||
}
|
||||
```
|
||||
Span shorthand:
|
||||
```css
|
||||
.item1 {
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
```
|
||||
Span across both axes:
|
||||
```css
|
||||
.item1 {
|
||||
grid-column: 1 / span 2;
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
```
|
||||
|
||||
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||
No contradictions found in the source.
|
||||
|
||||
## ✅ 검증 상태 및 신뢰도
|
||||
- **상태:** draft
|
||||
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
|
||||
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||
- **신뢰 점수:** 0.9
|
||||
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||
|
||||
## 🔗 지식 그래프 (Knowledge Graph)
|
||||
- **상위/루트:** [[CSS Tutorial]]
|
||||
- **관련 개념:** [[CSS Grid Align]], [[CSS Grid Item Named]], [[CSS Grid Item Align]], [[CSS Grid Item Order]]
|
||||
- **참조 맥락:** How individual children are positioned and sized within a grid layout.
|
||||
|
||||
## 📚 출처 (Sources)
|
||||
- [S1] W3Schools — CSS Grid Items — https://www.w3schools.com/css/css_grid_item.asp
|
||||
|
||||
## 📝 변경 이력 (Change history)
|
||||
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Grid Items" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||
Reference in New Issue
Block a user