docs(10_Wiki): Dev 폴더 누락분 반영 — Topic_Programming으로 통합

이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영.

- Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들
  (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거.
- Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/
  Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/
  Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이
  존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존).
- Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/
  JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동.
- 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리.
- Topic_Programming 최종 문서 수: 2784 → 3985.
This commit is contained in:
Antigravity Agent
2026-07-05 00:39:13 +09:00
parent 9148c358d0
commit e9cbf23ab5
1356 changed files with 0 additions and 12831 deletions
@@ -0,0 +1,100 @@
---
id: css-optimization
title: "CSS Optimization"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["CSS performance", "CSS optimization", "faster CSS", "CSS minification", "render performance"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.87
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "performance", "optimization", "rendering"]
raw_sources: ["https://www.w3schools.com/css/css_performance.asp"]
applied_in: []
github_commit: ""
---
# [[CSS Optimization]]
## 🎯 한 줄 통찰 (One-line insight)
Optimizing CSS makes a website load faster and run more smoothly — keep selectors simple, avoid layout-thrashing work, animate cheap properties, and serve external, minified, cached stylesheets. [S1]
## 🧠 핵심 개념 (Core concepts)
- **Why optimize** — optimizing CSS makes your website load faster and run more smoothly, which results in a better user experience. [S1]
- **Parsing cost** — complex selectors increase parsing time, so simpler selectors are faster. [S1]
- **Rendering cost** — broad selectors (like the universal selector) and certain animated properties force more work during rendering. [S1]
- **Delivery cost** — how CSS is loaded, combined, minified, and cached affects load time. [S1]
## 🧩 추출된 패턴 (Extracted patterns)
- **Simplest-selector pattern** — prefer a short selector such as `.button:hover` over a deeply nested one. [S1]
- **Cheap-animation pattern** — animate properties that don't cause repaint/reflow (transforms, opacity, filter) instead of layout-triggering properties. [S1]
- **One-file delivery pattern** — combine into a single external CSS file, minify it, and cache it with a long expiration time. [S1]
## 📖 세부 내용 (Details)
Optimizing CSS makes your website load faster and run more smoothly, which also results in a better user experience. The page presents nine optimization strategies. [S1]
**1. Use Simple Selectors.** Use simple selectors when possible; complex selectors increase the parsing time. The "bad" approach uses a deeply nested selector, while the better approach uses just `.button:hover`. [S1]
**2. Avoid the Universal Selector.** Avoid the universal selector (`*`) when not strictly necessary — it affects every element and can slow down page rendering. [S1]
**3. Avoid Inline Styles.** Avoid inline styles when not necessary; inline styles make your HTML heavier and are harder to manage. [S1]
**4. Avoid `@import`.** Avoid using `@import` for loading external CSS, as it delays stylesheet loading. Use the `<link>` tag in the `<head>` section instead. [S1]
**5. Use Shorthand Properties.** Use shorthand properties when possible — it saves space and is faster to parse. For example, use `margin: 10px 20px;` instead of writing each margin property individually. [S1]
```css
margin: 10px 20px;
```
**6. Cut Down Unnecessary Animations.** A high number of animations and large animations require more processing power to handle, which degrades performance. [S1]
**7. Use Properties That Don't Cause Repaint.** Animation performance relies also on what properties you are animating. Properties like transforms, opacity, and filter are recommended over layout-triggering properties. [S1]
**8. Combine and Minify CSS.** Use one CSS file when possible, and remove spaces and comments to reduce file size. [S1]
**9. Cache Your CSS.** Make sure your CSS file is cached by the browser by giving it a long expiration time in your server settings. [S1]
**Summary.** Keep selectors short and simple; avoid layout-thrashing operations; use efficient animation techniques; and use external, minified, and cached stylesheets. [S1]
(Note: the exact "bad" vs "good" verbatim code boxes for tips 14 and 69 were not captured verbatim from the source beyond the shorthand `margin` example and the `.button:hover` reference. — Not found in source.)
## 🛠️ 적용 사례 (Applied in summary)
The page's applied guidance contrasts a deeply nested selector against the simpler `.button:hover`, and replaces individual margin declarations with the shorthand `margin: 10px 20px;`. No external project/commit applications found in the source.
## 💻 코드 패턴 (Code patterns)
Shorthand over longhand (language: CSS):
```css
/* Preferred — shorthand */
margin: 10px 20px;
```
Simple selector over a nested chain (language: CSS):
```css
/* Preferred — short and simple */
.button:hover { /* ... */ }
```
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.
## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.87
- **중복 검사 결과:** 신규 생성 (New discovery)
## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Selectors]], [[CSS Math Functions]], [[CSS Accessibility]]
- **참조 맥락:** Consulted when a page's CSS is slow to parse, render, or download and needs tuning for performance.
## 📚 출처 (Sources)
- [S1] W3Schools — CSS Optimization — https://www.w3schools.com/css/css_performance.asp
## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Optimization" page (Astra wiki-curation, P-Reinforce v3.1 format).