에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5.5 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| css-variables-var | CSS Variables var() | Frontend | draft | conceptual |
|
B | 0.89 | 2026-06-23 | 2026-06-23 |
|
|
CSS Variables var()
🎯 한 줄 통찰 (One-line insight)
CSS variables (custom properties) are declared with a --name and read back with var(--name); declaring them once in :root gives document-wide reusable values that make stylesheets easier to maintain and update. [S1]
🧠 핵심 개념 (Core concepts)
- Global vs local — global variables are declared in the
:rootselector for document-wide access; local variables are declared within a specific selector for limited scope. [S1] - Naming rules — variable names must begin with two dashes (
--) and are case-sensitive. [S1] - The var() function — the syntax is
var(--name, value), where the name is required andvalueis an optional fallback. [S1] - Why use them — the main advantages are easier maintenance, improved readability, and simplified color updates across an entire page. [S1]
🧩 추출된 패턴 (Extracted patterns)
- Theme tokens in :root — declaring colors as
:rootvariables creates a single place to change a whole page's palette. [S1] - Reuse via var() — the same
var(--primary-bg-color)reference reused across selectors keeps related values in sync. [S1] - Fallback safety —
var(--name, value)supplies a default when the named variable is not defined. [S1]
📖 세부 내용 (Details)
Declaring variables [S1]
Global variables are declared in the :root selector; local variables within a specific selector. Names start with -- and are case-sensitive:
:root {
--primary-bg-color: green;
}
.note {
--note-bg: yellow;
}
The var() Function [S1]
The var() function is used to insert the value of a CSS variable. Its syntax is var(--name, value) — --name is the required variable name, and value is an optional fallback used if the variable is not found.
Example — global variables used across selectors [S1]
:root {
--primary-bg-color: #1e90ff;
--primary-color: #ffffff;
}
body {
background-color: var(--primary-bg-color);
}
.container {
color: var(--primary-bg-color);
background-color: var(--primary-color);
padding: 15px;
}
.container h2 {
border-bottom: 2px solid var(--primary-bg-color);
}
.container .note {
border: 1px solid var(--primary-bg-color);
padding: 10px;
}
Example — swapping the color scheme by changing only the variables [S1]
:root {
--primary-bg-color: #8FBC8F;
--primary-color: #FFFAF0;
}
body {
background-color: var(--primary-bg-color);
}
.container {
color: var(--primary-bg-color);
background-color: var(--primary-color);
padding: 15px;
}
.container h2 {
border-bottom: 2px solid var(--primary-bg-color);
}
.container .note {
border: 1px solid var(--primary-bg-color);
padding: 10px;
}
Benefits [S1] The page highlights three main advantages of CSS variables: easier maintenance, improved readability, and simplified color updates across entire pages.
🛠️ 적용 사례 (Applied in summary)
The page's examples are the applied cases: a :root palette referenced by body, .container, .container h2, and .container .note, and a second version showing how changing only the :root values re-themes the entire layout. No external project/commit applications found in the source.
💻 코드 패턴 (Code patterns)
Declare and use a global variable (language: CSS):
:root {
--primary-bg-color: #1e90ff;
}
body {
background-color: var(--primary-bg-color);
}
var() with fallback (language: CSS):
.example {
color: var(--name, value);
}
⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
- Global (
:root) variables — accessible through the entire document; use for site-wide theme tokens such as the primary palette. [S1] - Local variables — declared inside a specific selector and usable only within it; use when a value should only apply to one section. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
- 신뢰 점수: 0.89
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: CSS Tutorial
- 관련 개념: CSS Overriding Variables, CSS Colors, CSS Selectors, CSS Syntax
- 참조 맥락: Referenced when centralizing reusable values (colors, sizes) for maintainable, themeable stylesheets.
📚 출처 (Sources)
- [S1] W3Schools — CSS Variables var() — https://www.w3schools.com/css/css3_variables.asp
📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Variables var()" page (Astra wiki-curation, P-Reinforce v3.1 format).