--- id: howto-css-outline-buttons title: "How To - Outline Buttons" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["ghost button CSS"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.83 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "buttons"] raw_sources: ["https://www.w3schools.com/howto/howto_css_outline_buttons.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Outline Buttons]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) Outline buttons INVERT `[[HOWTO CSS Alert Buttons]]`'s color model exactly: instead of a solid background color that stays constant while text stays white, each variant here starts with a WHITE background and COLORED border+text, then on `:hover` SWAPS to the solid colored background with white text β€” meaning the outline button's hover state is literally the alert button's resting state, and vice versa. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Resting state: colored border + colored text, white background** β€” `.success { border-color: #04AA6D; color: green; }`. [S1] - **Hover state: swap to solid fill** β€” `.success:hover { background-color: #04AA6D; color: white; }` β€” the exact inverse of the resting state's color assignment. [S1] - **`border-radius` as an optional add-on** β€” a single extra rule (`.btn { border-radius: 5px; }`) converts the same outline buttons to rounded outline buttons, without touching any other rule. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Base: `.btn { border: 2px solid black; background-color: white; color: black; padding: 14px 28px; }`. [S1] - Success example: `.success { border-color: #04AA6D; color: green; } .success:hover { background-color: #04AA6D; color: white; }`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **Alert Buttons의 색상 λͺ¨λΈμ„ μ •ν™•νžˆ λ°˜μ „μ‹œν‚΄**: `[[HOWTO CSS Alert Buttons]]`λŠ” 배경색이 항상 μΉ ν•΄μ Έ 있고 hover μ‹œ 살짝 μ–΄λ‘μ›Œμ§€λŠ” λ°©μ‹μ΄μ—ˆμ§€λ§Œ, 이 λ ˆμ‹œν”ΌλŠ” κΈ°λ³Έ μƒνƒœκ°€ 흰 λ°°κ²½+색 ν…Œλ‘λ¦¬μ΄κ³  hover μ‹œ μ™„μ „νžˆ λ°˜μ „λ˜μ–΄ 배경이 μ±„μ›Œμ§„λ‹€λŠ” 점이 μ •λ°˜λŒ€ μ„€κ³„λ‘œ 확인됨. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) Success/Info/Warning/Danger/Default 5κ°€μ§€ 아웃라인 λ²„νŠΌμ„ hover μ‹œ 색이 μ±„μ›Œμ§€λ„λ‘ λ§Œλ“€κ³ , border-radius둜 λ‘₯κ·Ό 버전도 μΆ”κ°€ν•˜λŠ” μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ 직접 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Outline button β€” colors invert on hover (CSS): ```css .btn { border: 2px solid black; background-color: white; color: black; } .success { border-color: #04AA6D; color: green; } .success:hover { background-color: #04AA6D; color: white; } /* inverted */ ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Alert Buttons]], [[HOWTO CSS Text Buttons]], [[HOWTO CSS Round Buttons]] - **μ°Έμ‘° λ§₯락:** CSS Buttons μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Outline Buttons β€” https://www.w3schools.com/howto/howto_css_outline_buttons.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Outline Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format).