--- id: css-user-interface title: "CSS User Interface" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["resize property", "outline-offset", "resizable element", "user interface properties", "resize textarea", "CSS UI"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "user-interface", "resize", "outline"] raw_sources: ["https://www.w3schools.com/css/css3_user_interface.asp"] applied_in: [] github_commit: "" --- # [[CSS User Interface]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The CSS user-interface properties cover `resize` (whether and how a user can drag-resize an element) and `outline-offset` (the gap between an outline and the element's border), where the outline sits outside the box and does not affect the element's dimensions. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **resize** β€” the `resize` property specifies if (and how) an element can be resized by a user. [S1] - **resize values** β€” `horizontal` (resize the width), `vertical` (resize the height), `both` (resize in both directions), and `none` (not resizable). [S1] - **outline-offset** β€” the `outline-offset` property adds a space between an outline and the edge/border of an element. [S1] - **Outline is not a border** β€” unlike a border, the outline is drawn outside the element's border, may overlap other content, and is NOT part of the element's dimensions β€” the element's total width and height are not affected by the outline width. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Resize needs overflow** β€” `resize` is paired with `overflow: auto;` so the resizable box scrolls its content correctly. [S1] - **Lock textarea sizing** β€” `textarea { resize: none; }` disables the browser default that lets users drag-resize a textarea. [S1] - **Spaced highlight ring** β€” `outline` + `outline-offset` produces a detached highlight ring around an element without changing its layout box. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **CSS Resize** [S1] The `resize` property specifies if (and how) an element can be resized by a user. Its values are: - `horizontal` β€” the user can resize the element horizontally (the width). - `vertical` β€” the user can resize the element vertically (the height). - `both` β€” the user can resize the element both vertically and horizontally. - `none` β€” the user cannot resize the element. Resize only the width: ```css div { resize: horizontal; overflow: auto; } ``` Resize only the height: ```css div { resize: vertical; overflow: auto; } ``` Resize both width and height: ```css div { resize: both; overflow: auto; } ``` Disable resize in a textarea (browsers normally let users resize it): ```css textarea { resize: none; } ``` **CSS Outline Offset** [S1] The `outline-offset` property adds a space between an outline and the edge/border of an element. > Note: Outline differs from borders! Unlike border, the outline is drawn outside the element's border, and may overlap other content. Also, the outline is NOT a part of the element's dimensions; the element's total width and height is not affected by the width of the outline. ```css div.ex1 { margin: 20px; border: 1px solid black; outline: 4px solid red; outline-offset: 15px; } div.ex2 { margin: 10px; border: 1px solid black; outline: 5px dashed blue; outline-offset: 5px; } ``` **CSS User Interface Properties** [S1] | Property | Description | |----------|-------------| | outline-offset | Adds space between an outline and the edge or border of an element | | resize | Specifies whether or not an element is resizable by the user | ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's examples are the applied cases: `div` elements made resizable horizontally / vertically / both (each with `overflow: auto`), a `textarea` with resize disabled, and two `div`s demonstrating offset outlines. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Resizable element (language: CSS): ```css div { resize: both; overflow: auto; } ``` Disable textarea resize (language: CSS): ```css textarea { resize: none; } ``` Offset outline (language: CSS): ```css div.ex1 { border: 1px solid black; outline: 4px solid red; outline-offset: 15px; } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.88 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Outline]], [[CSS Overflow]], [[CSS Forms]], [[CSS Box Model]] - **μ°Έμ‘° λ§₯락:** Referenced when controlling user-resizable boxes or drawing spaced focus/highlight outlines. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS User Interface β€” https://www.w3schools.com/css/css3_user_interface.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS User Interface" page (Astra wiki-curation, P-Reinforce v3.1 format).