1cfd3bbb56
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
3.3 KiB
3.3 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 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| howto-css-alert-buttons | How To - Alert Buttons | Web_Recipes | draft | conceptual |
|
B | 0.83 | 2026-07-04 | 2026-07-04 |
|
|
HOWTO CSS Alert Buttons
🎯 한 줄 통찰 (One-line insight)
A shared .btn base class handles all the STRUCTURAL styling (border removal, padding, cursor) once, while five separate semantic modifier classes (.success, .info, .warning, .danger, .default) each carry ONLY a background-color pair (normal + :hover) — this base+modifier split means adding a sixth alert color later requires just one new 2-line modifier class, not a full button redefinition. [S1]
🧠 핵심 개념 (Core concepts)
- Shared base class
.btn—border: none; color: white; padding: 14px 28px; cursor: pointer;applied once to every alert button. [S1] - Color-coded semantic modifiers —
.success(green),.info(blue),.warning(orange),.danger(red),.default(gray, with black text instead of white). [S1] - Each modifier defines its own
:hover— a slightly darker shade of the same hue, applied consistently across all five variants. [S1]
📖 세부 내용 (Details)
- HTML:
<button class="btn success">Success</button>(and similarly for info/warning/danger/default). [S1] - CSS colors: success
#04AA6D→hover#46a049; info#2196F3→hover#0b7dda; warning#ff9800→hover#e68a00; danger#f44336→hover#da190b; default#e7e7e7(black text)→hover#ddd. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음.
🛠️ 적용 사례 (Applied in summary)
Success/Info/Warning/Danger/Default 5가지 색상의 알림 버튼을 하나의 공통 .btn 클래스와 색상별 수식 클래스로 구현하는 예제가 원문에서 직접 제시됨. [S1]
💻 코드 패턴 (Code patterns)
Base class + semantic color modifiers (CSS):
.btn {
border: none;
color: white;
padding: 14px 28px;
cursor: pointer;
}
.success { background-color: #04AA6D; }
.success:hover { background-color: #46a049; }
.danger { background-color: #f44336; }
.danger:hover { background-color: #da190b; }
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference)
- 신뢰 점수: 0.83
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: W3Schools HOW TO
- 관련 개념: HOWTO CSS Block Buttons, HOWTO CSS Outline Buttons, HOWTO CSS Text Buttons
- 참조 맥락: CSS Buttons 섹션.
📚 출처 (Sources)
- [S1] W3Schools — How To - Alert Buttons — https://www.w3schools.com/howto/howto_css_alert_buttons.asp
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Alert Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format).